nagios 3.0b3 ochp problem

Olivier JAN ojan at expertise-online.net
Thu Sep 27 11:57:13 CEST 2007


Activating the debug option gives me the following output

[1190886551.165209] [016.2] [pid=22578] Parsing check output...
[1190886551.165224] [016.2] [pid=22578] Short Output: CRITICAL -
10.176.77.85: Host unreachable @ 10.176.77.57. rta nan, lost 100%
[1190886551.165237] [016.2] [pid=22578] Long Output:  NULL
[1190886551.165249] [016.2] [pid=22578] Perf Data:   
rta=0.000ms;3000.000;5000.000;0; pl=100%;80;100;;
[1190886551.165261] [001.0] [pid=22578] process_host_check_result_3x()
[1190886551.165273] [016.1] [pid=22578] HOST: U3RIPC85, ATTEMPT=1/10, CHECK
TYPE=ACTIVE, STATE TYPE=HARD, OLD STATE=1, NEW STATE=1
[1190886551.165291] [016.1] [pid=22578] Host was DOWN/UNREACHABLE.
[1190886551.165303] [016.1] [pid=22578] Host is still DOWN/UNREACHABLE.
[1190886551.165315] [001.0] [pid=22578] determine_host_reachability()
[1190886551.165327] [016.2] [pid=22578] Determining state of host
'U3RIPC85': current state=1
[1190886551.165340] [016.2] [pid=22578] At least one parent (HPSWITCH) is
up, so host is DOWN.
[1190886551.165353] [016.1] [pid=22578] Pre-handle_host_state() Host:
U3RIPC85, Attempt=1/10, Type=HARD, Final State=1
[1190886551.165366] [001.0] [pid=22578] handle_host_state()
[1190886551.165400] [001.0] [pid=22578]
obsessive_compulsive_host_check_processor()
[1190886551.165480] [001.0] [pid=22578] process_macros()
[1190886551.165495] [2048.1] [pid=22578] **** BEGIN MACRO PROCESSING
***********
[1190886551.165508] [2048.1] [pid=22578] Processing:
'http://10.176.77.57/nagios/cgi-bin/extinfo.cgi?type=1&host=$HOSTNAME$'
[1190886551.165521] [2048.2] [pid=22578]   Processing part:
'http://10.176.77.57/nagios/cgi-bin/extinfo.cgi?type=1&host='
[1190886551.165535] [2048.2] [pid=22578]   Not currently in macro.  Running
output (59): 'http://10.176.77.57/nagios/cgi-bin/extinfo.cgi?type=1&host='
[1190886551.165547] [2048.2] [pid=22578]   Processing part: 'HOSTNAME'
[1190886551.165580] [2048.2] [pid=22578]   Uncleaned macro.  Running output
(67): 'http://10.176.77.57/nagios/cgi-bin/extinfo.cgi?type=1&host=U3RIPC85'
[1190886551.165595] [2048.2] [pid=22578]   Just finished macro.  Running
output (67):
'http://10.176.77.57/nagios/cgi-bin/extinfo.cgi?type=1&host=U3RIPC85'
[1190886551.165608] [2048.1] [pid=22578]   Done.  Final output:
'http://10.176.77.57/nagios/cgi-bin/extinfo.cgi?type=1&host=U3RIPC85'
[1190886551.165620] [2048.1] [pid=22578] **** END MACRO PROCESSING
*************
[1190886551.165686] [001.0] [pid=22578] get_raw_command_line()
[1190886551.165701] [2320.2] [pid=22578] Input: $USER2$/submit_check_result
$HOSTNAME$ $HOSTSTATEID$ '$HOSTOUTPUT$'
[1190886551.165714] [2320.2] [pid=22578] Output:
$USER2$/submit_check_result $HOSTNAME$ $HOSTSTATEID$ '$HOSTOUTPUT$'
[1190886551.165727] [016.2] [pid=22578] Raw obsessive compulsive host
processor command line: $USER2$/submit_check_result $HOSTNAME$
$HOSTSTATEID$ '$HOSTOUTPUT$'
[1190886551.165739] [001.0] [pid=22578] process_macros()
[1190886551.165751] [2048.1] [pid=22578] **** BEGIN MACRO PROCESSING
***********
[1190886551.165763] [2048.1] [pid=22578] Processing:
'$USER2$/submit_check_result $HOSTNAME$ $HOSTSTATEID$ '$HOSTOUTPUT$''
[1190886551.165776] [2048.2] [pid=22578]   Processing part: ''
[1190886551.165789] [2048.2] [pid=22578]   Not currently in macro.  Running
output (0): ''
[1190886551.165801] [2048.2] [pid=22578]   Processing part: 'USER2'
[1190886551.165818] [2048.2] [pid=22578]   Cleaned macro.  Running output
(39): '/usr/local/nagios/libexec/eventhandlers'
[1190886551.165850] [2048.2] [pid=22578]   Just finished macro.  Running
output (39): '/usr/local/nagios/libexec/eventhandlers'
[1190886551.165864] [2048.2] [pid=22578]   Processing part:
'/submit_check_result '
[1190886551.165877] [2048.2] [pid=22578]   Not currently in macro.  Running
output (60): '/usr/local/nagios/libexec/eventhandlers/submit_check_result '
[1190886551.165890] [2048.2] [pid=22578]   Processing part: 'HOSTNAME'
[1190886551.165904] [2048.2] [pid=22578]   Cleaned macro.  Running output
(68): '/usr/local/nagios/libexec/eventhandlers/submit_check_result
U3RIPC85'
[1190886551.165916] [2048.2] [pid=22578]   Just finished macro.  Running
output (68): '/usr/local/nagios/libexec/eventhandlers/submit_check_result
U3RIPC85'
[1190886551.165929] [2048.2] [pid=22578]   Processing part: ' '
[1190886551.165942] [2048.2] [pid=22578]   Not currently in macro.  Running
output (69): '/usr/local/nagios/libexec/eventhandlers/submit_check_result
U3RIPC85 '
[1190886551.165955] [2048.2] [pid=22578]   Processing part: 'HOSTSTATEID'
[1190886551.165968] [2048.2] [pid=22578]   Cleaned macro.  Running output
(70): '/usr/local/nagios/libexec/eventhandlers/submit_check_result U3RIPC85
1'
[1190886551.165981] [2048.2] [pid=22578]   Just finished macro.  Running
output (70): '/usr/local/nagios/libexec/eventhandlers/submit_check_result
U3RIPC85 1'
[1190886551.165994] [2048.2] [pid=22578]   Processing part: ' ''
[1190886551.166007] [2048.2] [pid=22578]   Not currently in macro.  Running
output (72): '/usr/local/nagios/libexec/eventhandlers/submit_check_result
U3RIPC85 1 ''
[1190886551.166019] [2048.2] [pid=22578]   Processing part: 'HOSTOUTPUT'
[1190886551.166035] [2048.2] [pid=22578]   Cleaned macro.  Running output
(148): '/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%'
[1190886551.166048] [2048.2] [pid=22578]   Just finished macro.  Running
output (148): '/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%'
[1190886551.166061] [2048.2] [pid=22578]   Processing part: '''
[1190886551.166074] [2048.2] [pid=22578]   Not currently in macro.  Running
output (149): '/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%''
[1190886551.166087] [2048.1] [pid=22578]   Done.  Final output:
'/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%''
[1190886551.166116] [2048.1] [pid=22578] **** END MACRO PROCESSING
*************
[1190886551.166130] [016.2] [pid=22578] Processed obsessive compulsive host
processor command line: (null)
[1190886551.166143] [001.0] [pid=22578] my_system()
[1190886551.166177] [032.0] [pid=22578] ** Host Notification Attempt **
Host: 'U3RIPC85', Type: 0, Current State: 1, Last Notification: Thu Jan  1
01:00:00 1970
[1190886551.166223] [001.0] [pid=22578] check_host_notification_viability()

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
>
-------------------------------------------------------------------------------------------------------------------------------------------------------
> Contact me if you're interested to take part in nagios-fr.org, the
> "soonreadytobelaunch" french nagios community. You should at least read
and
> write french ;-)
>
-------------------------------------------------------------------------------------------------------------------------------------------------------
> 
> 
> 
> 
> 
> 
> 
> 
> 

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