define service with multiple contactgroups

Axel Rosenski rosenski at wave-computer.de
Mon Mar 21 20:51:15 CET 2011


Hi, 

I'd like to  create *one* service definition which I can use to alert different 
contact_groups depending on the hostgroup the server belongs to. I'd like to 
contact different teams for our windows and linuxserver. 

Below I added a short snippet of what I've done so far. As you can see I 
played around with serviceescalations but had no luck. When the service is 
critical both pager receive a notification.


My next thought is to use the generic template and create two service 
template 
snippets and change the contactgroup, but I don't like to define ecery service 
twice.
Perhaps there's a better way to achieve the desired behaviour. Any help is 
appreciated.

Regards, 
Axel 

### SNIP ### 

define contactgroup{
   contactgroup_name       pager-admin
   alias                   Pager Administration
   contactgroup_members    pager-linuxadmin, pager-windowsadmin
}

define service{
   name                             tpl-service-standard
   contact_groups                   pager-admin
   register                         0
}

define service{
   service_description              Load
   use                              tpl-service-standard
   servicegroups                    sgrp-check-standard
   check_command                    check_nrpe!check_load
   hostgroup_name                   hgrp-linux-server, hgrp-windows-server
}

define serviceescalation{
   hostgroup_name                   hgrp-linux-server
   servicegroup_name                sgrp-check-standard
   contact_groups                   pager-linuxadmin
   first_notification               1
   last_notification                2
   notification_interval            10
}

define serviceescalation{
   hostgroup_name                   hgrp-linux-server
   servicegroup_name                sgrp-check-standard
   contact_groups                   pager-linuxadmin, phone-linuxadmin
   first_notification               3
   last_notification                0
   notification_interval            10
}

define serviceescalation{
   hostgroup_name                   hgrp-windows-server
   servicegroup_name                sgrp-check-standard
   contact_groups                   pager-windowsadmin
   first_notification               1
   last_notification                2
   notification_interval            10
}

define serviceescalation{
   hostgroup_name                   hgrp-windows-server
   servicegroup_name                sgrp-check-standard
   contact_groups                   pager-windowsadmin,phone-windowsadmin
   first_notification               3
   last_notification                0
   notification_interval            10
}


-- 
Axel Rosenski
- Administration -
______________________________
Wave Computersysteme GmbH
Philipp-Reis-Str. 1-3 / 9
35440 Linden

Geschäftsführer: Carsten Kellmann
Registergericht Gießen HRB 1823

Tel.: +49 (0)6403 / 9050 8317
Fax: +49 (0)6403 / 9050 5089
mailto:rosenski at wave-computer.de
http://www.wave-computer.de


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
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