Closed julianbrost closed 10 years ago
notification_period inheritance happens in naemon/xodtemplate.c:3497
This actually seems to be pretty simple. I'm about to test it with my installation and if everything works fine, I'll submit a pull request.
I would add the same inheritance for check_interval
, check_period
and retry_interval
. Are there any other attributes where this might be useful?
i guess thats it. According to http://www.naemon.org/documentation/usersguide/objectdefinitions.html#host_definition i'd say the others don't make sense.
On 2014-08-05 16:01, Julian wrote:
This actually seems to be pretty simple. I'm about to test it with my installation and if everything works fine, I'll submit a pull request.
I would add the same inheritance for
check_interval
,check_period
andretry_interval
. Are there any other attributes where this might be useful?
Please don't do it for check_interval and retry_interval. check_period makes a lot of sense, but having different intervals on hosts and services also does, and currently check_interval defaults to 5 and retry_interval to 1. Changing it so these parameters are inherited by the hosts may break people's existing setups.
/Andreas
My patched version works fine so far (and my configuration got a lot simpler).
I'm not quite sure about check_interval
and retry_interval
. I can't think of a situation where one might need this, but on the other hand maybe someone thought the same when implementing this for the other three attributes. But if this would break backwards compatibility, I don't want to spend too much time on this.
So you'll probably see a pull request for check_period
and the according documentation changes in the next few days.
I just created these two pull request:
thanks
Currently only the attributes
contact_groups
,notification_interval
andnotification_period
of a service are inherited from the corresponding host, see http://www.naemon.org/documentation/usersguide/objectinheritance.html#implied_inheritanceI'd like to see the same behavior for some other attributes too, in my case I need this for
check_period
as I monitor some services on many hosts where only some are turned off at night and currently I have to duplicate the service definitions for them which seems unnecessary.Implementing this shouldn't break any existing setups as having no
check_period
specified in a service is not allowed at the moment. If you give me some hints on where to look at the source code, I'd be willing to work on a patch.