<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.3315.2870" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=203445723-03122002>OK,
got it!</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=203445723-03122002>I
didn't got that I could play with both service_notification_options and
notification_options;</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=203445723-03122002>The
solution is so to put :</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=203445723-03122002>notification_options w,u,c,r</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=203445723-03122002>in
service definition</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=203445723-03122002>and </SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=203445723-03122002>service_notification_options c,r
</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=203445723-03122002>in
contact definition;</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=203445723-03122002></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=203445723-03122002>Thanks!</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=203445723-03122002> </SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma><FONT
size=2>-----Messa<SPAN class=203445723-03122002><FONT color=#0000ff
face=Arial><FONT color=#000000 face=Tahoma>g</FONT></FONT></SPAN>e
d'origine-----<BR><B>De :</B> nagios-users-admin@lists.sourceforge.net
[mailto:nagios-users-admin@lists.sourceforge.net]<B>De la part de</B> Carroll,
Jim P [Contractor]<BR><B>Envoyé :</B> mardi 3 décembre 2002
18:55<BR><B>À :</B> 'Matthieu Parisot';
nagios-users@lists.sourceforge.net<BR><B>Objet :</B> RE: [Nagios-users]
Notifications<BR><BR></FONT></DIV></FONT>
<DIV><SPAN class=725194517-03122002><FONT color=#000080 face="Comic Sans MS"
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 color=#000080 face="Comic Sans MS"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=725194517-03122002><FONT color=#000080 face="Comic Sans MS"
size=2>Basically you have to create separate contacts/contactgroups.
E.g.,</FONT></SPAN></DIV>
<DIV><SPAN class=725194517-03122002><FONT color=#000080 face="Comic Sans MS"
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 color=#000000
face="Courier New" size=2>jcarro10@sprintspectrum.com</FONT></A><BR><FONT
face="Courier New" size=2>
}<BR></FONT></SPAN></DIV>
<DIV><SPAN class=725194517-03122002><FONT color=#000080 face="Comic Sans MS"
size=2><FONT color=#000000 face="Courier New">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 color=#000080 face="Comic Sans MS"
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 color=#000080 face="Comic Sans MS"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=725194517-03122002><FONT color=#000080 face="Comic Sans MS"
size=2><FONT color=#000000 face="Courier New">pager-devunix:
:include:/home/pager/oncall/DEVUNIX</FONT><BR></FONT></SPAN></DIV>
<DIV><SPAN class=725194517-03122002><FONT color=#000080 face="Comic Sans MS"
size=2>which in turn resolves to the actual e-mail address for the
pager.</FONT></SPAN></DIV>
<DIV><SPAN class=725194517-03122002><FONT color=#000080 face="Comic Sans MS"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=725194517-03122002><FONT color=#000080 face="Comic Sans MS"
size=2>(I have a script which modifies the DEVUNIX file through a simple
menu.)</FONT></SPAN></DIV>
<DIV><SPAN class=725194517-03122002><FONT color=#000080 face="Comic Sans MS"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=725194517-03122002><FONT color=#000080 face="Comic Sans MS"
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 color=#000080 face="Comic Sans MS"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=725194517-03122002><FONT color=#000080 face="Comic Sans MS"
size=2>jc</DIV></FONT></SPAN>
<DIV><SPAN class=725194517-03122002><FONT color=#000080 face="Comic Sans MS"
size=2> </DIV></FONT></SPAN>
<BLOCKQUOTE dir=ltr
style="BORDER-LEFT: #000080 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px">
<DIV align=left class=OutlookMessageHeader dir=ltr><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></BLOCKQUOTE></BODY></HTML>