mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Added HREF from flows info to flow lists according to flow exporter/interfaces
Improved flow drops report in interfaces For ZMQ interfaces throughtput is computed with frequency not les than 5 sec to avoid inaccurate computation
This commit is contained in:
parent
29ede6ff67
commit
32bee91c83
6 changed files with 36 additions and 20 deletions
|
|
@ -483,12 +483,27 @@ local mobile_country_code = {
|
|||
|
||||
-- #######################
|
||||
|
||||
function handleCustomFlowField(key, value)
|
||||
function formatInterfaceId(id, idx, snmpdevice)
|
||||
if(id == 65535) then
|
||||
return("Unknown")
|
||||
else
|
||||
if(snmpdevice ~= nil) then
|
||||
return('<A HREF="/lua/flows_stats.lua?deviceIP='..snmpdevice..'&'..idx..'='..id..'">'..id..'</A>')
|
||||
else
|
||||
return(id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- #######################
|
||||
|
||||
function handleCustomFlowField(key, value, snmpdevice)
|
||||
if((key == 'TCP_FLAGS') or (key == '6')) then
|
||||
return(formatTcpFlags(value))
|
||||
elseif((key == 'INPUT_SNMP') or (key == '10')
|
||||
or (key == 'OUTPUT_SNMP') or (key == '14')) then
|
||||
return(formatInterfaceId(value))
|
||||
elseif((key == 'INPUT_SNMP') or (key == '10')) then
|
||||
return(formatInterfaceId(value, "inIfIdx", snmpdevice))
|
||||
elseif((key == 'OUTPUT_SNMP') or (key == '14')) then
|
||||
return(formatInterfaceId(value, "outIfIdx", snmpdevice))
|
||||
elseif((key == 'EXPORTER_IPV4_ADDRESS') or (key == 'NPROBE_IPV4_ADDRESS') or (key == '130') or (key == '57943')) then
|
||||
local res = getResolvedAddress(hostkey2hostinfo(value))
|
||||
|
||||
|
|
@ -572,16 +587,6 @@ end
|
|||
|
||||
-- #######################
|
||||
|
||||
function formatInterfaceId(id)
|
||||
if(id == 65535) then
|
||||
return("Unknown")
|
||||
else
|
||||
return(id)
|
||||
end
|
||||
end
|
||||
|
||||
-- #######################
|
||||
|
||||
-- IMPORTANT: keep it in sync with ParserInterface::ParserInterface()
|
||||
|
||||
local flow_fields_description = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue