mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Fixes blacklists timeseries not correctly showing values (#8817)
This commit is contained in:
parent
027a4ebbf4
commit
c214ffca9a
5 changed files with 40 additions and 14 deletions
|
|
@ -65,12 +65,14 @@ function ts_dump.blacklist_update(when, verbose)
|
|||
local lists = lists_utils.getCategoryLists()
|
||||
|
||||
for list_name, v in pairs(lists) do
|
||||
if (v.status.num_hits.total > 0) then
|
||||
local current_hits = v.status.num_hits.total
|
||||
if (current_hits > 0) then
|
||||
list_name = list_name:gsub("%s+", "_") -- replace space with underscore
|
||||
ts_utils.append("blacklist:hits", {
|
||||
local num_hits = lists_utils.getHitsSinceLastUpdateAndUpdate(list_name, current_hits)
|
||||
ts_utils.append("blacklist_v2:hits", {
|
||||
ifid = getSystemInterfaceId(),
|
||||
blacklist_name = list_name,
|
||||
hits = v.status.num_hits.total
|
||||
hits = num_hits
|
||||
}, when)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue