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:
Luca Deri 2022-01-03 18:54:50 +01:00
parent fc0e204803
commit fcaa071acb
27 changed files with 72 additions and 37 deletions

View 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)