<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I haven't tried this myself, but you could try having a notification
command that checks for a custom object variable ($_HOSTALTNOTIFY$) and
does an if/else on the state of that variable? I'm not sure how Nagios
behaves when a $BLAH$ doesn't exist, so you may need to define it
globally as "no" or something and then override to "yes" but it could
work.<br>
<br>
-Gius<br>
<br>
Mathew Walker wrote:
<blockquote cite="mid:SNT116-W41153EDD6E64AD0568B042861B0@phx.gbl"
type="cite">
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>Just thinking about something here and didn't make sense.
Wanted to make sure I was not missing something... <br>
<br>
I define a contact like in the documentation... <br>
<br>
<font face="Courier New">define contact{<br>
contact_name jdoe<br>
alias John Doe<br>
host_notifications_enabled 1<br>
service_notifications_enabled 1<br>
service_notification_period 24x7<br>
host_notification_period 24x7<br>
service_notification_options w,u,c,r<br>
host_notification_options d,u,r<br>
service_notification_commands notify-by-email<br>
host_notification_commands host-notify-by-email<br>
email </font><a moz-do-not-send="true"
href="mailto:jdoe@localhost.localdomain"><font face="Courier New">jdoe@localhost.localdomain</font></a><br>
<font face="Courier New"> pager </font><a
moz-do-not-send="true"
href="mailto:555-5555@pagergateway.localhost.localdomain"><font
face="Courier New">555-5555@pagergateway.localhost.localdomain</font></a><br>
<font face="Courier New"> address1 </font><a
moz-do-not-send="true" href="mailto:xxxxx.xyyy@icq.com"><font
face="Courier New">xxxxx.xyyy@icq.com</font></a><br>
<font face="Courier New"> address2 555-555-5555<br>
can_submit_commands 1<br>
}</font><br>
<br>
Sure he gets email alerts just fine, but what if I wanted to make sure
the contacts got emails to his default email as well as ADDRESS1 or
PAGER for a particular service? I create a
"service_notification_command" called "notify-by-address1" which would
work, but I can only seem to specify this on the contact level so he
would get alerts to both addresses for every service he's a contact
for. <br>
<br>
I know I could alternatively create a 2nd contact and add that 2nd
contact to the particular service, I just didn't know if I'm missing
some other way to configure a contact 'method' for a given contact at a
service/host level.<br>
<br>
Also I'm assuming I can modify this line... <br>
<font face="Courier New">service_notification_commands
notify-by-email,notify-by-address1</font><br>
For a given service so they get alerts to both locations for all alerts.<br>
<br>
If not... perhaps be able to add something like this at the individual
service/host level... <br>
<br>
<font face="Courier New">contact
jdoe:notify-by-email,jdoe:notify-by-pager</font><br>
<br>
defaulting to email if no method is defined... <br>
<br>
-- <br>
Mat W. - <a moz-do-not-send="true" href="http://www.techadre.com">http://www.techadre.com</a><br>
<br>
<hr>Windows Live™ SkyDrive™: Store, access, and share your photos. <a
moz-do-not-send="true"
href="http://windowslive.com/Online/SkyDrive?ocid=TXT_TAGLM_WL_CS_SD_photos_072009"
target="_new">See how.</a>
<pre wrap="">
<hr size="4" width="90%">
------------------------------------------------------------------------------
</pre>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Nagios-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null</pre>
</blockquote>
<br>
</body>
</html>