From 707f48980cd230ac9887f378abb555315507b5a0 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Mon, 25 May 2020 20:07:35 +0200 Subject: [PATCH] M #-: Refresh counter when host is on error --- src/monitor/src/monitor/HostMonitorManager.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/monitor/src/monitor/HostMonitorManager.cc b/src/monitor/src/monitor/HostMonitorManager.cc index c1f5eb90c3..38464414cf 100644 --- a/src/monitor/src/monitor/HostMonitorManager.cc +++ b/src/monitor/src/monitor/HostMonitorManager.cc @@ -551,14 +551,16 @@ void HostMonitorManager::error_monitor(int oid, const string& msg) return; } - host->monitor_in_progress(false); - if (host->state() == Host::OFFLINE) { // Host is offline, we shouldn't receive monitoring return; } + host->monitor_in_progress(false); + + host->last_monitored(time(nullptr)); + ostringstream oss; oss << Host::state_to_str(Host::ERROR) << " " << msg;