shinken icon indicating copy to clipboard operation
shinken copied to clipboard

arbiter crash with timeperiod read

Open sdouce opened this issue 8 years ago • 0 comments

Hello ,

I open this concerning the error in arbiter.log :

[1464683013] TIMEPERIOD TRANSITION: dimanche4;-1;0 [1464683013] CRITICAL: [Shinken] I got an unrecoverable error. I have to exit. [1464683013] CRITICAL: [Shinken] You can get help at https://github.com/naparuba/shinken [1464683013] CRITICAL: [Shinken] If you think this is a bug, create a new ticket includingdetails mentioned in the README [1464683013] CRITICAL: [Shinken] Back trace of the error: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/shinken/daemons/arbiterdaemon.py", line 639, in main self.do_mainloop() File "/usr/lib/python2.7/site-packages/shinken/daemon.py", line 341, in do_mainloop self.do_loop_turn() File "/usr/lib/python2.7/site-packages/shinken/daemons/arbiterdaemon.py", line 675, in do_loop_turn self.run() File "/usr/lib/python2.7/site-packages/shinken/daemons/arbiterdaemon.py", line 811, in run self.check_and_log_tp_activation_change() File "/usr/lib/python2.7/site-packages/shinken/daemons/arbiterdaemon.py", line 743, in check_and_log_tp_activation_change tp.check_and_log_activation_change() File "/usr/lib/python2.7/site-packages/shinken/objects/timeperiod.py", line 224, in check_and_log_activation_change self.is_active = self.is_time_valid(now) File "/usr/lib/python2.7/site-packages/shinken/objects/timeperiod.py", line 189, in is_time_valid if dr.is_time_valid(t): File "/usr/lib/python2.7/site-packages/shinken/daterange.py", line 178, in is_time_valid if self.is_time_day_valid(t): File "/usr/lib/python2.7/site-packages/shinken/daterange.py", line 207, in is_time_day_valid (start_time, end_time) = self.get_start_and_end_time(t) File "/usr/lib/python2.7/site-packages/shinken/daterange.py", line 573, in get_start_and_end_time start_time = get_start_of_day(self.syear, month_start_id, day_start) File "/usr/lib/python2.7/site-packages/shinken/util.py", line 219, in get_start_of_day start_time_epoch = time.mktime(start_time) TypeError: an integer is required

This problem come from my configuration file timeperiod.cfg from icinga where i have configured:

define timeperiod{
        timeperiod_name dimanche5
        alias           dimanche5
        sunday 5        00:00-24:00
}

To me it mean that we can have 5 sunday in a month , like may 2016 for example . Am i Wrong to use it like this or is there another one solution ?

sdouce avatar May 31 '16 09:05 sdouce