scripts/lua/host_details.lua: changes to let historical be viewed alone

This commit changes the host_details Lua script to let the Historical
data be viewed even if the host is no more in memory if a get parameter
is specified.
This commit is contained in:
Arianna Avanzini 2015-07-11 17:19:28 +02:00
parent f4f8bfa9be
commit eec2b3e01c
2 changed files with 348 additions and 309 deletions

View file

@ -1599,3 +1599,8 @@ function get_mac_classification(mac_address)
return ""
end
function rrd_exists(host_ip, rrdname)
dirs = ntop.getDirs()
rrdpath = dirs.workingdir .. "/" .. ifId .. "/rrd/" .. getPathFromKey(host_ip) .. "/" .. rrdname
return ntop.exists(rrdpath)
end