mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
if ifInOctets/ifOutOctets not available, fall back to ifHCInOctets/ifHCOutOctets
This commit is contained in:
@ -36,6 +36,14 @@ if (is_numeric($_GET['id']) && ($config['allow_unauth_graphs'] || port_permitted
|
||||
|
||||
$in = snmp_get($device, "ifInOctets.".$port['ifIndex'], "-OUqnv", "IF-MIB");
|
||||
$out = snmp_get($device, "ifOutOctets.".$port['ifIndex'], "-OUqnv", "IF-MIB");
|
||||
if(empty($in))
|
||||
{
|
||||
$in = snmp_get($device, "ifHCInOctets.".$port['ifIndex'], "-OUqnv", "IF-MIB");
|
||||
}
|
||||
if(empty($out))
|
||||
{
|
||||
$out = snmp_get($device, "ifHCOutOctets.".$port['ifIndex'], "-OUqnv", "IF-MIB");
|
||||
}
|
||||
|
||||
$time = time();
|
||||
|
||||
|
Reference in New Issue
Block a user