summaryrefslogtreecommitdiffstats
path: root/health
diff options
context:
space:
mode:
authorStelios Fragkakis <52996999+stelfrag@users.noreply.github.com>2022-10-27 00:31:36 +0300
committerGitHub <noreply@github.com>2022-10-27 00:31:36 +0300
commit7ad1d5b7d08a7a730c7d629d15ee7f2c985b8e55 (patch)
treeb6bcb8da0d7d0d9d503800856f898592384e8ae2 /health
parente4cc55d8cbe979fd332a47a6c6104605b71f2b96 (diff)
Fix reading health "enable" from the configuration (#13894)
Diffstat (limited to 'health')
-rw-r--r--health/health.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/health/health.c b/health/health.c
index bc3d77ff8d..46743e4094 100644
--- a/health/health.c
+++ b/health/health.c
@@ -135,6 +135,22 @@ static void health_silencers_init(void) {
}
}
+/**
+ * Health Init
+ *
+ * Initialize the health thread.
+ */
+void health_init(void) {
+ debug(D_HEALTH, "Health configuration initializing");
+
+ if(!(default_health_enabled = (unsigned int)config_get_boolean(CONFIG_SECTION_HEALTH, "enabled", default_health_enabled))) {
+ debug(D_HEALTH, "Health is disabled.");
+ return;
+ }
+
+ health_silencers_init();
+}
+
// ----------------------------------------------------------------------------
// re-load health configuration