Add safety check on threshold

This commit is contained in:
Alfredo Cardigliano 2021-05-03 18:15:23 +02:00
parent ab0b442608
commit 813277e203

View file

@ -72,7 +72,7 @@ function syslog_utils.handle_event(message, host, priority, level_threshold)
traceError(TRACE_NORMAL, TRACE_CONSOLE, "[host="..host.."]")
-- Discard info messages
if level <= level_threshold then
if level_threshold and level <= level_threshold then
local entity = alerts_api.hostAlertEntity(host, 0)