mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* refactor: Centralize MIB include directory specification The default is now: ``` $config['mib_dir'].'/mibdirname:'.$config['mib_dir'] ``` This means we exclude OS mibs and only use ours (we could prepend `+` if we want to include os mibs. All snmp calls should only include the name of the subdirectory under the mibs directory. * Remove d_echo from Proc Fix snmpsim tests.
25 lines
1.0 KiB
PHP
25 lines
1.0 KiB
PHP
<?php
|
|
|
|
// JUNOSe Processors
|
|
if ($device['os'] == 'junose') {
|
|
echo 'JUNOSe : ';
|
|
$processors_array = snmpwalk_cache_double_oid($device, 'juniSystemModule', $processors_array, 'Juniper-System-MIB', 'junose');
|
|
d_echo($processors_array);
|
|
|
|
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, null);
|
|
}
|
|
}
|
|
}
|
|
} //end if
|
|
|
|
unset($processors_array);
|