eventhandler timeout 3.0.3

Sven Nierlein sven at consol.de
Mon Oct 13 18:07:53 CEST 2008


Hi,

I noticed, that nagios ignores the event_handler_timeout completely.
This is easy to reproduce. Setup a default Nagios installation.

set the event_handler_timeout in your nagios.cfg
> event_handler_timeout=30


define a eventhandler command:
> define command {
>   command_name  sleep
>   command_line  /bin/bash -c "sleep 6000"
> }

define a test service:
> define service {
>   use                           generic-service
>   host_name                     localhost
>   service_description           test
>   check_command                 check_sleep
>   check_interval                2
>   retry_interval                1
>   max_check_attempts            5
>   event_handler                 sleep
> }

Then make sure, that the testservice fails and watch nagios doing nothing:
debug.log:
> [1223911373.176899] [001.0] [pid=9787] run_global_service_event_handler()
> [1223911373.176906] [001.0] [pid=9787] run_service_event_handler()
> [1223911373.176912] [016.1] [pid=9787] Running event handler for 
> service 'test' on host 'localhost'...
> [1223911373.176923] [064.1] [pid=9787] Making callbacks (type 11)...
> [1223911373.176936] [001.0] [pid=9787] get_raw_command_line()
> [1223911373.176943] [2320.2] [pid=9787] Raw Command Input: /bin/bash 
> -c "sleep 6000"
> [1223911373.176951] [2320.2] [pid=9787] Expanded Command Output: 
> /bin/bash -c "sleep 6000"
> [1223911373.176958] [016.2] [pid=9787] Raw service event handler 
> command line: /bin/bash -c "sleep 6000"
> [1223911373.176964] [001.0] [pid=9787] process_macros()
> [1223911373.176971] [2048.1] [pid=9787] **** BEGIN MACRO PROCESSING 
> ***********
> [1223911373.176977] [2048.1] [pid=9787] Processing: '/bin/bash -c 
> "sleep 6000"'
> [1223911373.176983] [2048.2] [pid=9787]   Processing part: '/bin/bash 
> -c "sleep 6000"'
> [1223911373.176991] [2048.2] [pid=9787]   Not currently in macro.  
> Running output (25): '/bin/bash -c "sleep 6000"'
> [1223911373.176998] [2048.1] [pid=9787]   Done.  Final output: 
> '/bin/bash -c "sleep 6000"'
> [1223911373.177004] [2048.1] [pid=9787] **** END MACRO PROCESSING 
> *************
> [1223911373.177010] [016.2] [pid=9787] Processed service event handler 
> command line: /bin/bash -c "sleep 6000"
> [1223911373.177054] [064.1] [pid=9787] Making callbacks (type 9)...
> [1223911373.177064] [001.0] [pid=9787] my_system()
> [1223911373.177070] [256.1] [pid=9787] Running command '/bin/bash -c 
> "sleep 6000"'...
> [1223911373.177110] [064.1] [pid=9787] Making callbacks (type 10)...
> [1223911373.177903] [001.0] [pid=24327] process_macros()
> [1223911373.177937] [001.0] [pid=24327] process_macros()
> [1223911373.177952] [001.0] [pid=24327] process_macros()
> [1223911373.177966] [001.0] [pid=24327] process_macros()
> [1223911373.177980] [001.0] [pid=24327] process_macros()
> [1223911373.177994] [001.0] [pid=24327] process_macros()

The expected behavior would be a nagios, which kills the sleep after 30
seconds.

Regards,
Sven

-- 
Sven Nierlein             Sven.Nierlein at consol.de
ConSol* GmbH              http://www.consol.de
Franziskanerstrasse 38    Tel.:089/45841-439
81669 Muenchen            Fax.:089/45841-115

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/




More information about the Developers mailing list