normal_check_interval misbehaving?

Jason Marshall jasonm at kelman.com
Fri Feb 6 23:06:52 CET 2009


Hi all, I've been scratching my head on this one for a couple days.

I have a service defined that can only run once an hour.  If it runs much 
more often than that, the check program (which I didn't write) often steps 
on its own feet and returns a critical failure.  The service runs via NRPE 
if that matters...

Anyway, I have the normal_check_interval set to 60, and max_check_attempts 
set to 1.  So it should run once an hour, and only once even if it fails. 
But it runs every 10 minutes instead!

Here is some of my config:

define service {
         use                     active-service
         host_name               cal-map1
         service_description     active-remote-spatialsync
         check_command           check_remote_spatialsync
         contact_groups          xxxxxxxx
         normal_check_interval   60
         max_check_attempts      1
}

define command {
         command_name            check_remote_spatialsync
         command_line            $USER1$/check_nrpe -H $HOSTADDRESS$ -n -c check_spatialsync
}

[root at nagios3 etc]# ssh cal-map1
[root at cal-map1 ~]# grep check_spatialsync /usr/local/nagios/etc/nrpe.cfg
command[check_spatialsync]=/space/kaapps/sbin/probeSpatialSync

Here is the script (korn-shell wrapper) that runs:

[root at cal-map1 ~]# cat /space/kaapps/sbin/probeSpatialSync
#!/bin/ksh

date >>/usr/tmp/spatialsync.runtimes.log

HERE=$(dirname $0)
JAR_DIR=$(cd $HERE/../lib;pwd)

MONITOR_JAR=$JAR_DIR/monitor.jar

PROBE_CLS=com.kelman.monitor.SpatialSyncTester
JAVA_PATH=/usr/java/jdk1.5/bin:/apps/platform/jdk1.5/bin

PATH=$JAVA_PATH:$PATH

exec java -cp $MONITOR_JAR $PROBE_CLS $1


..........


I've checked, and the interval_length is set to 60 like I intended it to 
be:

[root at nagios3 etc]# grep interval_length nagios.cfg
interval_length=60

The wrapper that runs on the remote machine is logging the output of the 
date command and appending it to a simple log file so I can tell for sure 
how often it's being run -- every 10 minutes, like clockwork!

How come 10 minutes and not 60??

My head is hurting from all the scratching.  I suspect it's something 
stupid and tiny that I've missed, but would appreciate your help, even if 
it just points to some arcane area of the documentation.

Thanks!

---
Jason Marshall, Unix Geek, Kelman Technologies, Inc., Calgary, AB, Canada.

   From a Sun Microsystems bug report (#4102680):
     "Workaround: don't pound on the mouse like a wild monkey."

   "I have great faith in fools:
      Self confidence my friends call it."  -Edgar Allan Poe


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
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