Hello,
I am looking into writing an integration to Nagios Core to send notifications, handle the responses and then update the alerts in Nagios. I have been able to find examples and documentation for sending out, but I can't seem to find much in the way of an API for updating the alerts. Can someone point me in the right direction?
Thanks!
--- Travis
Ability to update Alerts from external system?
Re: Ability to update Alerts from external system?
I think by alerts you mean status, in which case the API is just UNIX exit codes and stdout. A successful exit code of 0 gives a status of OK, 1 is WARNING, 2 is CRITICAL, and 3 is UNKNOWN. There is also a command file which is meant for passive check results, but I guess you could use it for this too: http://nagios.sourceforge.net/docs/3_0/extcommands.html
Re: Ability to update Alerts from external system?
Hi hi,
Ok, that looks promising. So, I imagine the workflow like this:
1) An Alert occurs (say disk space at 95%)
2) Nagios runs a command i have set up in command management to fire the notification to my application
3) The user responds with "Ack"
4) My application adds a line to the command file, let's say it is a "ACKNOWLEDGE_HOST_PROBLEM" command.
5) Nagios wakes up and reads this file and performs the actions specified in the ACKNOWLEDGE_HOST_PROBLEM details.
Sound about right?
Happy Monday!
--- Travis
Ok, that looks promising. So, I imagine the workflow like this:
1) An Alert occurs (say disk space at 95%)
2) Nagios runs a command i have set up in command management to fire the notification to my application
3) The user responds with "Ack"
4) My application adds a line to the command file, let's say it is a "ACKNOWLEDGE_HOST_PROBLEM" command.
5) Nagios wakes up and reads this file and performs the actions specified in the ACKNOWLEDGE_HOST_PROBLEM details.
Sound about right?
Happy Monday!
--- Travis