Fix SNMP alerts in case of bad port number provided by the check

This commit is contained in:
Alfredo Cardigliano 2023-06-06 10:35:43 +00:00 committed by Nicolo Maio
parent 69e7bcd2e4
commit 488f80f476
9 changed files with 134 additions and 17 deletions

View file

@ -728,7 +728,7 @@ function driver:listSeries(schema, tags_filter, wildcard_tags, start_time)
local full_path = driver.schema_get_full_path(schema, tags_filter)
local last_update = ntop.rrd_lastupdate(full_path)
if last_update ~= nil and last_update >= start_time then
if last_update ~= nil and last_update >= start_time and (end_time == nil or last_update <= end_time ) then
return {tags_filter}
else
return nil