fix: Removed div by 100. Junos SNMP value was not 0.01 resolution (#8198)

This commit is contained in:
bergroth 2018-02-05 21:48:32 +01:00 committed by Neil Lathwood
parent 11147d3bbf
commit b834d2d4b4
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);
}