@cryptotaxi247 / netdata-1 / commits / 7ad1d5b7d

Fix reading health "enable" from the configuration (#13894)

Stelios Fragkakis committed Oct 27, 2022 at 00:31 UTC 7ad1d5b7d08a7a730c7d629d15ee7f2c985b8e55
2 files changed +17
database/rrdhost.c
+1
@@ -849,6 +849,7 @@ int rrd_init(char *hostname, struct rrdhost_system_info *system_info) {
849 goto unittest;
850 }
851
852 + health_init();
853 rrdpush_init();
854
855 if(default_rrd_memory_mode == RRD_MEMORY_MODE_DBENGINE || storage_tiers > 1 || rrdpush_receiver_needs_dbengine()) {
health/health.c
+16
@@ -135,6 +135,22 @@ static void health_silencers_init(void) {
135 }
136 }
137
138 +/**
139 + * Health Init
140 + *
141 + * Initialize the health thread.
142 + */
143 +void health_init(void) {
144 + debug(D_HEALTH, "Health configuration initializing");
145 +
146 + if(!(default_health_enabled = (unsigned int)config_get_boolean(CONFIG_SECTION_HEALTH, "enabled", default_health_enabled))) {
147 + debug(D_HEALTH, "Health is disabled.");
148 + return;
149 + }
150 +
151 + health_silencers_init();
152 +}
153 +
154 // ----------------------------------------------------------------------------
155 // re-load health configuration
156