Passive service checks via NSCA and required check command defini tion

Paul L. Allen pla at softflare.com
Mon Aug 8 13:51:22 CEST 2005


Ralph.Grothe at itdz-berlin.de writes: 

> I came up with the following hack that seems to be working well,
> but I'm unsure if this was also the officially "supported" way
> since I haven't found this point being treated in the doc.

I think it's in the docs, somewhere.  But, IIRC, it's a bit of a pain to
find. 

> After having searched the libexec dir for appropiate sounding
> plug-ins I came accross
> check_dummy, which I thought was for cases like this.
> (the help screen of check_dummy wasn't too revealing about its
> intended usage, as usual)

It can be used in cases like this. 

> Thus I defined this in checkcommands.cfg 
> 
> # Placeholder for Passive Checks 
> 
> define command {
>     command_name        passive-check-pad
>     command_line        $USR1$/check_dummy 0 "won't do active
> checks"
> }

> I have the passive check feeding the Nagios FIFO every hour by a
> cronjob from the remote host. 
> 
> Looking at the Nagios webinterface everything seems to be working
> perfectly, but I have this sneaking suspicion that I missed something.

You have missed something. :) 

Turn off the cron job.  Nagios will be blissfully unaware and return OK
for the service even if the service is down.  The text of the check result
will be different, so if you look carefully you'll be able to tell that
check_dummy is returning OK rather than the passive check returning OK,
but most people just check that everything is green without reading the
text. 

At the very least you should call check_dummy with 3 rather than 0 so that
it returns an unknown state.  You may also find it useful to replace it
with a simple shell script that prints "Passive check is stale" and exits
with 3 so that you can distinguish between Unknown being returned by the
passive check and Unknown because the passive check is stale.  Again, the
fact that the check_dummy output differs from the passive check output when
the passive check is unknown will let you distinguish between the two but
life is a little simpler if the text makes it clear what the problem is. 

-- 
Paul Allen
Softflare Support 




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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