Distributed Woes - Passive Check Results not being submitted to Master

Ethan Galstad nagios at nagios.org
Thu Mar 11 06:55:46 CET 2004


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.

-- BEGIN --

printfcmd="/bin/printf"

NscaBin="/usr/local/nagios/libexec/send_nsca" 
NscaCfg="/usr/local/nagios/etc/send_nsca.cfg"
NagiosHost="nagioshost"

# Fire the data off to the NSCA daemon using the send_nsca script 
$printfcmd "%s\t%s\t%s\t%s\n" "$1" "$2" "$3" "$4" | $NscaBin $NagiosHost -c $NscaCfg

-- END --





On 11 Mar 2004 at 4:27, AJ McKee wrote:

> Hi All,
> 
> Okay so its 4:30am so I may be missing something really silly here but
> here goes.
> 
> I have 2 servers, both running Nagios 1.2. One Is the master and one
> the slave. The slave host has been configured in accordance with the
> docs @ http://nagios.sourceforge.net/docs/1_0/distributed.html as has
> the master and I have used the scripts found in the Nagios source
> directory under contrib/eventhandlers (the distributed ones)
> 
> On the slave OCSP is set to 1 and the command is set up to either one
> of the following event handlers in misccommands.cfg
> 
> define command{
>         command_name    submit_check_result
>         command_line
> /usr/local/nagios/libexec/eventhandlers/submit_check_result $HOSTNAME$
> '$SERVICEDESC$' $SERVICESTATE$ '$OUTPUT$'
>         }
> define command{
>         command_name    obsessive_svc_handler
>         command_line
> /usr/local/nagios/libexec/eventhandlers/obsessive_svc_handler
> $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATE$ '$OUTPUT$'
>         }
> 
> I have used a config with both of these at one stage or another. I
> have installed NSCA and tested communicatins between both hosts. All
> fine. I have called the scripts from the slave and sent data to the
> master server and seen the information appear there no problem. So the
> scripts are fine. 
> 
> Now when I am running Nagios on the slave, it does not submit data
> back to the Master. Tcpdump show nothing, I can see anything in the
> logs on either host especially on the Master where I should see the
> passive service check data. 
> 
> So obvisouly I have done something wrong. Anyone got any ideas? Any
> hellp welcomed & valued
> 
> 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
> 



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