diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-02-24 01:47:00 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-02-24 01:47:00 +0200 |
commit | c98acefa301f23d8c7d2857b8cde5fbb9c2326a9 (patch) | |
tree | 2f6c5594cde86de759f06ad9b9ddc8dfd1f377ba /src/health.c | |
parent | 1958a34558a2874bb771a9d92dd121f1118e45dc (diff) |
allow each netdata host to have its own thread for streaming metrics
Diffstat (limited to 'src/health.c')
-rw-r--r-- | src/health.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/health.c b/src/health.c index 9e02b5449b..2ebbe0658d 100644 --- a/src/health.c +++ b/src/health.c @@ -15,16 +15,9 @@ inline char *health_config_dir(void) { void health_init(void) { debug(D_HEALTH, "Health configuration initializing"); - if(!rrdpush_exclusive) { - if(!(default_health_enabled = config_get_boolean("health", "enabled", 1))) { - debug(D_HEALTH, "Health is disabled."); - return; - } - } - else { - info("Health is disabled - setup alarms at the central netdata."); - config_set_boolean("health", "enabled", 0); - default_health_enabled = 0; + if(!(default_health_enabled = config_get_boolean("health", "enabled", 1))) { + debug(D_HEALTH, "Health is disabled."); + return; } } @@ -32,6 +25,9 @@ void health_init(void) { // re-load health configuration void health_reload_host(RRDHOST *host) { + if(unlikely(!host->health_enabled)) + return; + char *path = health_config_dir(); // free all running alarms @@ -363,6 +359,9 @@ void *health_main(void *ptr) { RRDHOST *host; rrdhost_foreach_read(host) { + if(unlikely(!host->health_enabled)) + continue; + if(unlikely(apply_hibernation_delay)) { info("Postponing alarm checks for %ld seconds, on host '%s', due to boottime discrepancy (realtime dt: %ld, boottime dt: %ld)." |