Configure Nagios To Alert Depending On Host Group That Service Alert Originates From

So my setup:

  • Services are shared between all hosts (CPU/RAM/Disk/Services).

  • Hosts are split into two main groups: "Production" and "Development".

  • We have two contact groups: "Production" and "Development".

Lets say my development SQL server runs low on RAM, I want it to only alert those in "Development" contact group (this service is of course assigned to a host in the "Development" host group, using the shared RAM monitoring service).

I'm pretty much stumped on this... I can't configure it at the service level (they're shared there), and I can't seem to get escalations to do it for me either...

Do I need to use service groups along with escalations and bite the bullet on building that list? Or am I missing something stupidly simple?

I'm using Centreon for configuration if that helps.


If a contacts/contact_group is not defined by the service (or any of the parent objects) then the hosts contact information will be used.

So the simple answer is to simply make sure that the contacts/contacts_group variables are NOT defined for that service.

http://nagios.sourceforge.net/docs/3_0/objectinheritance.html#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

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