<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>
<META content="MSHTML 5.50.4611.1300" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=725194517-03122002><FONT face="Comic Sans MS" color=#000080
size=2>I'm doing something similar here: warning/critical/recover to all
the admin e-mail accounts, but only critical/recover to the virtual
pager.</FONT></SPAN></DIV>
<DIV><SPAN class=725194517-03122002><FONT face="Comic Sans MS" color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=725194517-03122002><FONT face="Comic Sans MS" color=#000080
size=2>Basically you have to create separate contacts/contactgroups.
E.g.,</FONT></SPAN></DIV>
<DIV><SPAN class=725194517-03122002><FONT face="Comic Sans MS" color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=725194517-03122002><FONT face="Courier New" size=2>define
contact{<BR>
contact_name
jcarro10<BR>
alias
Jim Carroll<BR>
host_notification_period
24x7<BR>
service_notification_period
24x7<BR>
host_notification_options
d,r<BR>
service_notification_options
c,w,r<BR>
host_notification_commands
host-notify-by-email<BR>
service_notification_commands
notify-by-email<BR>
email
</FONT><A href="mailto:jcarro10@sprintspectrum.com"><FONT face="Courier New"
color=#000000 size=2>jcarro10@sprintspectrum.com</FONT></A><BR><FONT
face="Courier New" size=2>
}<BR></FONT></SPAN></DIV>
<DIV><SPAN class=725194517-03122002><FONT face="Comic Sans MS" color=#000080
size=2><FONT face="Courier New" color=#000000>define
contact{<BR>
contact_name
pager-devunix<BR>
alias
DEVUNIX on-call pager<BR>
host_notification_period
24x7<BR>
service_notification_period
24x7<BR>
host_notification_options
d,r<BR>
service_notification_options
c,r<BR>
host_notification_commands
host-notify-by-epager<BR>
service_notification_commands
notify-by-epager<BR>
pager
pager-devunix<BR>
}</FONT><BR></FONT></SPAN></DIV>
<DIV><SPAN class=725194517-03122002><FONT face="Comic Sans MS" color=#000080
size=2>and then the "pager-devunix" on the "pager" definition line is defined in
/etc/aliases, thusly:</FONT></SPAN></DIV>
<DIV><SPAN class=725194517-03122002><FONT face="Comic Sans MS" color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=725194517-03122002><FONT face="Comic Sans MS" color=#000080
size=2><FONT face="Courier New" color=#000000>pager-devunix:
:include:/home/pager/oncall/DEVUNIX</FONT><BR></FONT></SPAN></DIV>
<DIV><SPAN class=725194517-03122002><FONT face="Comic Sans MS" color=#000080
size=2>which in turn resolves to the actual e-mail address for the
pager.</FONT></SPAN></DIV>
<DIV><SPAN class=725194517-03122002><FONT face="Comic Sans MS" color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=725194517-03122002><FONT face="Comic Sans MS" color=#000080
size=2>(I have a script which modifies the DEVUNIX file through a simple
menu.)</FONT></SPAN></DIV>
<DIV><SPAN class=725194517-03122002><FONT face="Comic Sans MS" color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=725194517-03122002><FONT face="Comic Sans MS" color=#000080
size=2>The virtual pager info was more than you bargained for, but hopefully you
can see how I split out the e-mails from the pages.</FONT></SPAN></DIV>
<DIV><SPAN class=725194517-03122002><FONT face="Comic Sans MS" color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=725194517-03122002><FONT face="Comic Sans MS" color=#000080
size=2>jc</DIV></FONT></SPAN>
<DIV><SPAN class=725194517-03122002><FONT face="Comic Sans MS" color=#000080
size=2> </DIV></FONT></SPAN>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Matthieu Parisot
[mailto:mat@avedya.com]<BR><B>Sent:</B> Tuesday, December 03, 2002 8:49
AM<BR><B>To:</B> nagios-users@lists.sourceforge.net<BR><B>Subject:</B>
[Nagios-users] Notifications<BR><BR></FONT></DIV>
<DIV><SPAN class=258134014-03122002><FONT size=2>Hi list,</FONT></SPAN></DIV>
<DIV><SPAN class=258134014-03122002><FONT size=2>I'm using nagios-1.0b6, and
</FONT></SPAN><SPAN class=258134014-03122002><FONT size=2>I wonder if there is
a way to associate service or host status to differents contact
targets;</FONT></SPAN></DIV>
<DIV><SPAN class=258134014-03122002><FONT size=2>For exemple, I would like to
be notified by mail if the service is WARNING, UNKNOWN or CRITICAL, and by SMS
only if it's critical...</FONT></SPAN></DIV>
<DIV><SPAN class=258134014-03122002><FONT size=2>If I write a patch to nagios
to do that, will it have a chance to be integrated?</FONT></SPAN></DIV>
<DIV><SPAN class=258134014-03122002><FONT size=2>It's allready possible to do
it using event handlers, but we loose contacts, contacts groups and
pre-defined command to alert via mail or SMS,</FONT></SPAN></DIV>
<DIV><SPAN class=258134014-03122002><FONT size=2>and we are forced to
duplicate stuff. </FONT></SPAN></DIV>
<DIV><SPAN class=258134014-03122002><FONT size=2>Did I miss something
?</FONT></SPAN></DIV>
<DIV><SPAN class=258134014-03122002><FONT size=2>Thanks for your futur
answers....</FONT></SPAN></DIV>
<DIV><SPAN class=258134014-03122002><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=258134014-03122002><FONT size=2>Matthieu</FONT></SPAN></DIV>
<DIV><SPAN
class=258134014-03122002></SPAN> </DIV></BLOCKQUOTE></BODY></HTML>