ochp problem

Ethan Galstad nagios at nagios.org
Wed Oct 3 02:50:44 CEST 2007


I found the problem and am posting a patch to CVS momentarily... give 
the CVS code a try when you get a chance to make sure it fixed the problem.

Olivier JAN wrote:
> Hello list,
> 
> I've already posted something about that which is not solved at the 
> moment. This is now on nagios 3.0b4.
> Below is two excerpts of my debug file. In first part, this is how a 
> ochp is handled by nagios. We can see it finish with a null in the 
> command. In second part is the same for ocsp and it finish with a macro 
> correctly loaded.
> 
> Can someone explain what can be wrong with my ochp processing. The macro 
> seems to be well processed but the final output is not transmitted to 
> the commmand.
> 
> Thanks
> 
> obsessive compulsive host processor command line
> 
> [1191227014.189078] [2320.2] [pid=27028] Input: 
> $USER2$/submit_check_result $HOSTNAME$ $HOSTSTATEID$ '$HOSTOUTPUT$'
> [1191227014.189091] [2320.2] [pid=27028] Output: 
> $USER2$/submit_check_result $HOSTNAME$ $HOSTSTATEID$ '$HOSTOUTPUT$'
> [1191227014.189103] [016.2] [pid=27028] Raw obsessive compulsive host 
> processor command line: $USER2$/submit_check_result $HOSTNAME$ 
> $HOSTSTATEID$ '$HOSTOUTPUT$'
> [1191227014.189116] [001.0] [pid=27028] process_macros()
> [1191227014.189128] [2048.1] [pid=27028] **** BEGIN MACRO PROCESSING 
> ***********
> [1191227014.189141] [2048.1] [pid=27028] Processing: 
> '$USER2$/submit_check_result $HOSTNAME$ $HOSTSTATEID$ '$HOSTOUTPUT$''
> [1191227014.189153] [2048.2] [pid=27028]   Processing part: ''
> [1191227014.189166] [2048.2] [pid=27028]   Not currently in macro.  
> Running output (0): ''
> [1191227014.189178] [2048.2] [pid=27028]   Processing part: 'USER2'
> [1191227014.189195] [2048.2] [pid=27028]   Cleaned macro.  Running 
> output (39): '/usr/local/nagios/libexec/eventhandlers'
> [1191227014.189208] [2048.2] [pid=27028]   Just finished macro.  Running 
> output (39): '/usr/local/nagios/libexec/eventhandlers'
> [1191227014.189220] [2048.2] [pid=27028]   Processing part: 
> '/submit_check_result '
> [1191227014.189234] [2048.2] [pid=27028]   Not currently in macro.  
> Running output (60): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result '
> [1191227014.189247] [2048.2] [pid=27028]   Processing part: 'HOSTNAME'
> [1191227014.189260] [2048.2] [pid=27028]   Cleaned macro.  Running 
> output (68): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U3RIPC85'
> [1191227014.189273] [2048.2] [pid=27028]   Just finished macro.  Running 
> output (68): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U3RIPC85'
> [1191227014.189286] [2048.2] [pid=27028]   Processing part: ' '
> [1191227014.189327] [2048.2] [pid=27028]   Not currently in macro.  
> Running output (69): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U3RIPC85 '
> [1191227014.189341] [2048.2] [pid=27028]   Processing part: 'HOSTSTATEID'
> [1191227014.189355] [2048.2] [pid=27028]   Cleaned macro.  Running 
> output (70): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U3RIPC85 1'
> [1191227014.189368] [2048.2] [pid=27028]   Just finished macro.  Running 
> output (70): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U3RIPC85 1'
> [1191227014.189381] [2048.2] [pid=27028]   Processing part: ' ''
> [1191227014.189394] [2048.2] [pid=27028]   Not currently in macro.  
> Running output (72): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U3RIPC85 1 ''
> [1191227014.189407] [2048.2] [pid=27028]   Processing part: 'HOSTOUTPUT'
> [1191227014.189422] [2048.2] [pid=27028]   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%'
> [1191227014.189435] [2048.2] [pid=27028]   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%'
> [1191227014.189448] [2048.2] [pid=27028]   Processing part: '''
> [1191227014.189462] [2048.2] [pid=27028]   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%''
> [1191227014.189474] [2048.1] [pid=27028]   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%''
> [1191227014.189487] [2048.1] [pid=27028] **** END MACRO PROCESSING 
> *************
> [1191227014.189499] [016.2] [pid=27028] Processed obsessive compulsive 
> host processor command line: (null)
> [1191227014.189512] [001.0] [pid=27028] my_system()
> 
> obsessive compulsive service processor command line
> 
> [1191227094.178126] [001.0] [pid=27028] get_raw_command_line()
> [1191227094.178141] [2320.2] [pid=27028] Input: 
> $USER2$/submit_check_result $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATEID$ 
> '$SERVICEOUTPUT$|$SERVICEPERFDATA$'
> [1191227094.178155] [2320.2] [pid=27028] Output: 
> $USER2$/submit_check_result $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATEID$ 
> '$SERVICEOUTPUT$|$SERVICEPERFDATA$'
> [1191227094.178167] [016.2] [pid=27028] Raw obsessive compulsive service 
> processor command line: $USER2$/submit_check_result $HOSTNAME$ 
> '$SERVICEDESC$' $SERVICESTATEID$ '$SERVICEOUTPUT$|$SERVICEPERFDATA$'
> [1191227094.178180] [001.0] [pid=27028] process_macros()
> [1191227094.178192] [2048.1] [pid=27028] **** BEGIN MACRO PROCESSING 
> ***********
> [1191227094.178204] [2048.1] [pid=27028] Processing: 
> '$USER2$/submit_check_result $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATEID$ 
> '$SERVICEOUTPUT$|$SERVICEPERFDATA$''
> [1191227094.178217] [2048.2] [pid=27028]   Processing part: ''
> [1191227094.178230] [2048.2] [pid=27028]   Not currently in macro.  
> Running output (0): ''
> [1191227094.178242] [2048.2] [pid=27028]   Processing part: 'USER2'
> [1191227094.178259] [2048.2] [pid=27028]   Cleaned macro.  Running 
> output (39): '/usr/local/nagios/libexec/eventhandlers'
> [1191227094.178272] [2048.2] [pid=27028]   Just finished macro.  Running 
> output (39): '/usr/local/nagios/libexec/eventhandlers'
> [1191227094.178284] [2048.2] [pid=27028]   Processing part: 
> '/submit_check_result '
> [1191227094.178297] [2048.2] [pid=27028]   Not currently in macro.  
> Running output (60): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result '
> [1191227094.178310] [2048.2] [pid=27028]   Processing part: 'HOSTNAME'
> [1191227094.178324] [2048.2] [pid=27028]   Cleaned macro.  Running 
> output (68): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U5VENU58'
> [1191227094.178336] [2048.2] [pid=27028]   Just finished macro.  Running 
> output (68): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U5VENU58'
> [1191227094.178349] [2048.2] [pid=27028]   Processing part: ' ''
> [1191227094.178362] [2048.2] [pid=27028]   Not currently in macro.  
> Running output (70): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U5VENU58 ''
> [1191227094.178375] [2048.2] [pid=27028]   Processing part: 'SERVICEDESC'
> [1191227094.178388] [2048.2] [pid=27028]   Cleaned macro.  Running 
> output (79): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U5VENU58 
> 'PROC:NSCA'
> [1191227094.178401] [2048.2] [pid=27028]   Just finished macro.  Running 
> output (79): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U5VENU58 
> 'PROC:NSCA'
> [1191227094.178414] [2048.2] [pid=27028]   Processing part: '' '
> [1191227094.178427] [2048.2] [pid=27028]   Not currently in macro.  
> Running output (81): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U5VENU58 
> 'PROC:NSCA' '
> [1191227094.178440] [2048.2] [pid=27028]   Processing part: 'SERVICESTATEID'
> [1191227094.178453] [2048.2] [pid=27028]   Cleaned macro.  Running 
> output (82): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U5VENU58 
> 'PROC:NSCA' 0'
> [1191227094.178466] [2048.2] [pid=27028]   Just finished macro.  Running 
> output (82): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U5VENU58 
> 'PROC:NSCA' 0'
> [1191227094.178479] [2048.2] [pid=27028]   Processing part: ' ''
> [1191227094.178492] [2048.2] [pid=27028]   Not currently in macro.  
> Running output (84): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U5VENU58 
> 'PROC:NSCA' 0 ''
> [1191227094.178505] [2048.2] [pid=27028]   Processing part: 'SERVICEOUTPUT'
> [1191227094.178519] [2048.2] [pid=27028]   Cleaned macro.  Running 
> output (126): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U5VENU58 
> 'PROC:NSCA' 0 'PROCS OK: 1 process with command name nsca'
> [1191227094.178533] [2048.2] [pid=27028]   Just finished macro.  Running 
> output (126): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U5VENU58 
> 'PROC:NSCA' 0 'PROCS OK: 1 process with command name nsca'
> [1191227094.178545] [2048.2] [pid=27028]   Processing part: '|'
> [1191227094.178575] [2048.2] [pid=27028]   Not currently in macro.  
> Running output (127): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U5VENU58 
> 'PROC:NSCA' 0 'PROCS OK: 1 process with command name nsca|'
> [1191227094.178589] [2048.2] [pid=27028]   Processing part: 
> 'SERVICEPERFDATA'
> [1191227094.178602] [2048.2] [pid=27028]   Processing part: '''
> [1191227094.178615] [2048.2] [pid=27028]   Not currently in macro.  
> Running output (128): 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U5VENU58 
> 'PROC:NSCA' 0 'PROCS OK: 1 process with command name nsca|''
> [1191227094.178628] [2048.1] [pid=27028]   Done.  Final output: 
> '/usr/local/nagios/libexec/eventhandlers/submit_check_result U5VENU58 
> 'PROC:NSCA' 0 'PROCS OK: 1 process with command name nsca|''
> [1191227094.178641] [2048.1] [pid=27028] **** END MACRO PROCESSING 
> *************
> [1191227094.178653] [016.2] [pid=27028] Processed obsessive compulsive 
> service processor command line: 
> /usr/local/nagios/libexec/eventhandlers/submit_check_result U5VENU58 
> 'PROC:NSCA' 0 'PROCS OK: 1 process with command name nsca|'
> [1191227094.178666] [001.0] [pid=27028] my_system()
> 


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/




More information about the Developers mailing list