services.cfg and notifications (wishfull thinking)

Dan Rich drich at employees.org
Tue Mar 18 19:18:14 CET 2003


Williams, P. Lane said:

> I would like to send notifications to individual contacts without creating a
> new contactgroup for services.  Such as use "contacts" instead of just
> "contact_groups".  Has anyone found where in the code this can be enabled.

I can't help you on this one, but....

> I would also like to be notified by pager and by email for some services and
> only email for other services.  The only way I see doing this is making use
> of event handlers.

I do this by having two contacts for each person, ex. drich and drich-nopage. 
The drich contact has both a pager and e-mail defined, the drich-nopage has
only the e-mail.  I use drich-nopage for services that I never want to be
paged for (like performance monitoring on our web server and printers) and
drich for services where I want pages.

define contact {
        name                            systems
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    c,r
        host_notification_options       d,r
        service_notification_commands   notify-by-email,notify-by-qpage
        host_notification_commands      host-notify-by-email,host-notify-by-qpage
        register                        0
}
define contact {
        name                            systems-nopage
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,u,r
        service_notification_commands   notify-by-email
        host_notification_commands      host-notify-by-email
        register                        0
}
define contact{
        use                             systems
        contact_name                    drich
        alias                           Dan Rich
        email                           drich at pdi.com
        pager                           drich
        }
define contact{
        use                             systems-nopage
        contact_name                    drich-nopage
        alias                           Dan Rich
        email                           drich at pdi.com
        }



-- 
Dan Rich <drich at employees.org> |   http://www.employees.org/~drich/
                               |  "Step up to red alert!"  "Are you sure, sir?
                               |   It means changing the bulb in the sign..."
                               |          - Red Dwarf (BBC)



-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
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