Solved

Contacts on host no longer inherited to services

  • 23 June 2023
  • 5 replies
  • 105 views

Badge +1

Hello,

On my Centreon deployment the inheritance of contacts and contact groups defined in host definitions no longer works on services connected to the host. Now we get messages only when the host goes down or up and no longer receive messages for the services associated with that host.

I'm not sure when this problem started appearing. I’ve patched Centreon to the latest 22.10.9 version and the problem persists. A workaround is setting “Inherit only contacts/contacts group from host“ to “yes” but this would require me to set that bit for every service associated with the host and can't be configured in the service template.

“Contacts & Contact groups method calculation” is still set to “Vertical Inheritance Only” and changing options does not resolve the issue.

Any help would be much appreciated!

icon

Best answer by joelvdvoort 18 August 2023, 16:29

View original

5 replies

Userlevel 1
Badge +4

Hello,

Only with these infos It seems difficult to understand why it’s not working.

 

Maybe try to go to cumulative inheritance again, and add a contact to the parent service template, then deploy your configuration once again :

https://docs.centreon.com/docs/22.10/alerts-notifications/notif-configuration/#contacts--contact-groups-method-calculation

 

Userlevel 1
Badge +4

To find out why centengine considers that it should not notify your service, it is also possible to pass its logs for NOTIFICATION to DEBUG :

 

 

Hope this can help.

Badge +1

Hello,

Only with these infos It seems difficult to understand why it’s not working.

 

Maybe try to go to cumulative inheritance again, and add a contact to the parent service template, then deploy your configuration once again :

https://docs.centreon.com/docs/22.10/alerts-notifications/notif-configuration/#contacts--contact-groups-method-calculation

 

That will probably work but that would require me to significantly alter the way our host and service templates are setup. We have multiple teams (contact groups) managing the same type OS and hardware vendors. For that to work we would have to duplicate host and service templates so that it contains the right contact group in the service template. I would rather have contact inheritance working again on the host level. That used to work without a hitch, but now it doesn't anymore.

Badge +1

To find out why centengine considers that it should not notify your service, it is also possible to pass its logs for NOTIFICATION to DEBUG :

 

 

Hope this can help.

I've tried this. The poller logs the following lines:

 

[2023-08-10T15:53:15.423+02:00] [events] [info] [386] SERVICE ALERT: <redacted_hostname> ;disk-space;CRITICAL;HARD;3;CRITICAL : (>90%) /boot: 33% /: 99%used(25941467136B/26193215488B)
[2023-08-10T15:53:15.424+02:00] [notifications] [info] [386] This contact shouldn't be notified from services.
[2023-08-10T15:53:15.424+02:00] [notifications] [info] [386] This contact shouldn't be notified from services.
[2023-08-10T15:53:15.424+02:00] [notifications] [info] [386] SERVICE NOTIFICATION: Customer_Notification;<redacted_hostname>;disk-space;CRITICAL;service-notify-customer;CRITICAL : (>90%) /boot: 33% /: 99%used(25941467136B/26193215488B);

Customer_notification is calculated from the “generic-service” which is the parent or leaf for all service templates (depending how you look at it). This is not expected behavior. I have defined contactgroups on the host level and they should be calculated as contactgroup for the underlying services as well. At least, that's how it used to work until recently.

Badge +1

We managed to make this work. It turns out that contacts and contactgroups defined on the service template level cancel out contact inheritance on the host level for the underlying services. Clearing the contacts in “generic-service” solved the inheritance problem resulting in the host's contact definitions being inherited on the underlying services.

Hopefully this helps anyone encountering the same problem.

Reply