mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Implements custom timeseries
This commit is contained in:
parent
65bc5261de
commit
0cd3d5be63
4 changed files with 89 additions and 0 deletions
|
|
@ -6,6 +6,12 @@ local callback_utils = require "callback_utils"
|
|||
local ts_utils = require "ts_utils_core"
|
||||
require "ts_5min"
|
||||
|
||||
local ts_custom
|
||||
if ntop.exists(dirs.installdir .. "/scripts/lua/modules/timeseries/custom/ts_5min_custom.lua") then
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/timeseries/custom/?.lua;" .. package.path
|
||||
ts_custom = require "ts_5min_custom"
|
||||
end
|
||||
|
||||
local dirs = ntop.getDirs()
|
||||
local ts_dump = {}
|
||||
|
||||
|
|
@ -197,6 +203,11 @@ function ts_dump.host_update_stats_rrds(when, hostname, host, ifstats, verbose)
|
|||
--io.write("Discarding "..k.."@"..hostname.."\n")
|
||||
end
|
||||
end
|
||||
|
||||
-- create custom rrds
|
||||
if ts_custom and ts_custom.host_update_stats then
|
||||
ts_custom.host_update_stats(when, hostname, host, ifstats, verbose)
|
||||
end
|
||||
end
|
||||
|
||||
function ts_dump.host_update_ndpi_rrds(when, hostname, host, ifstats, verbose)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue