Make monitoring interval configurable
This commit is contained in:
parent
cba6f5be48
commit
4d51318a40
|
@ -100,6 +100,8 @@ pvc:
|
||||||
vm_shutdown_timeout: 180
|
vm_shutdown_timeout: 180
|
||||||
# keepalive_interval: Number of seconds between keepalive/status updates
|
# keepalive_interval: Number of seconds between keepalive/status updates
|
||||||
keepalive_interval: 5
|
keepalive_interval: 5
|
||||||
|
# monitoring_interval: Number of seconds between monitoring check updates
|
||||||
|
monitoring_interval: 60
|
||||||
# fence_intervals: Number of keepalive_intervals to declare a node dead and fence it
|
# fence_intervals: Number of keepalive_intervals to declare a node dead and fence it
|
||||||
fence_intervals: 6
|
fence_intervals: 6
|
||||||
# suicide_intervals: Numer of keepalive_intervals before a node considers itself dead and self-fences, 0 to disable
|
# suicide_intervals: Numer of keepalive_intervals before a node considers itself dead and self-fences, 0 to disable
|
||||||
|
|
|
@ -345,7 +345,7 @@ class MonitoringInstance(object):
|
||||||
self.run_cleanups()
|
self.run_cleanups()
|
||||||
|
|
||||||
def start_check_timer(self):
|
def start_check_timer(self):
|
||||||
check_interval = 60
|
check_interval = self.config["monitoring_interval"]
|
||||||
self.logger.out(
|
self.logger.out(
|
||||||
f"Starting monitoring check timer ({check_interval} second interval)",
|
f"Starting monitoring check timer ({check_interval} second interval)",
|
||||||
state="s",
|
state="s",
|
||||||
|
|
|
@ -246,6 +246,7 @@ def get_configuration():
|
||||||
config_intervals = {
|
config_intervals = {
|
||||||
"vm_shutdown_timeout": int(o_intervals.get("vm_shutdown_timeout", 60)),
|
"vm_shutdown_timeout": int(o_intervals.get("vm_shutdown_timeout", 60)),
|
||||||
"keepalive_interval": int(o_intervals.get("keepalive_interval", 5)),
|
"keepalive_interval": int(o_intervals.get("keepalive_interval", 5)),
|
||||||
|
"monitoring_interval": int(o_intervals.get("monitoring_interval", 60)),
|
||||||
"fence_intervals": int(o_intervals.get("fence_intervals", 6)),
|
"fence_intervals": int(o_intervals.get("fence_intervals", 6)),
|
||||||
"suicide_intervals": int(o_intervals.get("suicide_interval", 0)),
|
"suicide_intervals": int(o_intervals.get("suicide_interval", 0)),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue