shinken-solutions / shinken

Flexible and scalable monitoring framework
http://www.shinken-monitoring.org
GNU Affero General Public License v3.0
1.14k stars 335 forks source link

"use template" directive is not taken into account in timeperiods, and reload raises no error #2003

Open eduault opened 3 years ago

eduault commented 3 years ago

"use template" directive is apparently not taken into account in a timeperiod. And the "/etc/init.d/shinken reload" command raises no configuration error about this directive. Shinken version : 2.4.3

I defined this configuration :

define timeperiod {
    timeperiod_name         L-S_8H-22H_-_D_10H-20H    
    name         L-S_8H-22H_-_D_10H-20H
    monday                  08:00-22:00
    tuesday                 08:00-22:00
    wednesday               08:00-22:00
    thursday                08:00-22:00
    friday                  08:00-22:00
    saturday                08:00-22:00
    sunday                  10:00-20:00
}

define timeperiod {
    timeperiod_name     myapplication-timeperiod
    use                 L-S_8H-22H_-_D_10H-20H
}

define host {
       host_name               myhost
..
       check_period            myapplication-timeperiod
}

But the active checks on this host are not executed during the L-S8H-22H-_D_10H-20H timeperiod.

The behavior (reload and execution of active checks) is the same without the "name" directive in the template timeperiod.