Fixes alerted active monitoring hosts not reported as alerted

Fixes #3904
This commit is contained in:
Simone Mainardi 2020-05-08 17:47:33 +02:00
parent 33196fdc41
commit 18bf6fa3d5
3 changed files with 30 additions and 5 deletions

View file

@ -58,12 +58,12 @@ for key, am_host in pairs(am_hosts) do
if(column_last_value == nil) then
chart = ""
end
if am_utils.hasAlerts(am_host) then
alerted = 1
else
if am_utils.hasExceededThreshold(am_host.threshold, m_info.operator, column_last_value) then
alerted = 1
else
alerted = 0
end
alerted = 0
end
if last_update and last_update.jitter and last_update.mean and (last_update.jitter > 0 or last_update.mean > 0) then