Has anyone ever added a link into the nagios alert messages that allows the receiver to just click the link to put the alert into the acknowledgement state. I've had a look around but cant see anything.
Has anyone ever added a link into the nagios alert messages that allows the receiver to just click the link to put the alert into the acknowledgement state. I've had a look around but cant see anything.
Add a
notes_url
into service definition:And append the
$SERVICENOTESURL$
macro to the end of alert message, innotify-service-by-email
command, Eg:Do the same for host.
You'd need to add a link to your alert script similar to what's below.
For services: http://your-nagios-server.example.com/nagios/cgi-bin/cmd.cgi?cmd_typ=34&host=$NAGIOS_HOSTNAME&service=$NAGIOS_SERVICEDESC
For hosts: http://your-nagios-server.example.com/nagios/cgi-bin/cmd.cgi?cmd_typ=33&host=$NAGIOS_HOSTNAME
What exactly needs to be done depends on your alert script's logic. Keep in mind that the Nagios UI uses frames and these links will only show the Acknowledgement form page without the Nagios navigation bar on the left.