From 0e6b42fc05e5b936e2f9fa36745234c8a09d7633 Mon Sep 17 00:00:00 2001 From: remydb Date: Wed, 19 Apr 2017 11:42:10 +0200 Subject: [PATCH] Fix duplicate dBm readings for single-lane optics (#6460) --- includes/discovery/sensors/dbm/junos.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/discovery/sensors/dbm/junos.inc.php b/includes/discovery/sensors/dbm/junos.inc.php index 99ee350dac..8300fabd7c 100644 --- a/includes/discovery/sensors/dbm/junos.inc.php +++ b/includes/discovery/sensors/dbm/junos.inc.php @@ -40,7 +40,7 @@ foreach ($pre_cache['junos_oids'] as $index => $entry) { $entPhysicalIndex_measured = 'ports'; discover_sensor($valid['sensor'], 'dbm', $device, $oid, 'tx-'.$index, 'junos', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $warn_limit, $limit, $current, 'snmp', $entPhysicalIndex, $entPhysicalIndex_measured); } - if (is_numeric($entry['jnxDomCurrentModuleLaneCount'])) { + if (is_numeric($entry['jnxDomCurrentModuleLaneCount']) && $entry['jnxDomCurrentModuleLaneCount'] > 1) { for ($x=0; $x<$entry['jnxDomCurrentModuleLaneCount']; $x++) { $lane = $pre_cache['junos_multilane_oids'][$index.'.'.$x]; if (is_numeric($lane['jnxDomCurrentLaneRxLaserPower']) && $lane['jnxDomCurrentLaneRxLaserPower'] != 0 && $lane['jnxDomCurrentLaneTxLaserOutputPower'] != 0) {