mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Flow user scripts enhancements
- Add title label in hash table utilization gauges - List Hash Tables charts and Periodic Activities charts in a single page - Replace Periodic Activities max duration column with time utilization percentage - Add api to add a straight line in the charts - Show max duration time as a straight line in Periodic Activities charts - Move dropped flow calls charts to the Peridic Activities page - Fix expert view number of calls 0 - Fix interface/host/network trigger alert label - Move chart icon to separate column in redis and influxdb pages - Fix interface menu selection in Hash Tables and Periodic Activities - Highlight issues with a warning triangle in Hash Tables and Periodic Activities - Fix some page navigation issues with extra_params - Fix wrong schema graph options passed to nv_graph_utils
This commit is contained in:
parent
a893e0a2c0
commit
1fd65ac44c
25 changed files with 280 additions and 154 deletions
|
|
@ -7,35 +7,27 @@ local ts_dump = {}
|
|||
-- ########################################################
|
||||
|
||||
function ts_dump.iface_update_periodic_ht_state_update_stats(when, ifid, periodic_ht_state_update_stats)
|
||||
for ht_name, ht_stats in pairs(periodic_ht_state_update_stats) do
|
||||
local ht_name = "FlowHash"
|
||||
local ht_stats = periodic_ht_state_update_stats[ht_name]
|
||||
|
||||
if(ht_stats and ht_stats["stats"]) then
|
||||
local num_calls = 0
|
||||
local num_ms = 0
|
||||
local stats = ht_stats["stats"]
|
||||
|
||||
if stats then
|
||||
if stats["num_calls"] then
|
||||
num_calls = stats["num_calls"]
|
||||
end
|
||||
if stats["tot_duration_ms"] then
|
||||
num_ms = stats["tot_duration_ms"]
|
||||
end
|
||||
ts_utils.append("flow_script:skipped_calls", {ifid = ifid,
|
||||
idle = stats.num_skipped_idle,
|
||||
proto_detected = stats.num_skipped_proto_detected,
|
||||
periodic_update = stats.num_skipped_periodic_update
|
||||
}, when, verbose)
|
||||
|
||||
if stats.num_skipped_idle ~= nil then
|
||||
ts_utils.append("ht:num_skipped_calls", {ifid = ifid, hash_table = ht_name,
|
||||
idle = stats.num_skipped_idle,
|
||||
proto_detected = stats.num_skipped_proto_detected,
|
||||
periodic_update = stats.num_skipped_periodic_update,
|
||||
}, when, verbose)
|
||||
ts_utils.append("flow_script:pending_calls", {ifid = ifid,
|
||||
proto_detected = stats.num_pending_proto_detected,
|
||||
periodic_update = stats.num_pending_periodic_update
|
||||
}, when, verbose)
|
||||
|
||||
ts_utils.append("ht:num_pending_calls", {ifid = ifid, hash_table = ht_name,
|
||||
proto_detected = stats.num_pending_proto_detected,
|
||||
periodic_update = stats.num_pending_periodic_update,
|
||||
}, when, verbose)
|
||||
end
|
||||
end
|
||||
|
||||
ts_utils.append("ht:duration", {ifid = ifid, hash_table = ht_name, num_ms = num_ms}, when, verbose)
|
||||
ts_utils.append("ht:num_calls", {ifid = ifid, hash_table = ht_name, num_calls = num_calls}, when, verbose)
|
||||
ts_utils.append("flow_script:lua_duration", {ifid = ifid, num_ms = stats["tot_duration_ms"]}, when, verbose)
|
||||
ts_utils.append("flow_script:successful_calls", {ifid = ifid, num_calls = stats["num_calls"]}, when, verbose)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue