Make monitoring interval configurable

This commit is contained in:
Joshua Boniface 2023-09-15 16:54:51 -04:00
parent cba6f5be48
commit 4d51318a40
3 changed files with 4 additions and 1 deletions

View File

@ -100,6 +100,8 @@ pvc:
vm_shutdown_timeout: 180
# keepalive_interval: Number of seconds between keepalive/status updates
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: 6
# suicide_intervals: Numer of keepalive_intervals before a node considers itself dead and self-fences, 0 to disable

View File

@ -345,7 +345,7 @@ class MonitoringInstance(object):
self.run_cleanups()
def start_check_timer(self):
check_interval = 60
check_interval = self.config["monitoring_interval"]
self.logger.out(
f"Starting monitoring check timer ({check_interval} second interval)",
state="s",

View File

@ -246,6 +246,7 @@ def get_configuration():
config_intervals = {
"vm_shutdown_timeout": int(o_intervals.get("vm_shutdown_timeout", 60)),
"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)),
"suicide_intervals": int(o_intervals.get("suicide_interval", 0)),
}