From 60ab581db96fbbaa0a607ddd490c068d55495897 Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Wed, 16 Mar 2022 13:24:47 +0100 Subject: [PATCH] set last_update broker_*_status the broker status is usually called when the object changes, so lets update the last_update attribute as well. This addresses an issue where last_update does not get updated when a downtime ends. --- src/naemon/broker.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/naemon/broker.c b/src/naemon/broker.c index a1b950c4..04b124f7 100644 --- a/src/naemon/broker.c +++ b/src/naemon/broker.c @@ -460,6 +460,7 @@ void broker_host_status(int type, int flags, int attr, host *hst) ds.flags = flags; ds.attr = attr; get_broker_timestamp(&ds.timestamp); + hst->last_update = ds.timestamp.tv_sec; ds.object_ptr = (void *)hst; @@ -483,6 +484,7 @@ void broker_service_status(int type, int flags, int attr, service *svc) ds.flags = flags; ds.attr = attr; get_broker_timestamp(&ds.timestamp); + svc->last_update = ds.timestamp.tv_sec; ds.object_ptr = (void *)svc;