summaryrefslogtreecommitdiffstats
path: root/src/health.c
diff options
context:
space:
mode:
authorLennart Weller <lhw@ring0.de>2017-07-27 09:55:47 +0000
committerLennart Weller <lhw@ring0.de>2017-07-27 09:55:47 +0000
commita133c9c3b637b1dbe7b5b053f7e2572c1950cead (patch)
tree2207939a88e96bca329457f40a9d9d18ab659dc1 /src/health.c
parentNew upstream version 1.6.0+dfsg (diff)
downloadnetdata-a133c9c3b637b1dbe7b5b053f7e2572c1950cead.tar.xz
netdata-a133c9c3b637b1dbe7b5b053f7e2572c1950cead.zip
New upstream version 1.7.0+dfsgupstream/1.7.0+dfsg
Diffstat (limited to 'src/health.c')
-rw-r--r--src/health.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/health.c b/src/health.c
index 46b27db6f..cc470f81f 100644
--- a/src/health.c
+++ b/src/health.c
@@ -148,7 +148,7 @@ static inline void health_alarm_execute(RRDHOST *host, ALARM_ENTRY *ae) {
snprintfz(command_to_run, ALARM_EXEC_COMMAND_LENGTH, "exec %s '%s' '%s' '%u' '%u' '%u' '%lu' '%s' '%s' '%s' '%s' '%s' '%0.0Lf' '%0.0Lf' '%s' '%u' '%u' '%s' '%s' '%s' '%s'",
exec,
recipient,
- host->hostname,
+ host->registry_hostname,
ae->unique_id,
ae->alarm_id,
ae->alarm_event_id,
@@ -356,9 +356,16 @@ void *health_main(void *ptr) {
// detect if boottime and realtime have twice the difference
// in which case we assume the system was just waken from hibernation
- if(unlikely(now - last_now > 2 * (now_boottime - last_now_boottime)))
+ if(unlikely(now - last_now > 2 * (now_boottime - last_now_boottime))) {
apply_hibernation_delay = 1;
+ info("Postponing alarm checks for %ld seconds, due to boottime discrepancy (realtime dt: %ld, boottime dt: %ld)."
+ , hibernation_delay
+ , (long)(now - last_now)
+ , (long)(now_boottime - last_now_boottime)
+ );
+ }
+
last_now = now;
last_now_boottime = now_boottime;
@@ -374,11 +381,9 @@ void *health_main(void *ptr) {
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)."
+ info("Postponing alarm checks for %ld seconds, on host '%s'."
, hibernation_delay
, host->hostname
- , (long)(now - last_now)
- , (long)(now_boottime - last_now_boottime)
);
host->health_delay_up_to = now + hibernation_delay;