mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 00:40:10 +00:00
added is_view flag in json returned by network_load.jua. This is required to correctly render real-time traffic in the pro version
This commit is contained in:
parent
d2a8cb2bab
commit
866d849a12
1 changed files with 2 additions and 1 deletions
|
|
@ -14,6 +14,7 @@ sendHTTPHeader('text/html; charset=iso-8859-1')
|
|||
function dumpInterfaceStats(interface_name)
|
||||
interface.select(interface_name)
|
||||
ifstats = aggregateInterfaceStats(interface.getStats())
|
||||
|
||||
stats = interface.getFlowsStats()
|
||||
|
||||
if(ifstats ~= nil) then
|
||||
|
|
@ -25,7 +26,7 @@ function dumpInterfaceStats(interface_name)
|
|||
flows_pctg = math.floor(1+((ifstats.flows*100)/prefs.max_num_flows))
|
||||
|
||||
print('\t{ "ifname": "'.. interface_name..'", "packets": '.. ifstats.packets .. ', "bytes": ' .. ifstats.bytes .. ', "drops": ' .. ifstats.drops .. ', "alerts": '.. ntop.getNumQueuedAlerts() ..', "num_flows": '.. ifstats.flows .. ', "num_hosts": ' .. ifstats.hosts .. ', "epoch": ' .. os.time()..' , "uptime": " ' .. secondsToTime(uptime) .. '", "hosts_pctg": ' .. hosts_pctg .. ', "flows_pctg": ' .. flows_pctg)
|
||||
|
||||
print(', "is_view": '..tostring(ifstats.isView))
|
||||
print(', "local2remote": '.. ifstats["localstats"]["bytes"]["local2remote"]..', "remote2local": '..ifstats["localstats"]["bytes"]["remote2local"])
|
||||
|
||||
if(ifstats["bridge.device_a"] ~= nil) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue