mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Adds total rrd writes and drops to periodic scripts timeseries
This commit is contained in:
parent
dbe07bbfcd
commit
a2237266ee
9 changed files with 72 additions and 10 deletions
|
|
@ -392,6 +392,14 @@ function driver:append(schema, timestamp, tags, metrics)
|
|||
local base, rrd = schema_get_path(schema, tags)
|
||||
local rrdfile = os_utils.fixPath(base .. "/" .. rrd .. ".rrd")
|
||||
|
||||
if not schema.options.is_critical_ts and ntop.rrd_is_slow() then
|
||||
-- RRD is slow and this is not a critical timeseries
|
||||
ntop.rrd_inc_num_drops()
|
||||
-- require "lua_utils"
|
||||
-- traceError(TRACE_NORMAL, TRACE_CONSOLE, "RRD slow inc num drops ... [".. schema.name .."]["..formatEpoch(ntop.getDeadline()).."]")
|
||||
return false
|
||||
end
|
||||
|
||||
if not ntop.exists(rrdfile) then
|
||||
ntop.mkdir(base)
|
||||
if not create_rrd(schema, rrdfile) then
|
||||
|
|
@ -407,7 +415,7 @@ end
|
|||
local function makeTotalSerie(series, count)
|
||||
local total = {}
|
||||
|
||||
for i=1,count do
|
||||
for i=1, count do
|
||||
total[i] = 0
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue