mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
fix processors
git-svn-id: http://www.observium.org/svn/observer/trunk@902 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -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