mirror of
https://github.com/librenms/librenms.git
synced 2024-09-22 02:48:37 +00:00
fix: Removed div by 100. Junos SNMP value was not 0.01 resolution (#8198)
This commit is contained in:
parent
11147d3bbf
commit
b834d2d4b4
@ -26,7 +26,7 @@ foreach ($pre_cache['junos_ifotn_oids'] as $index => $entry) {
|
||||
$limit = null;
|
||||
$warn_limit = null;
|
||||
$tmp_exp = $pre_cache['junos_ifotn_oids'][$index.".1"]['jnxoptIfOTNPMCurrentFECBERExponent'];
|
||||
$current = ($entry['jnxoptIfOTNPMCurrentFECBERMantissa']/100)*pow(10, (-$tmp_exp));
|
||||
$current = ($entry['jnxoptIfOTNPMCurrentFECBERMantissa'])*pow(10, (-$tmp_exp));
|
||||
$entPhysicalIndex = $index;
|
||||
$entPhysicalIndex_measured = 'ports';
|
||||
discover_sensor($valid['sensor'], 'ber', $device, $oid, $index, 'junos', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $warn_limit, $limit, $current, 'snmp', $entPhysicalIndex, $entPhysicalIndex_measured);
|
||||
|
@ -4,6 +4,6 @@ if ($device['os'] == 'junos') {
|
||||
echo 'JunOS: ';
|
||||
|
||||
$sensor_exp_value = snmp_get($device, 'JNX-OPT-IF-EXT-MIB::jnxoptIfOTNPMCurrentFECBERExponent.'.$sensor['sensor_index'].'.1', '-Oqv');
|
||||
$sensor_value = ($sensor_value/100)*pow(10, -$sensor_exp_value);
|
||||
$sensor_value = ($sensor_value)*pow(10, -$sensor_exp_value);
|
||||
unset($sensor_exp_value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user