Weirdness with remote (passive) checks. Critical on remote, OK on local?

Brian Smith bsmith at fusionbroadband.com
Tue Aug 2 23:26:53 CEST 2005


Thanks for all the help everyone, we've (finally!) resolved the issue.
Here's what was going on:

#1, permissions error on the file I was trying to dump to (doh!) so it
looked like nothing was running.

#2, submit_check_result_via_nsca was sending the following:

hostname1  Telnet  OK      TCP OK -   0.004 second response time on port
23
hostname2  Telnet  CRITICAL  TCP OK -   Connection refused or timed out

This should have been the following:

hostname1  Telnet  0      TCP OK -   0.004 second response time on port
23
hostname2  Telnet  2      TCP OK -   Connection refused or timed out


At home base, because they were strings not numbers, nagios was quietly
interpreting the OK and the Critical both as zero.


This was happening because the script submit_check_result_via_nsca was
set to append the text status rather than numeric status, or maybe
because a script to translate that text status was not being run.  In
the submit_check_result_via_nsca script:

     #  $3 = return_code (An integer that determines the state
     #       of the service check, 0=OK, 1=WARNING, 2=CRITICAL,
     #       3=UNKNOWN).
     
     [ define echocmd and other vars ]
    
     $echocmd "$1\t$2\t$3\t$4\n" | $NscaBin $NagiosHost -c $NscaCfg


... but $3 was actually the text, not the return code. Apparently you're
supposed to run the script "obsessive_svc_handler" not
"submit_check_result_via_nsca", because obsessive_svc_handler has the
code to translate the string into a number.


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
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