Passive Checks and state changes

Jim Avery jim at jimavery.me.uk
Fri Aug 14 13:20:33 CEST 2009


2009/8/13 Joseph L. Casale <JCasale at activenetwerx.com>:
> What am I missing, I use some passive checks for backups
> which update only when send_nsca runs on the client.
> After editing the configs and restarting nagios, only
> sometimes do they turn critical, as if it decided to perform
> the freshness check out of hours?
>
> Anyone know why this happens only sometimes and how I can prevent
> it?
>
> Thanks!
> jlc


I have a backup monitoring script which simply sends Nagios (by
send_nsca) the amount of data which has been backed-up in the last 24
hours.  If the script finds nothing, it doesn't send a check to Nagios
at all so I use freshness checking to alert that nothing has been
received from the backup check.  The template I use for the service
checks looks like this:

define service {
  name                  nsca-tsm_nightly_vol
  is_volatile           1
  check_freshness       1
  active_checks_enabled 0
  max_check_attempts    1
  freshness_threshold   129600  ; 36 hours
  check_command         check_nothing-tsm_nightly_vol
  servicegroups         backups
  notification_options  n
  notes                 Volume of data backed-up to TSM
  register              0
}


The command definition for "check_nothing-tsm_nightly_vol" looks like this:

# 'check_nothing-tsm_nightly_vol' command definition
define command{
        command_name    check_nothing-tsm_nightly_vol
        command_line    $USER1$/passive_timeout.sh

And the /usr/local/nagios/libexec/passive_timeout.sh script looks like this:

  #!/bin/sh
  /bin/echo "CRITICAL: No status has been received recently!
  exit 2


I hope this helps a little.

cheers,

Jim

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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