Distributed Woes - Passive Check Results not being submitted to Master

AJ McKee aj.mckee at nmtbmedia.com
Thu Mar 11 19:18:57 CET 2004


--snip
>The problem is likely with /bin/echo being used in the 
>submit_check_result script.  I have replaced the example in CVS to 
>use printf for better portability.  Use the following lines of code 
>in the script instead of what's posted online in the docs.  I'll 
>update the docs on the site to reflect the new code.
--/snip

Cheers Ethan,

I have changed the scripts to reflect your changes. However still no
joy. It appears that nagios is not running the ocsp defined command
after a service check has been submitted. My nagios.cfg has the
following;

obsess_over_services=1
ocsp_command=obsessive_svc_handler

In miscommands.cfg

define command{
        command_name    obsessive_svc_handler
        command_line
/usr/local/nagios/libexec/eventhandlers/obsessive_svc_handler $HOSTNAME$
'$SERVICEDESC$' $SERVICESTATE$ '$OUTPUT$'
        }


I can run the scripts with the following arguments and it posts to the
master server no problem.
$printf "www.myhost.com\tTotal Processes\t1\tHello World\n" |
/usr/local/nagios/libexec/send_nsca 212.147.141.10 -c
/usr/local/nagios/etc/send_nsca.cfg

Output on slave
1 data packet(s) sent to host successfully.

Output on Master
Mar 11 18:14:44 host01 nsca[22845]: Handling the connection...
Mar 11 18:14:44 host01 nsca[22845]: SERVICE CHECK -> Host Name:
'www.myhost.com', Service Description: 'Total Processes', Return Code:
'1', Output: 'Hello World'
Mar 11 18:14:44 host01 nsca[22845]: End of connection...
Mar 11 18:14:45 host01 nagios: EXTERNAL COMMAND:
PROCESS_SERVICE_CHECK_RESULT;www.myhost.com;Total Processes;1;Hello
World

I have followed the recommendations on
http://nagios.sourceforge.net/docs/1_0/distributed.html to set up a
simple distributed monitoring system. But to no avail. So I am lost.
Being speculative I have either fscked up or nagio is not calling the
ocsp_command. I'd say I have messed up, but there is no output on the
nagios log to confirm if the ocsp command is being run or not. 

Any advice welcome and much appricated.

Yours
AJ




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&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