Page 1 of 1
Nagios to monitor Event Queue on Web Server
Posted: Mon Feb 16, 2015 1:42 pm
by nagwindmon
hello,
Currently working on RESTful API to be available to Client Apps from Web Server.
The idea is to let Client utilize this API to fire event in case of error/issue and log it on Web Server and then have Nagios monitor/check on Event Queue on that Web Server for new Events and send trap/alert to ticketing system. Is there a way how can I accomplish this?
Thanks!
Re: Nagios to monitor Event Queue on Web Server
Posted: Mon Feb 16, 2015 2:21 pm
by abrist
What type of web api are we talking about here? check_http can check for strings at a url, which you could then tie into an event handler to run a script that can send a trap.
Re: Nagios to monitor Event Queue on Web Server
Posted: Mon Feb 16, 2015 2:31 pm
by nagwindmon
abrist,
that would be custom build API exposing certain fields for Client app to fill in case there is an error.
thanks!
Re: Nagios to monitor Event Queue on Web Server
Posted: Mon Feb 16, 2015 5:31 pm
by abrist
You could pull from the nagios logs, but do understand that the nagios logs can be *extremely* noisy on large installs. An event handler/check_http would have less impact, but it sounds like you would have to build an api to do that. What would you be looking for in the nagios.log?
Re: Nagios to monitor Event Queue on Web Server
Posted: Mon Feb 16, 2015 6:23 pm
by nagwindmon
abrist wrote:You could pull from the nagios logs, but do understand that the nagios logs can be *extremely* noisy on large installs. An event handler/check_http would have less impact, but it sounds like you would have to build an api to do that. What would you be looking for in the nagios.log?
no, no, Im not talking about Nagios log files, let me give you an example: customer app experiencing error and reporting it to my Web Sever by utilizing one of my APIs, so now Web server has error info and I need to pass it to Nagios server for alerting. So what would be a best way to establish communication to pass data between my Web server and Nagios one?
Re: Nagios to monitor Event Queue on Web Server
Posted: Mon Feb 16, 2015 6:37 pm
by Box293
This could be done in one of two ways.
Active:
Nagios queries the web server to check the queue
This could be via check_nrpe, check_by_ssh or create your own plugin that talks to your web server.
Nagios is hence the "owner" of the check and it is checked every x minutes etc
Passive:
The web server itself sends passive check information when required
This could be via NSCA, NRDP or SNMP Traps
The web server is responsible for sending passive check results to Nagios
Let us know if you need further information on these methods.
Re: Nagios to monitor Event Queue on Web Server
Posted: Mon Feb 16, 2015 6:45 pm
by nagwindmon
Box293 wrote:This could be done in one of two ways.
Passive:
The web server itself sends passive check information when required
This could be via NSCA, NRDP or SNMP Traps
The web server is responsible for sending passive check results to Nagios
Let us know if you need further information on these methods.
thank you Box! That's what I was looking for: Passive mode, can I have more info on this method please?
Re: Nagios to monitor Event Queue on Web Server
Posted: Mon Feb 16, 2015 7:56 pm
by Box293
Here is a guide on NRDP:
http://assets.nagios.com/downloads/nagi ... erview.pdf
Here's some guides on NSCA:
http://assets.nagios.com/downloads/nagi ... ios-XI.pdf
http://sites.box293.com/nagios/guides/nsca
Have a read of this material and get back to us with any more questions.
SNMP Traps ... lets cross this bridge if you want to go over it as it can get pretty complicated.