notifications seperate for warnings, critical
Marc Powell
marc at ena.com
Mon Feb 28 21:21:57 CET 2005
> -----Original Message-----
> From: Emmett Hogan [mailto:EmmettH at Examen.com]
> Sent: Monday, February 28, 2005 2:21 PM
> To: Marc Powell
> Cc: Alan Maxwell; nagios-list
> Subject: Re: [Nagios-users] notifications seperate for warnings,
critical
>
> Marc Powell wrote:
>
>
>
>
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-
> users-
> admin at lists.sourceforge.net] 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?
>
>
>
>
> 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
>
>
>
>
> Why can't it?
>
> Won't this work:
>
> 1) Set up the two contacts like this: (NOTE The "options")....
>
> #WARNINGS ONLY CONTACT...
> define contact{
> contact_name warning_contact
> alias WARNINGS Only Contact
> service_notification_period 24x7
> host_notification_period 24x7
> service_notification_options w,r
> service_notification_commands
notify-by-email,notify-by-epager
> host_notification_commands host-notify-by-email,
host-notify-
> by-epager
> email
warning_recipient at someplace.com
> pager warning_pager at someplace.com
> }
>
>
>
> #CRITICAL ONLY CONTACT...
> define contact{
> contact_name critical_contact
> alias CRITICAL Only Contact
> service_notification_period 24x7
> host_notification_period 24x7
> service_notification_options c,r
> host_notification_options d,r
> service_notification_commands
notify-by-email,notify-by-epager
> host_notification_commands host-notify-by-email,
host-notify-
> by-epager
> email
critical_recipient at someplace.com
> pager critical_pager at someplace.com
> }
>
> 2) Create a contactgroup that has BOTH of these contacts in it.
> define contactgroup{
> contactgroup_name unix-admins
> alias Unix Administrators
> members warning_contact,crictical_contact
> }
>
> 3) Associate the new contact group "unix-admins" with the services in
> question.
>
> It seems to work for us.
You're absolutely right. I'm so used to doing creative things with
Nagios that I sometimes forget basic functionality. My apologies...
--
Marc
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
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