service notifications sent to only host admins

Gloria Gaynor missgaynor at gmail.com
Thu Jan 3 17:08:33 CET 2008


Let's say I have two hosts "alfa" and "bravo" and two separate contact
groups belonging to the hosts:

 define contactgroup {
   contactgroup_name alfa-admins
   members foo,bar
 }

 define contactgroup {
   contactgroup_name beta-admins
   members baz
 }

 define host {
   host_name alfa
   contact_groups alfa-admins
 }

 define host {
   host_name bravo
   contact_groups bravo-admins
 }

I'd like to define a service that's monitored on both hosts but
notifies only the contact groups belonging to the host.

 define service {
   service_description the_service
   check_command check_the_service
   host_name alfa,bravo
   contact_groups alfa,beta
 }

The example above would notify contact "baz" if the_service goes down
on "alfa". I don't want that. I know I could define two separate
services or define some custom script as the contact's
service_notification_command that filters out the messages that don't
"belong" to the contact but both of these solutions seem pretty ugly
to me. What's the preferred way to do this?

Thanks!

Gloria

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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