Fix alert_endpoints_utils.lua error 'attempt to compare number with string' #2795

This commit is contained in:
Alfredo Cardigliano 2019-09-04 12:44:53 +02:00
parent 5e914130af
commit 14c0338b64

View file

@ -128,7 +128,7 @@ function alert_endpoints.dispatchNotification(message, json_message)
loadModules()
for _, m in ipairs(modules) do
if message.alert_severity >= alertSeverity(m.severity) then
if tonumber(message.alert_severity) >= alertSeverity(m.severity) then
ntop.rpushCache(m.export_queue, json_message, MAX_NUM_PER_MODULE_QUEUED_ALERTS)
end
end