Different notification methods in different timeperiods

C. Bensend benny at bennyvision.com
Wed Dec 21 05:31:47 CET 2005


> I don't think you'll be able to do this within the configs.  What you
> could do though is write a little wrapper script. Based on the time of
> day, a different $CONTACTGROUP$ would be notified.
>
> This will keep your config cleaner, but add a level of complexity.

Apologies if this has been covered, as I haven't followed this
thread from the beginning...

But wouldn't it work to define two contacts, each with the correct
*_notification_period for that method, and add them both to each
service?  Might need a contactgroup or two in there, but I'd think
it would work?

Ie:

define contact{
   contact_name                     bob-at-home
   .
   .
   service_notification_period      non-workhours
   service_notification_command     just-email-me
   .
   .
   }

define contact{
   contact_name                     bob-at-work
   .
   .
   service_notification_period      workhours
   service_notification_command     page-the-hell-out-of-me
   .
   .
   }


define contactgroup{
   contactgroup_name                split-notifications
   alias                            People who get emailed at home, paged
at work
   members                          bob-at-home,bob-at-work
   }


Benny


-- 
"As a general rule, don't solve puzzles that open portals
to Hell."                                       - Unknown




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&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