mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 09:20:10 +00:00
Updated rrd_exists() for checking existance of SNMP rrd archives
This commit is contained in:
parent
e838c3ed49
commit
50aea3f40e
1 changed files with 6 additions and 0 deletions
|
|
@ -2051,6 +2051,12 @@ function rrd_exists(host_ip, rrdname)
|
|||
if(host_ip == nil) then return false end
|
||||
dirs = ntop.getDirs()
|
||||
rrdpath = dirs.workingdir .. "/" .. ifId .. "/rrd/" .. getPathFromKey(host_ip) .. "/" .. rrdname
|
||||
if(ntop.exists(rrdpath)) then return true end
|
||||
|
||||
-- Let's now try SNMP counters
|
||||
rrdpath = dirs.workingdir .. "/" .. ifId .. "/snmpstats/" .. getPathFromKey(host_ip) .. "/" .. rrdname
|
||||
|
||||
-- print(rrdpath)
|
||||
return ntop.exists(rrdpath)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue