event handler enabled in config, not enabled in reality

Jeffrey Baker jwbaker at acm.org
Sat Feb 8 03:43:52 CET 2003


Hi there.  I just started using nagios.  I have one Axis
2100 network camera that crashes and needs to be rebooted
about 6 times per day.  Therefore:

define command {
  command_name camera-event
  command_line /usr/lib/nagios/plugins/eventhandlers/camera $SERVICESTATE$ 
}

define service{
        name                            generic-service2
        active_checks_enabled           1
        passive_checks_enabled          0
        parallelize_check               1
        obsess_over_service             1
        check_freshness                 0
        notifications_enabled           1
        event_handler_enabled           1 ; <= note
        flap_detection_enabled          0
        process_perf_data               1
        retain_status_information       1
        retain_nonstatus_information    1
        contact_groups                  skunks-admins
        register                        0
        }

define service{
        use                             generic-service2
        host_name                       eye
        service_description             HTTP
        event_handler                   camera-event ; <= note
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           3
        retry_check_interval            1
        notification_interval           120
        notification_period             24x7
        notification_options            w,u,c,r
        check_command                   check_http_url!/axis-cgi/jpg/image.cgi?resolution=640x480
        }

enable_event_handlers=1

So, you can see that I've tried to set this up.  The problem is,
when I start nagios, the eye/HTTP service shows up with the envent
handler disabled.  I have to enable it with a command at runtime.

[1044663511] EXTERNAL COMMAND: ENABLE_SVC_EVENT_HANDLER;eye;HTTP

I can see later that it did run:

[1044669735] SERVICE ALERT: eye;HTTP;CRITICAL;SOFT;1;Socket timeout after 10 seconds
[1044669735] SERVICE EVENT HANDLER: eye;HTTP;CRITICAL;SOFT;1;camera-event
[1044669785] SERVICE ALERT: eye;HTTP;OK;SOFT;2;HTTP ok: HTTP/1.0 200 OK - 4 second response time
[1044669785] SERVICE EVENT HANDLER: eye;HTTP;OK;SOFT;2;camera-event

What a piece of crap that camera is....

Anyway, what is wrong with my config file?  I would like the event
handler to be enabled at startup.  I don't want to have to fool with
it at runtime.

BTW, I am using Nagios from Debian unstable distribution, package
version 1.0-5.

Regards,
jwb


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com




More information about the Users mailing list