summaryrefslogtreecommitdiffstats
path: root/src/health.c
diff options
context:
space:
mode:
authorLennart Weller <lhw@ring0.de>2017-07-27 09:55:55 +0000
committerLennart Weller <lhw@ring0.de>2017-07-27 09:55:55 +0000
commit1413c8953bf9ab447967fedb6246c03afa3f788e (patch)
tree9bde7ef5a8010d08c0723badb22a24bca8926834 /src/health.c
parentRelease v. 1.6.0+dfsg-3 to Unstable (diff)
parentNew upstream version 1.7.0+dfsg (diff)
downloadnetdata-1413c8953bf9ab447967fedb6246c03afa3f788e.tar.xz
netdata-1413c8953bf9ab447967fedb6246c03afa3f788e.zip
Updated version 1.7.0+dfsg from 'upstream/1.7.0+dfsg'
with Debian dir e101ee6549c6786aab4b3f5c4f9bbb7638f17e34
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;