Prevent checks when Nagios loses network connectivity?

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
steveg
Posts: 2
Joined: Thu Oct 11, 2012 9:02 am

Prevent checks when Nagios loses network connectivity?

Post 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
Last edited by steveg on Fri Oct 12, 2012 8:18 am, edited 1 time in total.
User avatar
inventsekar
Posts: 37
Joined: Fri Jul 20, 2012 11:29 am

Re: Prevent checks when Nagios loses network connectivity?

Post 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...
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Prevent checks when Nagios loses network connectivity?

Post 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
steveg
Posts: 2
Joined: Thu Oct 11, 2012 9:02 am

Re: Prevent checks when Nagios loses network connectivity?

Post by steveg »

Awesome, thanks... that sounds exactly like what I want to do... I'll read up on event handlers.

Cheers :)
Locked