multiple nagios monitoring that have to agree?

Andrew Cruse andrew at profitability.net
Thu Mar 30 00:09:37 CEST 2006


nagios-users-admin at lists.sourceforge.net wrote:
> I've read through the docs and distributed, failover, and
> redundant monitoring, but those didn't seem to apply.
> 
> I'm wondering if two nagios instances can be set up to
> monitor the same hosts/services and have to agree with each
> other before sending a notification?


Great question.  I've been thinking about that a bit myself, but just
haven't had time to really work on it.  My thought so far would be to do
something like this:

Create a "wrapper" plugin that can execute two (or more) "regular"
plugins and capture the return value of each.  The wrapper plugin would
then alert only if a certain combination of return values are received.
For your purposes here, the wrapper plugin would return CRITICAL only if
both "regular" plugins also return CRITICAL

For what you're trying to do, (and what I'm up to as well) your two
regular plugins would be:

1.  Whatever normal plugin you're using to check the host/service in
question
2.  check_nrpe using the same plugin as (1), but running on your second
host.

The "wrapper" plugin could be used as both a service check and a host
check, so you could make every host/service you're monitoring be checked
from two (or more) systems but only alert if all or some combination of
"check hosts" return CRITICAL.

The only drawback here is that all the alerting is still funneled
through your primary Nagios host, so if it is unavailable you get no
alerts.  But that's where failover monitoring can come in, which is
fairly well documented and would complement this setup pretty nicely.

I'm guessing the "wrapper" plugin would take only an hour or two to hack
out in Perl (Much less for someone more skilled than I)...I just haven't
had the time to devote to this particular project.  If anyone does take
the time -- let me know, I'm happy to help test.

Andrew



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list