Skip to content
Permalink
Browse files

Fix Shinken ignoring check_period

For passively checked hosts, Shinken ignores the check_period attribute
when freshness period is over ... as of it, hosts are notified as DOWN.
  • Loading branch information...
Fred MOHIER
Fred MOHIER committed Dec 13, 2013
1 parent d5b436f commit e441a65cb2ad1b3a0e8198441416dfca95bc5d78
Showing with 7 additions and 4 deletions.
  1. +7 −4 shinken/objects/schedulingitem.py
@@ -195,10 +195,13 @@ def do_check_freshness(self):
if cls.global_check_freshness:
if self.check_freshness and self.freshness_threshold != 0:
if self.last_state_update < now - (self.freshness_threshold + cls.additional_freshness_latency):
# Raise a log
self.raise_freshness_log_entry(int(now-self.last_state_update), int(now-self.freshness_threshold))
# And a new check
return self.launch_check(now)
# logger.warning("Check freshness for (%s / %s / %s) ..." % (self.host_name, self.passive_checks_enabled, self.active_checks_enabled))
if self.passive_checks_enabled and not self.active_checks_enabled:
if self.check_period is None or self.check_period.is_time_valid(now):
# Raise a log
self.raise_freshness_log_entry(int(now-self.last_state_update), int(now-self.freshness_threshold))
# And a new check
return self.launch_check(now)
return None


0 comments on commit e441a65

Please sign in to comment.
You can’t perform that action at this time.