Ability to update Alerts from external system?

An open discussion forum for obtaining help with Nagios Core.

Ability to update Alerts from external system?

Postby tp13nomad » Mon Dec 05, 2011 2:46 pm

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
tp13nomad
 
Posts: 2
Joined: Mon Dec 05, 2011 2:36 pm

Re: Ability to update Alerts from external system?

Postby agriffin » Mon Dec 05, 2011 3:16 pm

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
agriffin
 
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Ability to update Alerts from external system?

Postby tp13nomad » Mon Dec 05, 2011 3:42 pm

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
tp13nomad
 
Posts: 2
Joined: Mon Dec 05, 2011 2:36 pm


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 3 guests