Event handler to propogate state

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
sahina
Posts: 4
Joined: Tue Jan 28, 2014 4:34 am

Event handler to propogate state

Post by sahina »

Hi all!

We have a requirement and wanted to get opinion from the experts out here.

Cluster
--- Host
------ Disk (Each of the physical disk is configured as a separate service, attached to the host)

Now if one of the disk state changes to Critical, the Host state should change to Warning or Critical depending on the number of disks on that host. And if host state changes to Critical, the cluster state should change to Critical, again depending on the state of other hosts (only if all hosts are CRITICAL).

We were thinking of achieving this via event handlers
So on Disk event handler, check the other disks' state and then use external command queue to change host state if required..and so on.

Is this the right way to handle this requirement? We looked at check_host_cluster plugin, but the question is if the disk and host check plugins are passive checks (NSCA based), how do we change state of another service when one of the dependent service state changes?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Event handler to propogate state

Post by tmcdonald »

You can maybe look at BPI:

http://assets.nagios.com/downloads/nagi ... _Addon.pdf
http://www.youtube.com/watch?v=JCKcaE2eq9M

It's a relatively new addition to XI so if you have any feedback we'd love to hear it.
Former Nagios employee
sahina
Posts: 4
Joined: Tue Jan 28, 2014 4:34 am

Re: Event handler to propogate state

Post by sahina »

Thanks for the pointer. The BPI addon does look promising. Unfortunately we are not using the Nagios XI, but the open source version of Nagios (3.x).

Is there anything else that could fit our requirements?
Btw, does the BPI addon periodically poll the state of the dependent services?

thanks!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Event handler to propogate state

Post by tmcdonald »

Sorry, didn't bother to check if this was Core vs XI.

The method you described should work. You could also make a custom plugin that checks the status of the disks and assign that plugin to the host, then do the same sort of thing to the cluster.
Former Nagios employee
Locked