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:
Adam Amstrong
2010-09-26 22:10:04 +00:00
parent 5f67749a3f
commit 038bc8c20e
11 changed files with 228 additions and 137 deletions

View File

@@ -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.");
}