Hi Guy!

On Tue, 07 Jul 2009, Guy Waugh wrote:

> Hi all,
> 
> I'm trying to configure nagios 3.0.6 so that I can add contact groups to a 
> host by adding a host template to the host definition.
> 
> I have one host template called 'unix-host' that I'm using to aggregate the 
> Unix Team contacts into a template. I have another host template called 
> 'oncall-host' that I'm using to represent people on call 24x7. If a host is 
> critical enough that the on-call people should be alerted if it goes down, I 
> want to be able to add the 'oncall-host' host template as a template for the 
> critical host, have the 'unix-host' host template as another template for the 
> host, and have nagios alert both the people on call and the Unix Team admins 
> if the host goes down. The on-call people should be alerted by SMS and email 
> every 5 minutes, but the Unix Team admins are should only be alerted by email 
> every 10 minutes.
> 
> I have an email server called 'doris' that is currently down, and is 
> configured as specified below. What's happening is that the on-call people 
> are being alerted by SMS and email every 10 minutes (which is as it should 
> be), but the Unix Team admins aren't being alerted at all. If I remove the 
> 'oncall-host' template from the host definition, the Unix Team admins are 
> alerted by email as they should be.
> 
> Can anyone suggest how I might get the alerting working, and still be able to 
> just add the 'oncall-host' template as a template for a critical host? 
> Perhaps it would be better to do this with hostgroups?
> 
> Here are all my definitions... sorry if it's a bit convoluted:
> 
> Here's the host definition for the host in question:
> define host {
>         host_name                       doris
>         alias                           doris email server
>         address                         192.168.2.25
>         parents                         sw-l3-mail
>         use                             oncall-host,unix-host
>         register                        1
> }
> 
> 'unix-host' host template:
> define host {
>        name                                   unix-host
>        alias                                    Unix Team host template
>        use                                      generic-host
>        contact_groups                 +unix-admin
>        register                               0
> }
> 
> 'oncall-host' host template:
> define host {
>        name                                     oncall-host
>        alias                                    Host template for critical 
> hosts
>        use                                      generic-host
>        contact_groups                           oncall-primary
>        notification_interval                    5
>        register                                 0
> }

Adding a "+" before "oncall-primary" in oncall-host to specify that it
should be added to the list of contacts, rather than to replace it
completely, should give you what you want.

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
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

Reply via email to