Windows nagios fix

This commit is contained in:
Simone Mainardi 2017-05-22 11:52:18 +02:00
parent 2ce030c704
commit 1e4b0636ed
3 changed files with 9 additions and 6 deletions

View file

@ -504,6 +504,13 @@ function areAlertsEnabled()
(ntop.getPref("ntopng.prefs.disable_alerts_generation") ~= "1"))
end
function hasNagiosSupport()
if prefs == nil then
prefs = ntop.getPrefs()
end
return prefs.nagios_nsca_host ~= nil
end
function firstToUpper(str)
str = tostring(str)
return (str:gsub("^%l", string.upper))