Once you get into object tricks, some things won't work for specific reasons (like inheritance).mastermindg wrote:I ended up creating custom services for the host. However, this seems like a counter-intuitive way to go about doing what needs to be done here. Is there no way to override the default behavior and have services inherit a hosts notification settings?
OK so I did some testing to make sure I understand what is going on in core.
It appears as though a service will inherit the notification_period from the host object, as long as no notification_period has been defined in the service or any templates the service is using. Your notification_period in the host object would need to exclude the timeperiod you don't want checked.
So they key here is that because you are using a common service, you need to make sure that common service does not define the notification_period in the service or any templates the service is using, meaning ALL of your host objects must have that correctly defined.
https://support.nagios.com/kb/article.php?id=487
It looks like I was confusing check_period with timeperiod. For clarity, the service does not inherit the check_period from the host object.Box293 wrote:A service cannot inherit the time period from a host because the documentation states that the "check_period" directive is required.