Distributed Woes - Passive Check Results not being submitted to Master

Ethan Galstad nagios at nagios.org
Fri Mar 12 01:33:32 CET 2004


If you recently enabled the 'obsess_over_services' option and you've 
been using state retention, Nagios may still be using the old value 
('0') instead of the one you entered in the config file.  To fix 
this, change the 'use_retained_program_state' variable in nagios.cfg 
to 0 and restart Nagios.  

Note that individual services may suffer from the same problem, as 
there is a per-service option that allows you to enable/disable ocsp 
processing.  Depending on how you've used the templates, you could 
either set the 'retain_nonstatus_information' in the templates to be 
'0' (and then restart Nagios) or simply disable retention altogether 
(using the 'retain_state_information' variable in nagios.cfg), 
restart Nagios, and then re-enable retention.

If retention doesn't appear to be the cause of your problem, change 
your obsessive command to simply append the check result data to a 
temp file, rather than piping it to the send_nsca client.  That will 
allow you to determine whether or not the ocsp command is actually 
being executed or not.


On 11 Mar 2004 at 18:18, AJ McKee wrote:

> --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
> 
> 



Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org



-------------------------------------------------------
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