mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Added TCP Packets issues check (#6899)
This commit is contained in:
parent
45dcb77182
commit
b6692f3fea
15 changed files with 726 additions and 2 deletions
|
|
@ -0,0 +1,54 @@
|
|||
--
|
||||
-- (C) 2019-22 - ntop.org
|
||||
--
|
||||
|
||||
-- ##############################################
|
||||
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/check_templates/?.lua;" .. package.path
|
||||
|
||||
-- Import the classes library.
|
||||
local classes = require "classes"
|
||||
-- Make sure to import the Superclass!
|
||||
local check_template = require "check_template"
|
||||
|
||||
-- ##############################################
|
||||
|
||||
local multi_threshold_cross = classes.class(check_template)
|
||||
|
||||
-- ##############################################
|
||||
|
||||
multi_threshold_cross.meta = {
|
||||
}
|
||||
|
||||
-- ##############################################
|
||||
|
||||
-- @brief Prepare an instance of the template
|
||||
-- @return A table with the template built
|
||||
function multi_threshold_cross:init(check)
|
||||
-- Call the parent constructor
|
||||
self.super:init(check)
|
||||
end
|
||||
|
||||
-- #######################################################
|
||||
|
||||
function multi_threshold_cross:parseConfig(conf)
|
||||
return true, conf
|
||||
end
|
||||
|
||||
-- #######################################################
|
||||
|
||||
function multi_threshold_cross:describeConfig(hooks_conf)
|
||||
local configured_threshold = hooks_conf.all.script_conf
|
||||
local msg = ''
|
||||
|
||||
for field, value in pairs(configured_threshold) do
|
||||
msg = msg .. i18n(field) .. ": " .. value.threshold .. "%, "
|
||||
end
|
||||
|
||||
return msg
|
||||
end
|
||||
|
||||
-- #######################################################
|
||||
|
||||
return multi_threshold_cross
|
||||
Loading…
Add table
Add a link
Reference in a new issue