mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix processors
git-svn-id: http://www.observium.org/svn/observer/trunk@902 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@ -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
|
||||
|
@ -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') {
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user