<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Marc Powell wrote:
<blockquote
 cite="midA7B0A9F02975A74A845FE85D0B95B8FA038253@misex01.ena.com"
 type="cite">
  <pre wrap="">
  </pre>
  <blockquote type="cite">
    <pre wrap="">-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:nagios-users-admin@lists.sourceforge.net">nagios-users-admin@lists.sourceforge.net</a> [<a class="moz-txt-link-freetext" href="mailto:nagios-users">mailto:nagios-users</a>-
<a class="moz-txt-link-abbreviated" href="mailto:admin@lists.sourceforge.net">admin@lists.sourceforge.net</a>] 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?

    </pre>
  </blockquote>
  <pre wrap=""><!---->
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

  </pre>
</blockquote>
<br>
Why can't it? <br>
<br>
Won't this work:<br>
<br>
1) Set up the two contacts like this: (NOTE The "options")....<br>
<br>
<tt>#WARNINGS ONLY CONTACT...<br>
define contact{<br>
        contact_name                    warning_contact<br>
        alias                           WARNINGS Only Contact<br>
        service_notification_period     24x7<br>
        host_notification_period        24x7<br>
        service_notification_options    w,r<br>
        service_notification_commands   notify-by-email,notify-by-epager<br>
        host_notification_commands      host-notify-by-email,
host-notify-by-epager<br>
        email                           <a class="moz-txt-link-abbreviated" href="mailto:warning_recipient@someplace.com">warning_recipient@someplace.com</a><br>
        pager                           <a class="moz-txt-link-abbreviated" href="mailto:warning_pager@someplace.com">warning_pager@someplace.com</a><br>
        }<br>
<br>
<br>
<br>
#CRITICAL ONLY CONTACT...<br>
define contact{<br>
        contact_name                    critical_contact<br>
        alias                           CRITICAL Only Contact<br>
        service_notification_period     24x7<br>
        host_notification_period        24x7<br>
        service_notification_options    c,r<br>
        host_notification_options       d,r<br>
        service_notification_commands   notify-by-email,notify-by-epager<br>
        host_notification_commands      host-notify-by-email,
host-notify-by-epager<br>
        email                           <a class="moz-txt-link-abbreviated" href="mailto:critical_recipient@someplace.com">critical_recipient@someplace.com</a><br>
        pager                           <a class="moz-txt-link-abbreviated" href="mailto:critical_pager@someplace.com">critical_pager@someplace.com</a><br>
        }<br>
</tt><br>
2)  Create a contactgroup that  has BOTH of these contacts in it.<br>
<tt>define contactgroup{<br>
        contactgroup_name       unix-admins<br>
        alias                   Unix Administrators<br>
        members                 warning_contact,crictical_contact<br>
        }</tt><br>
<br>
3)  Associate the new contact group "unix-admins" with the services in
question.<br>
<br>
It seems to work for us.<br>
<br>
-Emmett<br>
<br>
-- <br>
================ Examen, Inc. ================<br>
Emmett Hogan<br>
Senior UNIX Administrator<br>
<a class="moz-txt-link-abbreviated" href="mailto:emmetth@examen.com">emmetth@examen.com</a><br>
==== Outside Counsel Management Solutions ====<br>
<br>
CONFIDENTIAL - PRIVILEGED INFORMATION<br>
This e-mail may include confidential, trade secret or legally<br>
privileged information. If you are not the intended recipient,<br>
please do not read, copy, use, distribute or disclose this<br>
communication to anyone other than the intended recipient. Please<br>
notify the sender of any error in transmission or delivery and<br>
delete any misdirected e-mail from your system.<br>
</body>
</html>