Page 1 of 1

Prevent checks when Nagios loses network connectivity?

Posted: Thu Oct 11, 2012 9:13 am
by steveg
Hi,

We (server hosting company) are developing a new Nagios Core monitoring server to take place of our existing Nagios 2.x server. It's currently running fine, but the external server hosting company hosting our new Nagios VPS had some network/cloud issues earlier which meant it lost connectivity for about 45 minutes.

This ultimately resulted in about a thousand emails entering our support board, which took a while to clear, the support board overloading during much of the influx of notifications from Nagios.

Is there a simple way to pause Nagios checks when the Nagios server itself loses connectivity? I've used parent/child relationships to map our infrastructure as closely as possible, so I thought maybe a dummy parent (Nagios checking itself externally somehow) at the top of the tree or something? And then the checks can be disabled while Nagios detects itself as down?#

I couldn't find anything in the docs or elsewhere on the Internet, so was wondering if there was a feature of Nagios to achieve this? Or if not, some sort of dummy host trick?

Steve G

Re: Prevent checks when Nagios loses network connectivity?

Posted: Thu Oct 11, 2012 10:39 am
by inventsekar
i am not very sure of this question... but a small suggestion... I think we can "Schedule downtime for this service".. or we can design the service checks time period... i mean, "do service check only on 6am to 6pm"...something like that...

lets wait for others to reply... thanks...

Re: Prevent checks when Nagios loses network connectivity?

Posted: Thu Oct 11, 2012 1:29 pm
by mguthrie
For something like this, I would just create a check that should always succeed if you have internet connectivity, like a ping check against google.com or something. From there, you can define an event handler for that check so that if the state changes to critical, disable active checks. If it recovers, re-enable active checks. See the following docs:

Event Handlers
http://nagios.sourceforge.net/docs/3_0/ ... dlers.html
External Commands
http://old.nagios.org/developerinfo/ext ... ndlist.php

Re: Prevent checks when Nagios loses network connectivity?

Posted: Fri Oct 12, 2012 3:19 am
by steveg
Awesome, thanks... that sounds exactly like what I want to do... I'll read up on event handlers.

Cheers :)