we are currently experiencing some problems in Icinga when we want to remove the timeperiods from an object.
In Icinga Director we have defined a few templates for our timeperiods that set the check_period attribute (e.g. 5x9). If we want to apply a timperiod to a host we just import this template and we then can see the changes in the database (column check_timeperiod_object_id has a new value). However, if we remove this template again from the host the table does not seem to adopt and still have the old value.
Is this some kind of a bug or are we doing something wrong?
That’s a known bug with Icinga 2’s DB IDO backend, where config hashes do not differ and as such no update event is created. I’m not sure whether this problem will be addresses any time soon though.
We came up with an idea as a workaround and would like to know what you think of it.
Basically we want to attach our 7x24 timeperiod to the base-ping template. That means if we would delete e.g. 5x9 for a host the check_period would automatically switch again to 7x24 (which is defined in base-ping).
Is this a good approach or are there better alternatives?
we switched now to the basic-ping 7x24 timeperiod and are defining the timeperiods on all hosts seperatly - thanks this works well.
But while adding this solution i came accross the fact that it is not possible to add more then 1 timeperiod to a hosts.
Is there any solution to put more than 1 timeperiod per host/service?
we need to accomplish the following solution:
Host A is defined as be monitored 5x9 but also has the timeperiod vacation_berlin and a special which could be 7x24_october_second_week