fix processors

git-svn-id: http://www.observium.org/svn/observer/trunk@902 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-02-21 02:13:40 +00:00
parent f9be9682c1
commit ff8c9e8f84
3 changed files with 3 additions and 2 deletions

View File

@ -107,3 +107,4 @@ ALTER TABLE `syslog` DROP `host`, DROP `processed`;
RENAME TABLE `interfaces` TO `ports` ;
RENAME TABLE `interfaces_perms` TO `ports_perms` ;
ALTER TABLE `temperature` ADD `temp_index` VARCHAR( 32 ) NOT NULL AFTER `device_id` , ADD `temp_type` VARCHAR( 16 ) NOT NULL AFTER `temp_index`;
ALTER TABLE `processors` CHANGE `processor_oid` `processor_oid` VARCHAR( 128 ) NOT NULL

View File

@ -28,7 +28,7 @@ function discover_link($local_interface_id, $protocol, $remote_interface_id, $re
function discover_processor(&$valid_processor, $device, $oid, $index, $type, $descr, $precision = "1", $current = NULL, $entPhysical = NULL, $hrDevice = NULL) {
global $config; global $debug; global $valid_processor;
global $config; global $debug;
if($debug) { echo("$device, $oid, $index, $type, $descr, $precision, $current, $entPhysical, $hrDevice\n"); }
if($descr) {
if(mysql_result(mysql_query("SELECT count(processor_id) FROM `processors` WHERE `processor_index` = '$index' AND `device_id` = '".$device['device_id']."' AND `processor_type` = '$type'"),0) == '0') {

View File

@ -40,7 +40,7 @@
if(!is_array($valid_processor['cpm'])) {
$avgBusy5 = snmp_get($device, ".1.3.6.1.4.1.9.2.1.58.0", "-Oqv");
if(is_numeric($avgBusy5)) {
discover_processor($valid_processor, $device, ".1.3.6.1.4.1.9.2.1.58.0", "0", "ios", "Processor", $precision = "1", $current = $avgBusy5, $entPhysical = NULL, $hrDevice = NULL);
discover_processor($valid_processor, $device, ".1.3.6.1.4.1.9.2.1.58.0", "0", "ios", "Processor", "1", $avgBusy5, NULL, NULL);
}
}
}