Using event handler in Nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
yunushaikh
Posts: 176
Joined: Sat Jun 20, 2015 9:04 pm

Using event handler in Nagios

Post by yunushaikh »

Hello Experts,

I have two servers (192.168.0.1 and 192.168.0.2) on which tomcat service runs tomcat service name is 'tomcat7'

At a time only 1 server has the service in start state.

I need Nagios to monitor both the services. As one service will always be stopped I dont want notification alerts to be recieved until the service is started on one server.

If the service stops on first server then I want Nagios to check if service is started on another server.
and if service is not started then I should get an alert

Is there any possible way to do this using event handler?
Please suggest
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Using event handler in Nagios

Post by hsmith »

yunushaikh wrote:Hello Experts,

I have two servers (192.168.0.1 and 192.168.0.2) on which tomcat service runs tomcat service name is 'tomcat7'

At a time only 1 server has the service in start state.

I need Nagios to monitor both the services. As one service will always be stopped I dont want notification alerts to be recieved until the service is started on one server.

If the service stops on first server then I want Nagios to check if service is started on another server.
and if service is not started then I should get an alert

Is there any possible way to do this using event handler?
Please suggest
Hi yunushaikh,

You could do this using a combination of event handlers and the negate plugin(this document is for XI, but the same ideas still apply for Core).
Former Nagios Employee.
me.
Locked