mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
only collect ADSL stats if we have a port type 'adsl'
git-svn-id: http://www.observium.org/svn/observer/trunk@1441 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@ -40,7 +40,7 @@
|
||||
# adslAturPerfValidIntervals.1 = 0
|
||||
# adslAturPerfInvalidIntervals.1 = 0
|
||||
|
||||
if($array[$device[device_id]][$port[ifIndex]]['adslLineCoding']) { // Check to make sure Port data is cached.
|
||||
if(isset($array[$device[device_id]][$port[ifIndex]]['adslLineCoding'])) { // Check to make sure Port data is cached.
|
||||
|
||||
$this_port = &$array[$device[device_id]][$port[ifIndex]];
|
||||
|
||||
|
@ -31,7 +31,11 @@
|
||||
foreach ($ifmib_oids as $oid) { echo("$oid "); $array = snmp_cache_oid($oid, $device, $array, "IF-MIB");}
|
||||
|
||||
if($config['enable_ports_etherlike']) { echo("dot3Stats "); $array = snmp_cache_oid("dot3StatsEntry", $device, $array, "EtherLike-MIB"); }
|
||||
if($config['enable_ports_adsl']) {
|
||||
|
||||
if($config['enable_ports_adsl']) {
|
||||
$device['adsl_count'] = mysql_result(mysql_query("SELECT COUNT(*) FROM `ports` WHERE `device_id` = '".$device['device_id']."' AND `ifType` = 'adsl'"),0);
|
||||
}
|
||||
if($device['adsl_count'] > "0") {
|
||||
echo("ADSL ");
|
||||
$array = snmp_cache_oid(".1.3.6.1.2.1.10.94.1.1.1.1", $device, $array, "ADSL-LINE-MIB");
|
||||
$array = snmp_cache_oid(".1.3.6.1.2.1.10.94.1.1.2.1", $device, $array, "ADSL-LINE-MIB");
|
||||
|
Reference in New Issue
Block a user