nagios 3.0b3 ochp problem

Olivier JAN ojan at expertise-online.net
Thu Sep 27 17:52:06 CEST 2007


Thanks Ethan for the reply.

Yes it works when manually submitted. 1 data packet(s) sent to host
successfully and i can see the result of the external command in central
web interface with good timestamp. I can trace the connection on both hosts
and all is fine. Also to be said, the submit_check_result is also used by
the ocsp command and works well with it.


Olivier


"Ethan Galstad" <nagios at nagios.org> Ecrivait:
> Olivier JAN wrote:
>> Activating the debug option gives me the following output
>> 
> [snip]
>> 
>> the final output seems to be good but nothing is transmitted to central
>> nagios. Manually transmitting the final output is working.
>> 
>> Olivier Jan
>> 
>> 
>> "Olivier JAN" <ojan at expertise-online.net> Ecrivait:
>>> Hi list,
>>>
>>> Im' setting up a distributed monitoring with nagios 3.0b3. All is
working
>>> well with oscp. Each time i check a service, central server is notified
>> of
>>> the check result with the oscp command i defined.
>>>
>>> The problem is that i can't have this working for ochp and the settings
>> are
>>> quite the same as oscp. Here they are :
>>>
>>> in nagios.cfg
>>> obsess_over_hosts=1 
>>> ochp_command=submit_host_check_result
>>>
>>> in template generic-host
>>> obsess_over_host 1
>>>
>>> a command is defined
>>> # 'submit_host_check_result' command definition
>>> define command{
>>>         command_name    submit_host_check_result
>>>         command_line    $USER2$/submit_check_result $HOSTNAME$
>>> $HOSTSTATEID$ '$HOSTOUTPUT$'
>>>         }
>>>
>>> and finally the submit_check_result script
>>>
>>> printfcmd="/usr/bin/printf"
>>>
>>> NscaBin="/usr/local/nagios/libexec/send_nsca"
>>> NscaCfg="/usr/local/nagios/etc/send_nsca.cfg"
>>> NagiosHost="10.176.77.60"
>>>
>>> # Fire the data off to the NSCA daemon using the send_nsca script
>>> $printfcmd "%s\t%s\t%s" "$1" "$2" "$3"  | $NscaBin $NagiosHost -c
>>> $NscaCfg
>>>
>>> All paths and rights have been carefully checked and seems ok. Calling
>> the
>>> script with paramaters manually works
>>>
>>> ./submit_check_result U3RIPC85 0 'OK'
>>>
>>> The passive host check result is received on the central and this is
>>> reflected in web interface.
>>> EXTERNAL COMMAND: PROCESS_HOST_CHECK_RESULT;U3RIPC85;0;OK
>>>
>>> But this doesn't work when i force a reschedule of the host or on
normal
>>> check, central doesn't get notified.
>>> I tried to activate nagios debug but can't see anything with it.
>>>
>>> So guys, is there's anything i forget ? Where can i trace what's going
on
>>> when i force a host check. See if ochp is called or not... Or is it
just
>> a
>>> bug ? Any advice or solution anyone ?
>>>
>>>
>>> Nice day for all
>>>
>>>
>>> Olivier Jan
> 
> It looks like there might be a problem in the 
> submit_check_result_script.  Does it work if you run it manually like so?
> 
> /usr/local/nagios/libexec/eventhandlers/submit_check_result U3RIPC85 1
> 'CRITICAL - 10.176.77.85: Host unreachable @ 10.176.77.57. rta nan, lost
> 100%'
> 
> Check the system log on the remote host to see if the NSCA daemon is 
> reporting errors when you try to send the passive host check.
> 
> 
> Ethan Galstad,
> Nagios Developer
> ---
> Email: nagios at nagios.org
> Website: http://www.nagios.org
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
> 
> 




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/




More information about the Developers mailing list