summaryrefslogtreecommitdiffstats
path: root/health/health.c
diff options
context:
space:
mode:
authorEmmanuel Vasilakis <mrzammler@mm.st>2022-06-28 18:36:20 +0300
committerGitHub <noreply@github.com>2022-06-28 18:36:20 +0300
commit1fc126012f7909aeca26a8031d69891c9ee1196f (patch)
tree081a4e34d65920d4707ef5fa12d127cc9a43ae9c /health/health.c
parentaa3be2f0647ace385e5ffb475a3e145f38458e6e (diff)
Delay health until obsoletions check is complete (#13239)
* wait until obsoletions check is complete to run health * run the checks 5 minutes after agent connect time
Diffstat (limited to 'health/health.c')
-rw-r--r--health/health.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/health/health.c b/health/health.c
index 70ea0864eb..c79d43a0b9 100644
--- a/health/health.c
+++ b/health/health.c
@@ -789,6 +789,11 @@ void *health_main(void *ptr) {
host->health_delay_up_to = 0;
}
+ // wait until cleanup of obsolete charts on children is complete
+ if (host != localhost)
+ if (unlikely(host->trigger_chart_obsoletion_check == 1))
+ continue;
+
if(likely(!host->health_log_fp) && (loop == 1 || loop % cleanup_sql_every_loop == 0))
sql_health_alarm_log_cleanup(host);