Page 1 of 1

Alert Notifications and RESTful

Posted: Fri Dec 19, 2014 1:19 pm
by wesmith1017
Greetings, all...

I'm in the process of evaulating Nagios XI as a replacement for our current monitoring solution, and it's going well thus far. Being new to Nagios, I'm kind of perplexed by a possible solution to this use case and figure maybe someone out here might have some input/suggestion for next steps.

My company uses a ticketing system that we're kind of stuck with for now: Agiloft's Enterprise Wizard, and it's an older version at that. We presently send alerts to it from SiteScope in a very kludgy and "duct-taped" manner. (It was a solution I inherited.)

What I'd like to do until we replace the Agiloft product is take an alert notification from Nagios XI and send it to Agiloft via REST call. I see a few options in the Exchange for RESTful addons for manipulating Nagios itself, but I want to be able to take the alert and auto-generate tickets, and then have those tickets update if there's a state change in the monitor.

Does anyone have any thoughts? This is new ground for me.

Thanks...

Re: Alert Notifications and RESTful

Posted: Fri Dec 19, 2014 1:25 pm
by tmcdonald
Absolutely possible.

So for some terminology:

Host: Basically anything with an IP address
Service: Attached to a host, most of your actual checking is done through services
Contact: Assigned to a host/service to receive alerts
Command: Anything run by Nagios on the CLI. Includes the actual plugins to check hosts/services, as well as notifications through sendmail or SMTP.

The commands can be anything you can run on the CLI. Usually it is a printf() call to format the message, then this gets piped to sendmail. Alternatively if you are using SMTP, it will use some PHP scripts to handle it. Either way, a command is basically just a CLI command being run. So if you could use, for example, curl to hit the REST API, you could absolutely use this as a type of notification command.

http://nagios.sourceforge.net/docs/3_0/ ... ml#command

Re: Alert Notifications and RESTful

Posted: Fri Dec 19, 2014 1:30 pm
by wesmith1017
That's fantastic--and thanks for replying so quickly!

Is this something that there's an Exchange download for or are we talking about just scripting it out?

Re: Alert Notifications and RESTful

Posted: Fri Dec 19, 2014 1:43 pm
by tmcdonald
It is somewhat unlikely that there is an existing solution for this exact situation, so yea in this case it would be a matter of scripting it out. You can even put it all in a script so it can be called with different parameters for different contacts. The link I posted shows the format for commands in Core, but in XI it is basically the same thing only created in the web interface.

Re: Alert Notifications and RESTful

Posted: Fri Dec 19, 2014 1:45 pm
by wesmith1017
Thanks so much! I appreciate the quick reply!

Re: Alert Notifications and RESTful

Posted: Fri Dec 19, 2014 1:49 pm
by tmcdonald
Absolutely! If you would like we can keep this topic open for related questions, otherwise I will be locking it and marking it as solved.

Re: Alert Notifications and RESTful

Posted: Mon Dec 22, 2014 10:24 am
by wesmith1017
You can lock it...that works for me! If I have subsequent questions/issues, I can start a more specific thread. Cheers!