Commit version 24.12.13800

This commit is contained in:
2025-01-06 17:35:06 -05:00
parent b7f6a79c2c
commit 55d9218816
6133 changed files with 4239740 additions and 1374287 deletions

View File

@ -5,29 +5,26 @@
*
* This file is part of Observium.
*
* @package observium
* @subpackage discovery
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
* @package observium
* @subpackage discovery
* @copyright (C) Adam Armstrong
*
*/
$processors_array = snmpwalk_cache_double_oid($device, 'juniSystemModule', array(), 'Juniper-System-MIB');
$processors_array = snmpwalk_cache_double_oid($device, 'juniSystemModule', [], 'Juniper-System-MIB');
foreach ($processors_array as $index => $entry)
{
if ($entry['juniSystemModuleCpuUtilPct'] && $entry['juniSystemModuleCpuUtilPct'] != -1)
{
$entPhysicalIndex = $entry['juniSystemModulePhysicalIndex'];
$usage_oid = ".1.3.6.1.4.1.4874.2.2.2.1.3.5.1.3.$index";
$descr_oid = ".1.3.6.1.4.1.4874.2.2.2.1.3.5.1.6.$index";
$descr = $entry['juniSystemModuleDescr'];
$usage = $entry['juniSystemModuleCpuFiveMinAvgPct'];
foreach ($processors_array as $index => $entry) {
if ($entry['juniSystemModuleCpuUtilPct'] && $entry['juniSystemModuleCpuUtilPct'] != -1) {
$entPhysicalIndex = $entry['juniSystemModulePhysicalIndex'];
$usage_oid = ".1.3.6.1.4.1.4874.2.2.2.1.3.5.1.3.$index";
$descr_oid = ".1.3.6.1.4.1.4874.2.2.2.1.3.5.1.6.$index";
$descr = $entry['juniSystemModuleDescr'];
$usage = $entry['juniSystemModuleCpuFiveMinAvgPct'];
if (!strstr($descr, 'No') && !strstr($usage, 'No') && $descr != '')
{
discover_processor($valid['processor'], $device, $usage_oid, $index, 'junose', $descr, 1, $usage, $entPhysicalIndex);
if (!strstr($descr, 'No') && !strstr($usage, 'No') && $descr != '') {
discover_processor($valid['processor'], $device, $usage_oid, $index, 'junose', $descr, 1, $usage, $entPhysicalIndex);
}
}
}
}
unset ($processors_array);