Active and Passive checks of the same service

Taylor Dondich tdondich at gmail.com
Fri Aug 22 21:45:20 CEST 2008


So a nice round-about way of doing it would be to disable active
checks on the service initially.  Then when your passive check script
detects a problem, not only does it send nagios a passive check
RESULT, but it also sends a command to enable active checks on that
service.  Then your active check script, when it determines the
problem has resolved itself, could also send nagios itself a command
to disable active checks on that service.  Fun way to do it.

Information on the commands you need, their description, and sample
shell scripts which execute them, are at:

http://www.nagios.org/developerinfo/externalcommands/commandlist.php

-- 
Taylor
Check out my Shortcut with O'Reilly Press:
Network Monitoring with Nagios:
http://oreilly.com/catalog/9780596528195/index.html



On Fri, Aug 22, 2008 at 12:07 PM, Douglas K. Rand
<rand at meridian-enviro.com> wrote:
> I'm trying to find a way to have a passive check of a service suffice
> as an active check of the same service. We are using Nagios 2.9.
>
> We have lots of filesystems we check via SNMP for both block and inode
> usage, and doing active checks for all of these overwhelms our
> server. So we run via cron a single process that goes and checks all
> these filesystems and submits them results via passive checks to
> Nagios. All this works fine.
>
> But what I'd like to do is if the passive check results in a problem
> that that'd kick the service into a SOFT problem state and then Nagios
> would re-check the service much more frequently (say every minute) up
> until max_check_attempts.
>
> My problem is that I can't seem to persuade Nagios to alter the
> scheduling of the active checks when passive checks come in. I'd like
> to have normal_check_interval set to 10 minutes, retry_check_interval
> set to 1, and have my cron that generates passive checks run every 5
> minutes. So that when everything is OK the passive checks take care of
> all the work and Nagios never fires off an active check unless the
> passive check results in a non-OK state, or the passive check fails
> for some reason.
>
> But regardless of how many passive check results are seen by the
> server, it always keeps scheduling and firing off those active checks
> regardless.
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> 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
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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