mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
show ports/sensors on the device list page. add option to use php-snmp functions for snmp_get()s
git-svn-id: http://www.observium.org/svn/observer/trunk@1716 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -3,6 +3,11 @@
|
||||
unset($ports);
|
||||
$ports = snmp_cache_ifIndex($device); // Cache Port List
|
||||
|
||||
#mysql_query("INSERT INTO `ports` (`device_id`,`ifIndex`) VALUES ('".$device['device_id']."','$ifIndex')");
|
||||
|
||||
|
||||
|
||||
|
||||
// Build SNMP Cache Array
|
||||
$data_oids = array('ifName','ifDescr','ifAlias', 'ifAdminStatus', 'ifOperStatus', 'ifMtu', 'ifSpeed', 'ifHighSpeed', 'ifType', 'ifPhysAddress',
|
||||
'ifPromiscuousMode','ifConnectorPresent','ifDuplex');
|
||||
@@ -276,7 +281,8 @@
|
||||
}
|
||||
}
|
||||
} elseif($port['ignore'] == "0") {
|
||||
echo("Port Deleted?"); // Port missing from SNMP cache?
|
||||
echo("Port Deleted"); // Port missing from SNMP cache.
|
||||
mysql_query("UPDATE `ports` SET `deleted` = '1' WHERE `device_id` = '".$device['device_id']."' AND `ifIndex` = '".$this_port['ifIndex']."'");
|
||||
} else {
|
||||
echo("Port Ignored.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user