notification_period and service escalation

Allen S. Firstenberg prisoner at addventure.com
Fri Mar 7 13:20:25 CET 2003


We have a situation that I'm having trouble finding a good solution for.

For some of our services, we do email notifications.  If the problem isn't
resolved after 30 minutes, we start paging people every 30 minutes.  Service
escalations are ideal for this.  We wish to change it so that if it is
outside certain hours, the pages occur every hour instead.

A "notification_interval" field for service escalation doesn't seem to exist
(I'm using an older version, but the latest documentation doesn't seem to
indicate it has been added.)

I've tried the following in a test (reducing the test intervals to 5 and 10
minutes):

I have two timeperiods defined "time-even" and "time-odd" which define
the even and odd hours of the day respectively.  They're long, so I won't
reprint them.

define contact{
        contact_name                    prisoner-1
        alias                           Allen "Prisoner" Firstenberg
        email                           prisoner-1 at nagios.addventure.com
        service_notification_period     time-even
        service_notification_options    w,u,c,r
        service_notification_commands   notify-by-email
        host_notification_period        time-even
        host_notification_options       d,u,r
        host_notification_commands      host-notify-by-email
}

define contact{
        contact_name                    prisoner-2
        alias                           Allen "Prisoner" Firstenberg
        email                           prisoner-2 at nagios.addventure.com
        service_notification_period     time-odd
        service_notification_options    w,u,c,r
        service_notification_commands   notify-by-email
        host_notification_period        time-odd
        host_notification_options       d,u,r
        host_notification_commands      host-notify-by-email
}

define contactgroup{
        contactgroup_name       contact-1
        alias                   All Administrators
        members                 prisoner-1
        }

define contactgroup{
        contactgroup_name       contact-2
        alias                   All Administrators
        members                 prisoner-2
        }

define service{
        name 				service-generic
        active_checks_enabled 		1
        passive_checks_enabled 		1
        parallelize_check 		1
        obsess_over_service 		1
        check_freshness 		0
        notifications_enabled 		1
        event_handler_enabled 		1
        flap_detection_enabled          1
        process_perf_data               1
        retain_status_information 	1
        retain_nonstatus_information 	1

        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

        register 0 ; DONT REGISTER THIS DEFINITION 
}



define service{
        host_name                       radar
        service_description             test
        notification_interval           5
        use                             service-generic
        contact_groups                  all-users
        check_command                   check-test
}

define serviceescalation{
        host_name                       radar
        service_description             test
        contact_groups                  contact-1
        first_notification              2
        last_notification               0
        notification_interval           5
}

define serviceescalation{
        host_name                       radar
        service_description             test
        contact_groups                  contact-2
        first_notification              2
        last_notification               0
        notification_interval           10
}


What I expected was that the contact-2 group would receive notifications no
more frequently than once every 10 minutes since its the only group valid
during the odd hours.  Instead, both groups get notifications every 5
minutes during their hour ranges (so the user notification periods work, the
mail works, and the test itself works).

The documentation _does_ say that it uses the lowest notification_interval
for overlapping escalations, so this is not entirely unexpected, just a
little odd since one of the escalations is ultimately never used half the
time.

I know I can implement this as separate _services_ that nave their own
notification_periods, but this would double the number of services we have
on the display page, which would be undesirable.

Other thoughts about how to implement this or suggestions for where to start
looking in the code to implement escalation notification_periods would be
appreciated.

I've been testing this using Nagios 1.0b5, but didn't see anything in later
documentation to indicate this has changed.

Thanks for your thoughts on this, your help, and this great system.

Allen


-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list