diff options
Diffstat (limited to 'src/health.c')
-rw-r--r-- | src/health.c | 15 |
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; |