Replace calls to getResolvedAddress with host2name

This commit is contained in:
emanuele-f 2020-03-31 11:52:50 +02:00
parent 4b1184acdb
commit 02c36d4140
17 changed files with 73 additions and 45 deletions

View file

@ -39,7 +39,9 @@ for key, value in pairs(hosts_stats) do
if(val > threshold) then
if(num > 0) then print(",\n") else print("\n") end
res = getResolvedAddress(hostkey2hostinfo(key))
local hinfo = hostkey2hostinfo(key)
name = host2name(hinfo["host"], hinfo["vlan"])
--if(res == nil) then res = "AAA" end
print("{ \"name\": \"" .. res .. "\", \"size\": " .. (hosts_stats[key]["bytes.sent"]+hosts_stats[key]["bytes.rcvd"]).. "} ")