Forcing recovery notifications to email only

Benjamin Krein benk at aweber.com
Fri Jul 27 19:40:11 CEST 2007


For the sake of others who may care...

I fixed this by making the *-recovery contacts the default contacts
which get added to the admins contactgroup.  These contacts get
notifications for [d|c],[u|r] for hosts/services.  In addition, I only
make paging contacts for those who are on pager duty and also add them
to the admins contactgroup.  The paging contacts only get notifications
for [d|c] for hosts/services.

Ben

Benjamin Krein wrote:
> I have setup my contacts file such that each contact has 3 definitions.
> The entire contacts file is generated by an external script that pulls
> from a DB so that we can rotate pager duty.  The following contact
> definitions are setup for each contact:
> 
> 1. Default contact (may be either email-only or email + epager depending
> on where the person is in the rotation)
> 
> define contact{
>    use                              tpl_dev_contacts
>    contact_name                     benk
>    alias                            Ben Krein
>    contactgroups                    admins
>    service_notification_commands    notify-by-email, notify-by-epager
>    host_notification_commands       host-notify-by-email,
> host-notify-by-epager
>    host_notification_options        d
>    service_notification_options     c
>    email                            benk at example.com
>    pager                            1234567890 at cellphone.com
> }
> 
> 2. Contact for email-only notifications
> 
> define contact{
>    use                              tpl_dev_contacts
>    contact_name                     benk-email
>    alias                            Ben Krein (email)
>    contactgroups                    admins-email
>    service_notification_commands    notify-by-email
>    host_notification_commands       host-notify-by-email
>    host_notification_options        d
>    service_notification_options     c
>    email                            benk at example.com
> }
> 
> 3. Recovery contact (recoveries should only go to email)
> 
> define contact{
>    use                              tpl_dev_contacts
>    contact_name                     benk-recovery
>    alias                            Ben Krein (recovery)
>    contactgroups                    admins, admins-email
>    host_notification_options        r
>    service_notification_options     r
>    service_notification_commands    notify-by-email
>    host_notification_commands       host-notify-by-email
>    email                            benk at example.com
> }
> 
> However, when Nagios runs & recovers a service/host, the following is
> displayed in the nagios.log & no notifications are sent for the recovery:
> 
> -----
> [1185479942] Warning: Host recovery notification option for contact
> 'benk-recovery' doesn't make any sense - specify down and/or unreachable
> options as well
> [1185479942] Warning: Service recovery notification option for contact
> 'benk-recovery' doesn't make any sense - specify critical and/or warning
> options as well
> -----
> 
> How can I make Nagios only send recoveries to email?
> 
> Ben
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> 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


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
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