Question
Marc Powell
marc at ena.com
Thu Aug 2 16:39:06 CEST 2007
> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Carinus Carelse - MWEB
> Sent: Thursday, August 02, 2007 12:23 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Question
>
> Hi,
>
> I would like to know if it is possible to put the acknowledgement link
in
> the alert emails and sms and if it's possible how do i go about it.
Untested but using an actual acknowledgement link and
http://nagios.sourceforge.net/docs/2_0/macros.html as a reference, add a
link to the following in your service notification command --
http://<your.nagios.host>/nagios/cgi-bin/cmd.cgi?cmd_typ=34&host=$HOSTNA
ME$&service=$SERVICEDESC$
and the following link to your host notification command --
http://<your.nagios.host>/nagios/cgi-bin/cmd.cgi?cmd_typ=33&host=$HOSTNA
ME$
An example service notification command might look like --
define command {
command_name service-notify-by-email
command_line /bin/echo -e "Subject: Service
$SERVICEDESC$ $SERVICESTATE$ alert for $HOSTNAME$!\n\n***** Nagios
*****\n\nNotificati
on Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
$SERVICESTATE$\nAddress: $HOSTADDRESS$\n\nService: $SERVICEDESC$\nInfo:
$SERVICEOUTPUT$\n\nDate/Ti
me: $LONGDATETIME$\n\Acknowledge Link:
http://<your.nagios.host>/nagios/cgi-bin/cmd.cgi?cmd_typ=34&host=$HOSTNA
ME$&service=$SERVICEDESC$" | /bin/mail -s '** $NOTIFICATIONTYPE$ alert -
$HOSTALIA
S$/$SERVICEDESC$ is $SERVICESTATE$ **' $CONTACTEMAIL$
}
--
Marc
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list