mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 00:40:10 +00:00
Added delayed scripts that are executed with minimal time drift to avoid all scripts to be executed at the same time and thus cause load spikes
This commit is contained in:
parent
fc0e204803
commit
fcaa071acb
27 changed files with 72 additions and 37 deletions
30
scripts/callbacks/hourly-delayed/system/system_checks.lua
Normal file
30
scripts/callbacks/hourly-delayed/system/system_checks.lua
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
--
|
||||
-- (C) 2019-22 - ntop.org
|
||||
--
|
||||
|
||||
local dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
|
||||
local checks = require "checks"
|
||||
|
||||
-- #################################################################
|
||||
-- Just like for local_network_checks.lua, here periodic system
|
||||
-- checks are executed with the right granularity
|
||||
-- #################################################################
|
||||
|
||||
local checks_var = {
|
||||
ifid = nil,
|
||||
system_ts_enabled = nil,
|
||||
system_config = nil,
|
||||
available_modules = nil,
|
||||
configset = nil,
|
||||
do_benchmark = false,
|
||||
do_print_benchmark = false
|
||||
}
|
||||
|
||||
local granularity = "hour"
|
||||
local do_trace = false
|
||||
|
||||
-- #################################################################
|
||||
|
||||
checks.systemChecks(granularity, checks_var, do_trace)
|
||||
Loading…
Add table
Add a link
Reference in a new issue