Alternative Notification Method
Mark Gius
mgius at createspace.com
Wed Jul 22 19:31:17 CEST 2009
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.
-Gius
Mathew Walker wrote:
> Just thinking about something here and didn't make sense. Wanted to
> make sure I was not missing something...
>
> I define a contact like in the documentation...
>
> define contact{
> contact_name jdoe
> alias John Doe
> host_notifications_enabled 1
> service_notifications_enabled 1
> service_notification_period 24x7
> host_notification_period 24x7
> service_notification_options w,u,c,r
> host_notification_options d,u,r
> service_notification_commands notify-by-email
> host_notification_commands host-notify-by-email
> email jdoe at localhost.localdomain
> <mailto:jdoe at localhost.localdomain>
> pager
> 555-5555 at pagergateway.localhost.localdomain
> <mailto:555-5555 at pagergateway.localhost.localdomain>
> address1 xxxxx.xyyy at icq.com
> <mailto:xxxxx.xyyy at icq.com>
> address2 555-555-5555
> can_submit_commands 1
> }
>
> 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.
>
> 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.
>
> Also I'm assuming I can modify this line...
> service_notification_commands notify-by-email,notify-by-address1
> For a given service so they get alerts to both locations for all alerts.
>
> If not... perhaps be able to add something like this at the individual
> service/host level...
>
> contact jdoe:notify-by-email,jdoe:notify-by-pager
>
> defaulting to email if no method is defined...
>
> --
> Mat W. - http://www.techadre.com
>
> ------------------------------------------------------------------------
> Windows Live™ SkyDrive™: Store, access, and share your photos. See
> how.
> <http://windowslive.com/Online/SkyDrive?ocid=TXT_TAGLM_WL_CS_SD_photos_072009>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090722/7642b065/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list