6

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.

StrangeWill
  • 541
  • 5
  • 16

1 Answers1

10

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
Zoredache
  • 128,755
  • 40
  • 271
  • 413
  • Oh geez... it's right there plain as day, let me go ahead and apply this sometime this week and verify that this does what I need, guess it's easy points for you. – StrangeWill Oct 03 '12 at 02:28
  • 3
    I wouldn't say it was easy. I spent two hours searching and reading docs after I saw you question. I thought the feature would be useful for me to. – Zoredache Oct 03 '12 at 07:27