notifications seperate for warnings, critical

Emmett Hogan EmmettH at Examen.com
Mon Feb 28 21:21:02 CET 2005


Marc Powell wrote:

>  
>
>>-----Original Message-----
>>From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
>>admin at lists.sourceforge.net] On Behalf Of Alan Maxwell
>>Sent: Monday, February 28, 2005 1:39 PM
>>To: nagios-list
>>Subject: [Nagios-users] notifications seperate for warnings, critical
>>
>>Is there a way to have one service def, have warning emails go to one
>>contact
>>and critical emails for the same service go to a different address?
>>
>>    
>>
>
>Not within nagios but it can certain be done easily enough. The
>host/service-notify-by-email commands just call external programs and
>pass them certain bits of information ($NOTIFICATIONTYPE$, $HOSTALIAS$,
>$SERVICEDESC$, $CONTACTEMAIL$, etc). A simple little script that takes
>those parameters and emails different people based on $SERVICESTATE$
>should be pretty straightforward.
>
>--
>Marc
>
>  
>

Why can't it?

Won't this work:

1) Set up the two contacts like this: (NOTE The "options")....

#WARNINGS ONLY CONTACT...
define contact{
        contact_name                    warning_contact
        alias                           WARNINGS Only Contact
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,r
        service_notification_commands   notify-by-email,notify-by-epager
        host_notification_commands      host-notify-by-email, 
host-notify-by-epager
        email                           warning_recipient at someplace.com
        pager                           warning_pager at someplace.com
        }



#CRITICAL ONLY CONTACT...
define contact{
        contact_name                    critical_contact
        alias                           CRITICAL Only Contact
        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-epager
        host_notification_commands      host-notify-by-email, 
host-notify-by-epager
        email                           critical_recipient at someplace.com
        pager                           critical_pager at someplace.com
        }

2)  Create a contactgroup that  has BOTH of these contacts in it.
define contactgroup{
        contactgroup_name       unix-admins
        alias                   Unix Administrators
        members                 warning_contact,crictical_contact
        }

3)  Associate the new contact group "unix-admins" with the services in 
question.

It seems to work for us.

-Emmett

-- 
================ Examen, Inc. ================
Emmett Hogan
Senior UNIX Administrator
emmetth at examen.com
==== Outside Counsel Management Solutions ====

CONFIDENTIAL - PRIVILEGED INFORMATION
This e-mail may include confidential, trade secret or legally
privileged information. If you are not the intended recipient,
please do not read, copy, use, distribute or disclose this
communication to anyone other than the intended recipient. Please
notify the sender of any error in transmission or delivery and
delete any misdirected e-mail from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050228/ea8997b0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EmmettH.vcf
Type: text/x-vcard
Size: 260 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050228/ea8997b0/attachment.vcf>


More information about the Users mailing list