mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Implements a module to handle all periodic activity issues
This commit is contained in:
parent
f155bb9ba2
commit
c1743aaf40
3 changed files with 53 additions and 19 deletions
|
|
@ -4,6 +4,9 @@
|
|||
-- This file contains the user_script constats
|
||||
|
||||
local periodic_activities_utils = {}
|
||||
local ts_utils = require "ts_utils_core"
|
||||
|
||||
-- ###########################################
|
||||
|
||||
-- Returns true when at least one of the interfaces (system interface included)
|
||||
-- has issues with one of its periodic activities
|
||||
|
|
@ -18,6 +21,8 @@ local function stats_have_degraded_performance(stats)
|
|||
end
|
||||
end
|
||||
|
||||
-- ###########################################
|
||||
|
||||
-- Check if any of the executing periodic activities is slow and showing
|
||||
-- degraded performance
|
||||
function periodic_activities_utils.have_degraded_performance()
|
||||
|
|
@ -43,4 +48,34 @@ function periodic_activities_utils.have_degraded_performance()
|
|||
return res
|
||||
end
|
||||
|
||||
-- ###########################################
|
||||
|
||||
function periodic_activities_utils.list_degraded_performance_issues()
|
||||
local issues = {
|
||||
["not_executed"] =
|
||||
{
|
||||
i18n_title = "internals.script_not_executed",
|
||||
i18n_descr = "internals.script_not_executed_descr"
|
||||
},
|
||||
["is_slow"] =
|
||||
{
|
||||
i18n_title = "internals.script_deadline_exceeded",
|
||||
i18n_descr = "internals.script_deadline_exceeded_descr",
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ts_utils.getDriverName() == "rrd" then
|
||||
issues["rrd_slow"] =
|
||||
{
|
||||
i18n_title = "internals.slow_rrd_writes",
|
||||
i18n_descr = "internals.slow_rrd_writes_descr"
|
||||
}
|
||||
end
|
||||
|
||||
return issues
|
||||
end
|
||||
|
||||
-- ###########################################
|
||||
|
||||
return periodic_activities_utils
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue