Contact question

Hi,

i have 100+ host and 1000+ service. Everything is working fine. I group the hosts and configure some service checks so they apply to a father group with all the host.

Example:

Host_group A
-Host_groupA1
-Host_groupA2

Service example{

host_group A
…}

Ok, the group A2 use a new template where i defined a new contact.
Is there a way that the contact receives all the notifications related to those hosts and the services running in them or i need to redefine all the services to that hostgroup?

The goal is that a new contact get all the notifications (host/services) for just a group of host without redefining the services.
Now, the contact only receive the Host related notifications.

Thanks

did you define a different contact for the servcies?
I seem to remeber a thread here on the forums where it was discussed that services should inherit contacts from the host if not redefined… but i’m not sure and can’t find it in the docs now…

Yep. It’s found in Object Inheritance http://nagios.sourceforge.net/docs/3_0/objectinheritance.html

Crappy copy-and-paste

Implied Inheritance

Normally you have to either explicitly specify the value of a required variable in an object definition or inherit it from a template. There are a few exceptions to this rule, where Nagios will assume that you want to use a value that instead comes from a related object. For example, the values of some service variables will be copied from the host the service is associated with if you don’t otherwise specify them.

The following table lists the object variables that will be implicitly inherited from related objects if you don’t explicitly specify their value in your object definition or inherit them from a template.

Object Type Object Variable Implied Source
Services contact_groups contact_groups in the associated host definition
notification_interval notification_interval in the associated host definition
notification_period notification_period in the associated host definition
Host Escalations contact_groups contact_groups in the associated host definition
notification_interval notification_interval in the associated host definition
escalation_period notification_period in the associated host definition
Service Escalations contact_groups contact_groups in the associated service definition
notification_interval notification_interval in the associated service definition
escalation_period notification_period in the associated service definition

groth

Thank you for your replies!

All the services for the host inherited from the generic-service template… and doesn’t seems to work :?

The host inherited the contact from a template, maybe i must explicitly declare the contact in the host definition for the implicity inheritance to work??

Gonna take a deep look to the documentation of object inheritance and review the config files.

Regards!