On Mon, Nov 23, 2009 at 8:18 AM, Guy Waugh <guid...@gmail.com> wrote: > Hi all, > > I currently use host and service templates to add contacts for specific > hosts and services. For example, for most of my services, only the admins > need to be notified if the service goes down. For a few (critical) services, > however, additional people need to be notified if the service goes down. I > achieve this by adding an extra service template to these critical services > -- the extra service template has a "contact_groups +critical-contacts" > directive in it. > > This works fine, except that I have to define extra services because of > this. For example, I run "check_http" service checks for a lot of hosts, but > only "check_http" service checks on some (critical) hosts need to have the > above 'critical-contacts' people notified if the HTTP service goes down. So, > I need to define one "check_http" service for all the hosts with normal > notifications and another "check_http" service for the critical HTTP > services. That's a simple example... I have a lot of contactgroups and a lot > of services, some of which are 'critical' services. > > I've recently thought that it would be much nicer to control contacts > through hostgroups and servicegroups rather than templates. Because it isn't > possible to define contacts for hostgroups and servicegroups, I tried > creating a service template and having it as part of a servicegroup, and > having the "critical-host,check_http" service be a part of the servicegroup. > Unfortunately, it didn't work (i.e. the contacts for the service template > didn't get notified when the service went down). > > Anyway, two questions: > > * Is anyone out there using hostgroups or servicegroups to control > contacts/contactgroups? If so, how? > > * Is there any other way (other than applying extra templates to > hosts/services to define extra contacts) that I can control > contacts/contactgroups like this? > > Thanks... > > ------------------------------------------------------------------------------
I set up an on-call rotation using service escalations. You could take this logic and simply add contacts to hostgroups that way. # secondary on call define serviceescalation{ hostgroup_name z-allhosts service_description .* contact_groups +secondary first_notification 2 last_notification 3 notification_interval 30 escalation_options w,u,c,r } # tertiary on call define serviceescalation{ hostgroup_name z-allhosts service_description .* contact_groups +tertiary,secondary first_notification 4 last_notification 0 notification_interval 30 escalation_options w,u,c,r } Hopefully this helps. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Nagios-users mailing list Nagios-users@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