So, you are an administrator on-call and your organization is using Nagios as a system and service monitoring tool. It is 2 AM in the morning and you receive a page from your Nagios server that there is a problem with a service or host. You now have three options:
- Ignore the page (not smart if you want to remain employed).
- Call the organizations night shift to respond to the problem.
- Log in and fumble with your console to acknowledge the problem.
Well, there is a fourth method you can deploy that works great with mobile devices that have access to your environment and believe it or not the answer was right under your nose all the time. You can modify the alert message to include a link to your acknowledgment screen. It is not hard and can be accomplished in a few steps.
- Add this snippet of code to your command.cfg file at the end of your alert email and or page; Acknowledge: http://
/nagios/cgi-bin/cmd.cgi?c\nmd_typ=34&host=$HOSTNAME$&service=$SERVICEDESC$ - Open your services.cfg file and replace the white spaces in your services_description with under scores.
- Reload Nagios.
- See the next email or page that comes in and you will see the URL. All you need to do is goto the URL, enter a comment and press “commit”.
It does not get any better than that! Plus you have saved yourself the trouble of having to configure your environment or weaken your firewall by permitting SMS. If someone has an easier way to do this please let our readers know. Thinking outside the box will save you time and effort.
Mikhail Kniaziewicz, MIS
This looks really good but it will not work for me – I am using groundworks version and it uses a redirect once you have logged in – the URL remains the same which is “http://nagios/monitor/index.php”
Can you suggest how I can implement your fix in this context?
Cheers
Tony
For readers who are not familiar with Groundworks, the software was developed for system monitoring and notification. It uses Nagios as its core component, but improves upon the graphics and Administrator functions. More information can be found at: http://www.groundworkopensource.com/network-management-software.html.
Now, I have not installed Groundworks at this time, so I am not sure if an acknowledgment link is sent with the notifications. Nagios provides a link with the notifications for acknowledgments, if you place the macro in the mail command. You would need to find the absolute path to the particular acknowledgment and place that in the mail command. In Nagios it would be http://your url/cgi-bin/cmd.cgi?cmd_typ=33 for hosts and http://your url/cgi-bin/cmd.cgi?cmd_typ=34 for services.
A quick way to find out the absolute path is to click on a problem, then mouse-over the option to acknowledge the problem.
I hope that helps.