Notification Setup Question

Mark D. Nagel mnagel at willingminds.com
Thu Sep 8 02:55:16 CEST 2005


Paul Singh wrote:

> I'm trying to setup Nagios in such a way that I can be notified by
> email and pager during business hours. During the night, I'd like a 
> notice to go to my email account first and then get escalated to my 
> pager if the problem still exists 30 minutes later.
>
> Can someone get me started in the right direction?
>
The trick is to define the multiple contact  instances in different
roles partitioned by time of day.  Then you define one contactgroup
listing all your roles and the right contact will be selected for the
current time of day.  Some untested potential examples follow, but your
specific needs will likely be different.

define contact {
    service_notification_period   daytime_hours
    host_notification_period   daytime_hours
    contact   daytime_paul
    alias   Paul - Daytime
    email   paul at foo.com
    pager   paulpager at foo.com
    service_notification_commands       notify-by-email,notify-by-epager
    host_notification_commands         
host-notify-by-email,host-notify-by-epager
}

define contact {
    service_notification_period   nighttime_hours
    host_notification_period   nighttime_hours
    contact   nighttime_paul
    alias   Paul - Nighttime
    email   paul at foo.com
    service_notification_commands       notify-by-email
    host_notification_commands          host-notify-by-email
}

define contact {
    service_notification_period   nighttime_hours
    host_notification_period   nighttime_hours
    contact   nighttime_paul_pager
    alias   Paul - Nighttime
    pager   paulpager at foo.com
    service_notification_commands       notify-by-epager
    host_notification_commands          host-notify-by-epager
}

define contactgroup {
    contactgroup_name   paul
    alias Paul 24x7
    members daytime_paul,nighttime_paul
}

define hostgroupescalation {
    hostgroup_name              some-host-group
    first_notification          2
    last_notification           3
    notification_interval       15
    contact_groups              paul,nighttime_paul_pager
}

This should do it -- email and page during the day, email only at night
with an escalation to paging via a contact that only does paging at
night.  When daytime hits, the escalation will only contact 'paul',
which includes paging as well during that time.

Mark

-- 
Mark D. Nagel, CCIE #3177 <mnagel at willingminds.com>
Principal Consultant, Willing Minds LLC (http://www.willingminds.com)
tel: 714-630-4772, fax: 714-630-4773, fwd: 680979 



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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