Controlling contacts/contactgroups with hostgroups/servicegroups
Guy Waugh
guidosh at gmail.com
Mon Nov 23 17:31:55 CET 2009
On Mon, Nov 23, 2009 at 2:31 PM, Terry <td3201 at gmail.com> wrote:
> On Mon, Nov 23, 2009 at 8:18 AM, Guy Waugh <guidosh at 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.
>
Thanks Terry, interesting idea, and I got most of the way through setting up
a test configuration before I realised that it's not quite the right
solution for me. I'd like to be able to specify particular services on
particular hosts, and to use service escalations to do that, I'd have to set
up a service escalation for each 'critical' service for each host. If I
could specify a servicegroup instead of a hostgroup in a service escalation
definition, it would be perfect, as I could set up a 'critical' servicegroup
that included all the 'critical' services and set up a single service
escalation :)
Regards,
Guy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20091123/cd2ef279/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
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
-------------- next part --------------
_______________________________________________
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