diff options
author | Andrew Moss <1043609+amoss@users.noreply.github.com> | 2020-02-24 12:10:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-24 12:10:10 +0100 |
commit | c6d945200f201b05c2b019fa862cdf080a39a9d4 (patch) | |
tree | f061f87ff75a898ee7de82018a2c18935ada09cf /health | |
parent | eeff346ca13af40091980d95de79ad5df50592e1 (diff) |
Merging the feature branch for the ACLK in the previous sprint. (#8179)
* ACLK connection and protocol improvements (#8139)
* Adding ACLK retry on connection failure (#8147)
* Fixed reconnect issues on the ACLK. (#8163)
* Cleaning up ACLK - part 1 (#8167)
Co-authored-by: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com>
Diffstat (limited to 'health')
-rw-r--r-- | health/health.c | 8 | ||||
-rw-r--r-- | health/health_json.c | 2 | ||||
-rw-r--r-- | health/health_log.c | 3 |
3 files changed, 11 insertions, 2 deletions
diff --git a/health/health.c b/health/health.c index 4a84ef7fca..d3e01faf1c 100644 --- a/health/health.c +++ b/health/health.c @@ -179,7 +179,9 @@ void health_reload_host(RRDHOST *host) { * Reload the host configuration for all hosts. */ void health_reload(void) { - +#ifdef ENABLE_ACLK + aclk_single_update_disable(); +#endif rrd_rdlock(); RRDHOST *host; @@ -187,6 +189,10 @@ void health_reload(void) { health_reload_host(host); rrd_unlock(); +#ifdef ENABLE_ACLK + aclk_single_update_enable(); + aclk_alarm_reload(); +#endif } // ---------------------------------------------------------------------------- diff --git a/health/health_json.c b/health/health_json.c index eae21352f1..bca6071b96 100644 --- a/health/health_json.c +++ b/health/health_json.c @@ -13,7 +13,7 @@ static inline void health_string2json(BUFFER *wb, const char *prefix, const char buffer_sprintf(wb, "%s\"%s\":null%s", prefix, label, suffix); } -static inline void health_alarm_entry2json_nolock(BUFFER *wb, ALARM_ENTRY *ae, RRDHOST *host) { +inline void health_alarm_entry2json_nolock(BUFFER *wb, ALARM_ENTRY *ae, RRDHOST *host) { buffer_sprintf(wb, "\n\t{\n" "\t\t\"hostname\": \"%s\",\n" diff --git a/health/health_log.c b/health/health_log.c index dcfb6a8d22..802923d492 100644 --- a/health/health_log.c +++ b/health/health_log.c @@ -152,6 +152,9 @@ inline void health_alarm_log_save(RRDHOST *host, ALARM_ENTRY *ae) { host->health_log_entries_written++; } } +#ifdef ENABLE_ACLK + aclk_update_alarm(host, ae); +#endif } inline ssize_t health_alarm_log_read(RRDHOST *host, FILE *fp, const char *filename) { |