mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 00:40:10 +00:00
Fix issue with empty points in influxDB gauge metrics
This commit is contained in:
parent
667bc2e8c6
commit
d0169db76d
1 changed files with 12 additions and 9 deletions
|
|
@ -112,20 +112,23 @@ local function influx2Series(schema, tstart, tend, tags, options, data, time_ste
|
|||
prev_t = prev_t + time_step
|
||||
end
|
||||
|
||||
for i=2, #values do
|
||||
local val = values[i]
|
||||
if #values > 1 then
|
||||
for i=2, #values do
|
||||
local val = values[i]
|
||||
|
||||
if val < options.min_value then
|
||||
val = options.min_value
|
||||
elseif val > options.max_value then
|
||||
val = options.max_value
|
||||
if val < options.min_value then
|
||||
val = options.min_value
|
||||
elseif val > options.max_value then
|
||||
val = options.max_value
|
||||
end
|
||||
|
||||
series[i-1].data[series_idx] = val
|
||||
end
|
||||
|
||||
series[i-1].data[series_idx] = val
|
||||
series_idx = series_idx + 1
|
||||
prev_t = cur_t
|
||||
end
|
||||
|
||||
series_idx = series_idx + 1
|
||||
prev_t = cur_t
|
||||
::continue::
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue