-- -- (C) 2013-15 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path if(ntop.isPro()) then package.path = dirs.installdir .. "/pro/scripts/lua/modules/?.lua;" .. package.path require "snmp_utils" end require "lua_utils" require "graph_utils" require "alert_utils" network = _GET["network"] interface.select(ifname) ifstats = aggregateInterfaceStats(interface.getStats()) ifId = ifstats.id sendHTTPHeader('text/html; charset=iso-8859-1') ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc") dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua") if(network == nil) then print("
Network parameter is missing (internal error ?)
") return end network_name = ntop.getNetworkNameById(tonumber(network)) rrdname = dirs.workingdir .. "/" .. ifId .. "/rrd/" .. getPathFromKey(network_name) .. "/bytes.rrd" if(not ntop.exists(rrdname)) then print("
No available stats for network "..network_name.."
") return end print [[
]] if(_GET["rrd_file"] == nil) then rrdfile = "bytes.rrd" else rrdfile=_GET["rrd_file"] end host_url = ntop.getHttpPrefix()..'/lua/network_details.lua?ifname='..ifId..'&network='..network..'&page=historical' drawRRD(ifId, network_name, rrdfile, _GET["graph_zoom"], host_url, 1, _GET["epoch"], nil, makeTopStatsScriptsArray()) dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua")