Convert several JunOS sensors to yaml (#15118)

* Convert several JunOS sensors to yaml
Fixes some issues with the php code and reduces extra snmp fetches

* Convert several JunOS sensors to yaml
Fixes some issues with the php code and reduces extra snmp fetches

* Convert BER as well
Allow divisor and multiplier to be set from oid

* use fillValues

* fix

* sort snmprec, fix divide by 0, add more context
This commit is contained in:
Tony Murray
2023-06-24 11:52:36 -05:00
committed by GitHub
parent 2e2d1bb7d1
commit 0a3678d11a
14 changed files with 48133 additions and 2345 deletions

View File

@@ -126,7 +126,7 @@ class YamlDiscovery
* @param array $discovery_data The yaml discovery data
* @param int $count The count of where we are in the discovery data
* @param array $pre_cache Data that has been previously fetched (should contain all snmp data)
* @param int|string $value The current value of the data that we might need to transform (or return as is)
* @param int|string|null $value The current value of the data that we might need to transform (or return as is)
* @return mixed
*/
public static function fillValues($name, $index, $discovery_data, $count, $pre_cache, $value): mixed
@@ -198,7 +198,7 @@ class YamlDiscovery
$template->replaceWith(function ($matches) use ($index, $def, $pre_cache) {
$replace = static::getValueFromData($matches[1], $index, $def, $pre_cache);
if (is_null($replace)) {
\Log::warning('YamlDiscovery: No variable available to replace ' . $matches[1]);
\Log::warning('YamlDiscovery: No variable available to replace ' . $matches[1] . ' index: ' . $index);
return ''; // remove the unavailable variable
}

View File

@@ -49,6 +49,17 @@ modules:
oid:
- ifDescr
- jnxFruName
ber:
data:
-
oid: JNX-OPT-IF-EXT-MIB::jnxoptIfOTNPMFECCurrentTable
value: JNX-OPT-IF-EXT-MIB::jnxoptIfOTNPMCurrentFECBERMantissa
num_oid: '.1.3.6.1.4.1.2636.3.73.1.3.3.8.1.5.{{ $index }}'
snmp_flags: '-OteQUb'
divisor: '1.0E+{{ JNX-OPT-IF-EXT-MIB::jnxoptIfOTNPMCurrentFECBERExponent }}'
descr: '{{ ifDescr:0 }} preFEC BER'
entPhysicalIndex: '{{ $subindex0 }}'
entPhysicalIndex_measured: 'ports'
chromatic_dispersion:
data:
-
@@ -72,6 +83,66 @@ modules:
index: 'jnxPMCurDiffGroupDelay.{{ $index }}'
dbm:
data:
-
oid: JUNIPER-DOM-MIB::jnxDomCurrentTable
value: JUNIPER-DOM-MIB::jnxDomCurrentRxLaserPower
num_oid: '.1.3.6.1.4.1.2636.3.60.1.1.1.1.5.{{ $index }}'
descr: '{{ $ifDescr }} Rx Power'
divisor: 100
skip_values: 0
low_limit: JUNIPER-DOM-MIB::jnxDomCurrentRxLaserPowerLowAlarmThreshold
low_warn_limit: JUNIPER-DOM-MIB::jnxDomCurrentRxLaserPowerLowWarningThreshold
high_limit: JUNIPER-DOM-MIB::jnxDomCurrentRxLaserPowerHighAlarmThreshold
warn_limit: JUNIPER-DOM-MIB::jnxDomCurrentRxLaserPowerHighWarningThreshold
entPhysicalIndex: '{{ $index }}'
entPhysicalIndex_measured: 'ports'
index: 'rx-{{ $index }}'
group: 'Modules'
-
oid: JUNIPER-DOM-MIB::jnxDomCurrentTable
value: JUNIPER-DOM-MIB::jnxDomCurrentTxLaserOutputPower
num_oid: '.1.3.6.1.4.1.2636.3.60.1.1.1.1.7.{{ $index }}'
descr: '{{ $ifDescr }} Tx Power'
divisor: 100
skip_values: 0
low_limit: JUNIPER-DOM-MIB::jnxDomCurrentTxLaserOutputPowerLowAlarmThreshold
low_warn_limit: JUNIPER-DOM-MIB::jnxDomCurrentTxLaserOutputPowerLowWarningThreshold
high_limit: JUNIPER-DOM-MIB::jnxDomCurrentTxLaserOutputPowerHighAlarmThreshold
warn_limit: JUNIPER-DOM-MIB::jnxDomCurrentTxLaserOutputPowerHighWarningThreshold
entPhysicalIndex: '{{ $index }}'
entPhysicalIndex_measured: 'ports'
index: 'tx-{{ $index }}'
group: 'Modules'
-
oid: JUNIPER-DOM-MIB::jnxDomModuleLaneTable
value: JUNIPER-DOM-MIB::jnxDomCurrentLaneRxLaserPower
num_oid: '.1.3.6.1.4.1.2636.3.60.1.2.1.1.6.{{ $index }}'
descr: '{{ ifDescr:0 }} lane {{ $subindex1 }} Rx Power'
divisor: 100
skip_values: 0
low_limit: JUNIPER-DOM-MIB::jnxDomCurrentRxLaserPowerLowAlarmThreshold:0
low_warn_limit: JUNIPER-DOM-MIB::jnxDomCurrentRxLaserPowerLowWarningThreshold:0
high_limit: JUNIPER-DOM-MIB::jnxDomCurrentRxLaserPowerHighAlarmThreshold:0
warn_limit: JUNIPER-DOM-MIB::jnxDomCurrentRxLaserPowerHighWarningThreshold:0
entPhysicalIndex: '{{ $subindex0 }}'
entPhysicalIndex_measured: 'ports'
index: 'rx-{{ $index }}'
group: 'Modules'
-
oid: JUNIPER-DOM-MIB::jnxDomModuleLaneTable
value: JUNIPER-DOM-MIB::jnxDomCurrentLaneTxLaserOutputPower
num_oid: '.1.3.6.1.4.1.2636.3.60.1.2.1.1.8.{{ $index }}'
descr: '{{ ifDescr:0 }} lane {{ $subindex1 }} Tx Power'
divisor: 100
skip_values: 0
low_limit: JUNIPER-DOM-MIB::jnxDomCurrentTxLaserOutputPowerLowAlarmThreshold:0
low_warn_limit: JUNIPER-DOM-MIB::jnxDomCurrentTxLaserOutputPowerLowWarningThreshold:0
high_limit: JUNIPER-DOM-MIB::jnxDomCurrentTxLaserOutputPowerHighAlarmThreshold:0
warn_limit: JUNIPER-DOM-MIB::jnxDomCurrentTxLaserOutputPowerHighWarningThreshold:0
entPhysicalIndex: '{{ $subindex0 }}'
entPhysicalIndex_measured: 'ports'
index: 'tx-{{ $index }}'
group: 'Modules'
-
oid: jnxOpticsPMCurrentTable
value: jnxPMCurRxInputPower
@@ -125,6 +196,26 @@ modules:
index: 'jnxPMCurCarFreqOffset.{{ $index }}'
temperature:
data:
-
oid: JUNIPER-MIB::jnxOperatingTable
value: JUNIPER-MIB::jnxOperatingTemp
num_oid: '.1.3.6.1.4.1.2636.3.1.13.1.7.{{ $index }}'
descr: JUNIPER-MIB::jnxOperatingDescr
skip_values: 0
-
oid: JUNIPER-DOM-MIB::jnxDomCurrentTable
value: JUNIPER-DOM-MIB::jnxDomCurrentModuleTemperature
num_oid: '.1.3.6.1.4.1.2636.3.60.1.1.1.1.8.{{ $index }}'
descr: '{{ $ifDescr }} Temperature'
skip_values: 0
low_limit: JUNIPER-DOM-MIB::jnxDomCurrentModuleTemperatureLowAlarmThreshold
low_warn_limit: JUNIPER-DOM-MIB::jnxDomCurrentModuleTemperatureLowWarningThreshold
high_limit: JUNIPER-DOM-MIB::jnxDomCurrentModuleTemperatureHighAlarmThreshold
warn_limit: JUNIPER-DOM-MIB::jnxDomCurrentModuleTemperatureHighWarningThreshold
entPhysicalIndex: '{{ $index }}'
entPhysicalIndex_measured: 'ports'
index: 'rx-{{ $index }}' # match old php discovery
group: 'Modules'
-
oid: jnxOpticsPMCurrentTable
value: jnxPMCurTemperature
@@ -133,8 +224,24 @@ modules:
entPhysicalIndex_measured: 'ports'
descr: '{{ $ifDescr }} Temperature'
index: 'jnxPMCurTemperature.{{ $index }}'
group: 'Modules'
current:
data:
-
oid: JUNIPER-DOM-MIB::jnxDomCurrentTable
value: JUNIPER-DOM-MIB::jnxDomCurrentTxLaserBiasCurrent
num_oid: '.1.3.6.1.4.1.2636.3.60.1.1.1.1.6.{{ $index }}'
descr: '{{ $ifDescr }} Tx Current'
divisor: 1000000
skip_values: 0
low_limit: JUNIPER-DOM-MIB::jnxDomCurrentTxLaserBiasCurrentLowAlarmThreshold
low_warn_limit: JUNIPER-DOM-MIB::jnxDomCurrentTxLaserBiasCurrentLowWarningThreshold
high_limit: JUNIPER-DOM-MIB::jnxDomCurrentTxLaserBiasCurrentHighAlarmThreshold
warn_limit: JUNIPER-DOM-MIB::jnxDomCurrentTxLaserBiasCurrentHighWarningThreshold
entPhysicalIndex: '{{ $index }}'
entPhysicalIndex_measured: 'ports'
index: 'rx-{{ $index }}'
group: 'Modules'
-
oid: jnxOpticsPMCurrentTable
value: jnxPMCurTxLaserBiasCurrent

View File

@@ -937,8 +937,8 @@ function discovery_process(&$valid, $os, $sensor_class, $pre_cache)
// process the group
$group = trim(YamlDiscovery::replaceValues('group', $index, null, $data, $pre_cache)) ?: null;
$divisor = $data['divisor'] ?? ($sensor_options['divisor'] ?? 1);
$multiplier = $data['multiplier'] ?? ($sensor_options['multiplier'] ?? 1);
$divisor = (int) (isset($data['divisor']) ? (YamlDiscovery::replaceValues('divisor', $index, $count, $data, $pre_cache) ?: 1) : ($sensor_options['divisor'] ?? 1));
$multiplier = (int) (isset($data['multiplier']) ? (YamlDiscovery::replaceValues('multiplier', $index, $count, $data, $pre_cache) ?: 1) : ($sensor_options['multiplier'] ?? 1));
$limits = ['low_limit', 'low_warn_limit', 'warn_limit', 'high_limit'];
foreach ($limits as $limit) {

View File

@@ -1,35 +0,0 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2016 Neil Lathwood <neil@lathwood.co.uk>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*
* @author Peca Nesovanovic <peca.nesovanovic@sattrakt.com>
*/
echo 'JunOS ';
$multiplier = 1;
$divisor = 1;
foreach ($pre_cache['junos_ifotn_oids'] as $index => $entry) {
if (is_numeric($entry['jnxoptIfOTNPMCurrentFECBERMantissa'])) {
$index = substr_replace($index, '', -2);
$oid = '.1.3.6.1.4.1.2636.3.73.1.3.3.8.1.5.' . $index . '.1';
$interface = get_port_by_index_cache($device['device_id'], $index)['ifDescr'];
$descr = $interface . ' preFEC BER';
$limit_low = null;
$warn_limit_low = null;
$limit = null;
$warn_limit = null;
$tmp_exp = $pre_cache['junos_ifotn_oids'][$index . '.1']['jnxoptIfOTNPMCurrentFECBERExponent'];
$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

@@ -1,33 +0,0 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2016 Neil Lathwood <neil@lathwood.co.uk>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*
* @author Peca Nesovanovic <peca.nesovanovic@sattrakt.com>
*/
echo 'JunOS ';
$multiplier = 1;
$divisor = 1000000;
foreach ($pre_cache['junos_oids'] as $index => $entry) {
if (is_numeric($entry['jnxDomCurrentTxLaserBiasCurrent']) && $entry['jnxDomCurrentTxLaserBiasCurrent'] != 0 && $entry['jnxDomCurrentTxLaserBiasCurrentLowAlarmThreshold'] != 0) {
$oid = '.1.3.6.1.4.1.2636.3.60.1.1.1.1.6.' . $index;
$interface = get_port_by_index_cache($device['device_id'], $index)['ifDescr'];
$descr = $interface . ' Tx Current';
$limit_low = $entry['jnxDomCurrentTxLaserBiasCurrentLowAlarmThreshold'] / $divisor;
$warn_limit_low = $entry['jnxDomCurrentTxLaserBiasCurrentLowWarningThreshold'] / $divisor;
$limit = $entry['jnxDomCurrentTxLaserBiasCurrentHighAlarmThreshold'] / $divisor;
$warn_limit = $entry['jnxDomCurrentTxLaserBiasCurrentHighWarningThreshold'] / $divisor;
$current = $entry['jnxDomCurrentTxLaserBiasCurrent'];
$entPhysicalIndex = $index;
$entPhysicalIndex_measured = 'ports';
discover_sensor($valid['sensor'], 'current', $device, $oid, 'rx-' . $index, 'junos', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $warn_limit, $limit, $current, 'snmp', $entPhysicalIndex, $entPhysicalIndex_measured);
}
}

View File

@@ -1,77 +0,0 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2016 Neil Lathwood <neil@lathwood.co.uk>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*
* @author Peca Nesovanovic <peca.nesovanovic@sattrakt.com>
*/
echo 'JunOS ';
$multiplier = 1;
$divisor = 100;
foreach ($pre_cache['junos_oids'] as $index => $entry) {
if (is_numeric($entry['jnxDomCurrentRxLaserPower']) && $entry['jnxDomCurrentRxLaserPower'] != 0 && $entry['jnxDomCurrentTxLaserOutputPower'] != 0) {
$oid = '.1.3.6.1.4.1.2636.3.60.1.1.1.1.5.' . $index;
$interface = get_port_by_index_cache($device['device_id'], $index)['ifDescr'];
$descr = $interface . ' Rx Power';
$limit_low = $entry['jnxDomCurrentRxLaserPowerLowAlarmThreshold'] / $divisor;
$warn_limit_low = $entry['jnxDomCurrentRxLaserPowerLowWarningThreshold'] / $divisor;
$limit = $entry['jnxDomCurrentRxLaserPowerHighAlarmThreshold'] / $divisor;
$warn_limit = $entry['jnxDomCurrentRxLaserPowerHighWarningThreshold'] / $divisor;
$current = $entry['jnxDomCurrentRxLaserPower'];
$entPhysicalIndex = $index;
$entPhysicalIndex_measured = 'ports';
discover_sensor($valid['sensor'], 'dbm', $device, $oid, 'rx-' . $index, 'junos', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $warn_limit, $limit, $current, 'snmp', $entPhysicalIndex, $entPhysicalIndex_measured);
}
if (is_numeric($entry['jnxDomCurrentTxLaserOutputPower']) && $entry['jnxDomCurrentTxLaserOutputPower'] && $entry['jnxDomCurrentRxLaserPower']) {
$oid = '.1.3.6.1.4.1.2636.3.60.1.1.1.1.7.' . $index;
$interface = get_port_by_index_cache($device['device_id'], $index)['ifDescr'];
$descr = $interface . ' Tx Power';
$limit_low = $entry['jnxDomCurrentTxLaserOutputPowerLowAlarmThreshold'] / $divisor;
$warn_limit_low = $entry['jnxDomCurrentTxLaserOutputPowerLowWarningThreshold'] / $divisor;
$limit = $entry['jnxDomCurrentTxLaserOutputPowerHighAlarmThreshold'] / $divisor;
$warn_limit = $entry['jnxDomCurrentTxLaserOutputPowerHighWarningThreshold'] / $divisor;
$current = $entry['jnxDomCurrentTxLaserOutputPower'];
$entPhysicalIndex = $index;
$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 (isset($entry['jnxDomCurrentModuleLaneCount']) && 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) {
$oid = '.1.3.6.1.4.1.2636.3.60.1.2.1.1.6.' . $index . '.' . $x;
$interface = get_port_by_index_cache($device['device_id'], $index)['ifDescr'];
$descr = $interface . ' lane ' . $x . ' Rx Power';
$limit_low = $entry['jnxDomCurrentRxLaserPowerLowAlarmThreshold'] / $divisor;
$warn_limit_low = $entry['jnxDomCurrentRxLaserPowerLowWarningThreshold'] / $divisor;
$limit = $entry['jnxDomCurrentRxLaserPowerHighAlarmThreshold'] / $divisor;
$warn_limit = $entry['jnxDomCurrentRxLaserPowerHighWarningThreshold'] / $divisor;
$current = $lane['jnxDomCurrentLaneRxLaserPower'] / $divisor;
$entPhysicalIndex = $index;
$entPhysicalIndex_measured = 'ports';
discover_sensor($valid['sensor'], 'dbm', $device, $oid, 'rx-' . $index . '.' . $x, 'junos', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $warn_limit, $limit, $current, 'snmp', $entPhysicalIndex, $entPhysicalIndex_measured);
}
if (is_numeric($lane['jnxDomCurrentLaneTxLaserOutputPower']) && $lane['jnxDomCurrentLaneTxLaserOutputPower'] && $lane['jnxDomCurrentLaneRxLaserPower']) {
$oid = '.1.3.6.1.4.1.2636.3.60.1.2.1.1.8.' . $index . '.' . $x;
$interface = get_port_by_index_cache($device['device_id'], $index)['ifDescr'];
$descr = $interface . ' lane ' . $x . ' Tx Power';
$limit_low = $entry['jnxDomCurrentTxLaserOutputPowerLowAlarmThreshold'] / $divisor;
$warn_limit_low = $entry['jnxDomCurrentTxLaserOutputPowerLowWarningThreshold'] / $divisor;
$limit = $entry['jnxDomCurrentTxLaserOutputPowerHighAlarmThreshold'] / $divisor;
$warn_limit = $entry['jnxDomCurrentTxLaserOutputPowerHighWarningThreshold'] / $divisor;
$current = $lane['jnxDomCurrentLaneTxLaserOutputPower'] / $divisor;
$entPhysicalIndex = $index;
$entPhysicalIndex_measured = 'ports';
discover_sensor($valid['sensor'], 'dbm', $device, $oid, 'tx-' . $index . '.' . $x, 'junos', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $warn_limit, $limit, $current, 'snmp', $entPhysicalIndex, $entPhysicalIndex_measured);
}
}
}
}

View File

@@ -1,23 +0,0 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2016 Neil Lathwood <neil@lathwood.co.uk>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
echo 'JnxDomCurrentEntry ';
$pre_cache['junos_oids'] = snmpwalk_cache_multi_oid($device, 'JnxDomCurrentEntry', [], 'JUNIPER-DOM-MIB', 'junos');
echo 'JnxDomCurrentLaneEntry ';
$pre_cache['junos_multilane_oids'] = snmpwalk_cache_multi_oid($device, 'JnxDomCurrentLaneEntry', [], 'JUNIPER-DOM-MIB', 'junos');
echo 'jnxoptIfOTNPMFECCurrentTable';
$pre_cache['junos_ifotn_oids'] = snmpwalk_cache_multi_oid($device, 'jnxoptIfOTNPMFECCurrentTable', [], 'JNX-OPT-IF-EXT-MIB', 'junos', '-OQUsb');
echo 'JnxoptIfOTNPMFECCurrentEntry ';
$pre_cache['junos_prefec_oids'] = snmpwalk_cache_multi_oid($device, 'jnxoptIfOTNPMCurrentFECMinBERMantissa', [], 'JNX-OPT-IF-EXT-MIB', 'junos');

View File

@@ -1,64 +0,0 @@
<?php
/*
* LibreNMS discovery module for junos Temperature
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* @package LibreNMS
* @link https://www.librenms.org
*
* @author Peca Nesovanovic <peca.nesovanovic@sattrakt.com>
*/
echo 'JunOS ';
$oids = snmp_walk($device, '.1.3.6.1.4.1.2636.3.1.13.1.7', '-Osqn', 'JUNIPER-MIB', 'junos');
$oids = trim($oids);
foreach (explode("\n", $oids) as $data) {
$data = trim($data);
$data = substr($data, 29);
if ($data) {
[$oid] = explode(' ', $data);
$temperature_oid = ".1.3.6.1.4.1.2636.3.1.13.1.7.$oid";
$descr_oid = ".1.3.6.1.4.1.2636.3.1.13.1.5.$oid";
$descr = snmp_get($device, $descr_oid, '-Oqv', 'JUNIPER-MIB', 'junos');
$temperature = snmp_get($device, $temperature_oid, '-Oqv', 'JUNIPER-MIB', 'junos');
if (! strstr($descr, 'No') && ! strstr($temperature, 'No') && $descr != '' && $temperature != '0') {
$descr = str_replace('"', '', $descr);
$descr = str_replace('temperature', '', $descr);
$descr = str_replace('temperature', '', $descr);
$descr = str_replace('sensor', '', $descr);
$descr = trim($descr);
discover_sensor($valid['sensor'], 'temperature', $device, $temperature_oid, $oid, 'junos', $descr, '1', '1', null, null, null, null, $temperature);
}
}
}
$multiplier = 1;
$divisor = 1;
foreach ($pre_cache['junos_oids'] as $index => $entry) {
if (is_numeric($entry['jnxDomCurrentModuleTemperature']) && $entry['jnxDomCurrentModuleTemperature'] != 0 && $entry['jnxDomCurrentModuleTemperatureLowAlarmThreshold']) {
$oid = '.1.3.6.1.4.1.2636.3.60.1.1.1.1.8.' . $index;
$interface = get_port_by_index_cache($device['device_id'], $index)['ifDescr'];
$descr = $interface . ' Temperature';
$limit_low = $entry['jnxDomCurrentModuleTemperatureLowAlarmThreshold'] / $divisor;
$warn_limit_low = $entry['jnxDomCurrentModuleTemperatureLowWarningThreshold'] / $divisor;
$limit = $entry['jnxDomCurrentModuleTemperatureHighAlarmThreshold'] / $divisor;
$warn_limit = $entry['jnxDomCurrentModuleTemperatureHighWarningThreshold'] / $divisor;
$current = $entry['jnxDomCurrentModuleTemperature'];
$entPhysicalIndex = $index;
$entPhysicalIndex_measured = 'ports';
discover_sensor($valid['sensor'], 'temperature', $device, $oid, 'rx-' . $index, 'junos', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $warn_limit, $limit, $current, 'snmp', $entPhysicalIndex, $entPhysicalIndex_measured);
}
}

View File

@@ -1,9 +0,0 @@
<?php
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 * pow(10, -$sensor_exp_value);
unset($sensor_exp_value);
}

42890
tests/data/junos_ber.json Normal file
View File

File diff suppressed because it is too large Load Diff

View File

@@ -170965,7 +170965,7 @@
"sensor_index": "rx-994.0",
"sensor_type": "junos",
"sensor_descr": "et-0/2/0 lane 0 Rx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": -13.29,
@@ -170990,7 +170990,7 @@
"sensor_index": "rx-994.1",
"sensor_type": "junos",
"sensor_descr": "et-0/2/0 lane 1 Rx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": -13.39,
@@ -171015,7 +171015,7 @@
"sensor_index": "rx-994.2",
"sensor_type": "junos",
"sensor_descr": "et-0/2/0 lane 2 Rx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": -12.58,
@@ -171040,7 +171040,7 @@
"sensor_index": "rx-994.3",
"sensor_type": "junos",
"sensor_descr": "et-0/2/0 lane 3 Rx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": -12.19,
@@ -171065,7 +171065,7 @@
"sensor_index": "rx-996.0",
"sensor_type": "junos",
"sensor_descr": "et-1/2/0 lane 0 Rx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 0.35,
@@ -171090,7 +171090,7 @@
"sensor_index": "rx-996.1",
"sensor_type": "junos",
"sensor_descr": "et-1/2/0 lane 1 Rx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 0.64,
@@ -171115,7 +171115,7 @@
"sensor_index": "rx-996.2",
"sensor_type": "junos",
"sensor_descr": "et-1/2/0 lane 2 Rx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 0.12,
@@ -171140,7 +171140,7 @@
"sensor_index": "rx-996.3",
"sensor_type": "junos",
"sensor_descr": "et-1/2/0 lane 3 Rx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 0.51,
@@ -171165,7 +171165,7 @@
"sensor_index": "tx-994.0",
"sensor_type": "junos",
"sensor_descr": "et-0/2/0 lane 0 Tx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 1.08,
@@ -171190,7 +171190,7 @@
"sensor_index": "tx-994.1",
"sensor_type": "junos",
"sensor_descr": "et-0/2/0 lane 1 Tx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 1.17,
@@ -171215,7 +171215,7 @@
"sensor_index": "tx-994.2",
"sensor_type": "junos",
"sensor_descr": "et-0/2/0 lane 2 Tx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 1.01,
@@ -171240,7 +171240,7 @@
"sensor_index": "tx-994.3",
"sensor_type": "junos",
"sensor_descr": "et-0/2/0 lane 3 Tx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 0.44,
@@ -171265,7 +171265,7 @@
"sensor_index": "tx-996.0",
"sensor_type": "junos",
"sensor_descr": "et-1/2/0 lane 0 Tx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 0.98,
@@ -171290,7 +171290,7 @@
"sensor_index": "tx-996.1",
"sensor_type": "junos",
"sensor_descr": "et-1/2/0 lane 1 Tx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 1.25,
@@ -171315,7 +171315,7 @@
"sensor_index": "tx-996.2",
"sensor_type": "junos",
"sensor_descr": "et-1/2/0 lane 2 Tx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 0.94,
@@ -171340,7 +171340,7 @@
"sensor_index": "tx-996.3",
"sensor_type": "junos",
"sensor_descr": "et-1/2/0 lane 3 Tx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 1.02,
@@ -173165,7 +173165,7 @@
"sensor_index": "rx-994",
"sensor_type": "junos",
"sensor_descr": "et-0/2/0 Temperature",
"group": null,
"group": "Modules",
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 35,
@@ -173190,7 +173190,7 @@
"sensor_index": "rx-996",
"sensor_type": "junos",
"sensor_descr": "et-1/2/0 Temperature",
"group": null,
"group": "Modules",
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 31,

View File

File diff suppressed because it is too large Load Diff

View File

@@ -9917,10 +9917,10 @@
"sensor_index": "rx-513",
"sensor_type": "junos",
"sensor_descr": "xe-0/0/0 Tx Current",
"group": null,
"group": "Modules",
"sensor_divisor": 1000000,
"sensor_multiplier": 1,
"sensor_current": 5588,
"sensor_current": 0.005588,
"sensor_limit": 0.05,
"sensor_limit_warn": 0.04,
"sensor_limit_low": 0.001,
@@ -9942,10 +9942,10 @@
"sensor_index": "rx-518",
"sensor_type": "junos",
"sensor_descr": "xe-0/0/1 Tx Current",
"group": null,
"group": "Modules",
"sensor_divisor": 1000000,
"sensor_multiplier": 1,
"sensor_current": 5124,
"sensor_current": 0.005124,
"sensor_limit": 0.05,
"sensor_limit_warn": 0.04,
"sensor_limit_low": 0.001,
@@ -9967,10 +9967,10 @@
"sensor_index": "rx-513",
"sensor_type": "junos",
"sensor_descr": "xe-0/0/0 Rx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": -230,
"sensor_current": -2.3,
"sensor_limit": 1,
"sensor_limit_warn": 0,
"sensor_limit_low": -13.09,
@@ -9992,10 +9992,10 @@
"sensor_index": "rx-518",
"sensor_type": "junos",
"sensor_descr": "xe-0/0/1 Rx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": -174,
"sensor_current": -1.74,
"sensor_limit": 1,
"sensor_limit_warn": 0,
"sensor_limit_low": -13.09,
@@ -10017,10 +10017,10 @@
"sensor_index": "tx-513",
"sensor_type": "junos",
"sensor_descr": "xe-0/0/0 Tx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": -188,
"sensor_current": -1.88,
"sensor_limit": 1,
"sensor_limit_warn": 0,
"sensor_limit_low": -9.31,
@@ -10042,10 +10042,10 @@
"sensor_index": "tx-518",
"sensor_type": "junos",
"sensor_descr": "xe-0/0/1 Tx Power",
"group": null,
"group": "Modules",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": -246,
"sensor_current": -2.46,
"sensor_limit": 1,
"sensor_limit_warn": 0,
"sensor_limit_low": -9.31,
@@ -10442,7 +10442,7 @@
"sensor_index": "rx-513",
"sensor_type": "junos",
"sensor_descr": "xe-0/0/0 Temperature",
"group": null,
"group": "Modules",
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 42,
@@ -10467,7 +10467,7 @@
"sensor_index": "rx-518",
"sensor_type": "junos",
"sensor_descr": "xe-0/0/1 Temperature",
"group": null,
"group": "Modules",
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 43,
@@ -10621,720 +10621,7 @@
}
]
},
"poller": {
"sensors": [
{
"sensor_deleted": 0,
"sensor_class": "current",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.60.1.1.1.1.6.513",
"sensor_index": "rx-513",
"sensor_type": "junos",
"sensor_descr": "xe-0/0/0 Tx Current",
"group": null,
"sensor_divisor": 1000000,
"sensor_multiplier": 1,
"sensor_current": 0.005588,
"sensor_limit": 0.05,
"sensor_limit_warn": 0.04,
"sensor_limit_low": 0.001,
"sensor_limit_low_warn": 0.002,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": "513",
"entPhysicalIndex_measured": "ports",
"sensor_prev": 5588,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "current",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.60.1.1.1.1.6.518",
"sensor_index": "rx-518",
"sensor_type": "junos",
"sensor_descr": "xe-0/0/1 Tx Current",
"group": null,
"sensor_divisor": 1000000,
"sensor_multiplier": 1,
"sensor_current": 0.005124,
"sensor_limit": 0.05,
"sensor_limit_warn": 0.04,
"sensor_limit_low": 0.001,
"sensor_limit_low_warn": 0.002,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": "518",
"entPhysicalIndex_measured": "ports",
"sensor_prev": 5124,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "dbm",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.60.1.1.1.1.5.513",
"sensor_index": "rx-513",
"sensor_type": "junos",
"sensor_descr": "xe-0/0/0 Rx Power",
"group": null,
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": -2.3,
"sensor_limit": 1,
"sensor_limit_warn": 0,
"sensor_limit_low": -13.09,
"sensor_limit_low_warn": -12.09,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": "513",
"entPhysicalIndex_measured": "ports",
"sensor_prev": -230,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "dbm",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.60.1.1.1.1.5.518",
"sensor_index": "rx-518",
"sensor_type": "junos",
"sensor_descr": "xe-0/0/1 Rx Power",
"group": null,
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": -1.74,
"sensor_limit": 1,
"sensor_limit_warn": 0,
"sensor_limit_low": -13.09,
"sensor_limit_low_warn": -12.09,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": "518",
"entPhysicalIndex_measured": "ports",
"sensor_prev": -174,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "dbm",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.60.1.1.1.1.7.513",
"sensor_index": "tx-513",
"sensor_type": "junos",
"sensor_descr": "xe-0/0/0 Tx Power",
"group": null,
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": -1.88,
"sensor_limit": 1,
"sensor_limit_warn": 0,
"sensor_limit_low": -9.31,
"sensor_limit_low_warn": -8.32,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": "513",
"entPhysicalIndex_measured": "ports",
"sensor_prev": -188,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "dbm",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.60.1.1.1.1.7.518",
"sensor_index": "tx-518",
"sensor_type": "junos",
"sensor_descr": "xe-0/0/1 Tx Power",
"group": null,
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": -2.46,
"sensor_limit": 1,
"sensor_limit_warn": 0,
"sensor_limit_low": -9.31,
"sensor_limit_low_warn": -8.32,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": "518",
"entPhysicalIndex_measured": "ports",
"sensor_prev": -246,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.1.15.1.8.2.1.1.0",
"sensor_index": "jnxFruName.2.1.1.0",
"sensor_type": "jnxFruTable",
"sensor_descr": "Power Supply 0 @ 0/0/*",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 6,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": "jnxFruTable"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.1.15.1.8.2.1.2.0",
"sensor_index": "jnxFruName.2.1.2.0",
"sensor_type": "jnxFruTable",
"sensor_descr": "Power Supply 1 @ 0/1/*",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 6,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": "jnxFruTable"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.1.15.1.8.4.1.1.0",
"sensor_index": "jnxFruName.4.1.1.0",
"sensor_type": "jnxFruTable",
"sensor_descr": "Fan Tray 0 @ 0/0/*",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 6,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": "jnxFruTable"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.1.15.1.8.4.1.2.0",
"sensor_index": "jnxFruName.4.1.2.0",
"sensor_type": "jnxFruTable",
"sensor_descr": "Fan Tray 1 @ 0/1/*",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 6,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": "jnxFruTable"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.1.15.1.8.4.1.3.0",
"sensor_index": "jnxFruName.4.1.3.0",
"sensor_type": "jnxFruTable",
"sensor_descr": "Fan Tray 2 @ 0/2/*",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 6,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": "jnxFruTable"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.1.15.1.8.4.1.4.0",
"sensor_index": "jnxFruName.4.1.4.0",
"sensor_type": "jnxFruTable",
"sensor_descr": "Fan Tray 3 @ 0/3/*",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 6,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": "jnxFruTable"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.1.15.1.8.4.1.5.0",
"sensor_index": "jnxFruName.4.1.5.0",
"sensor_type": "jnxFruTable",
"sensor_descr": "Fan Tray 4 @ 0/4/*",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 6,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": "jnxFruTable"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.1.15.1.8.7.1.0.0",
"sensor_index": "jnxFruName.7.1.0.0",
"sensor_type": "jnxFruTable",
"sensor_descr": "FPC: QFX5100-48S-6Q @ 0/*/*",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 6,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": "jnxFruTable"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.1.15.1.8.8.1.1.0",
"sensor_index": "jnxFruName.8.1.1.0",
"sensor_type": "jnxFruTable",
"sensor_descr": "PIC: 48x10G-6x40G @ 0/0/*",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 6,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": "jnxFruTable"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.1.15.1.8.9.1.0.0",
"sensor_index": "jnxFruName.9.1.0.0",
"sensor_type": "jnxFruTable",
"sensor_descr": "Routing Engine 0",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 6,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": "jnxFruTable"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.4.2.3.1.0",
"sensor_index": "0",
"sensor_type": "jnxRedAlarmState",
"sensor_descr": "Red Alarm",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 2,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": "jnxRedAlarmState"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.40.1.4.1.1.1.3.0",
"sensor_index": "jnxVirtualChassisMemberSerialnumber.0",
"sensor_type": "jnxVirtualChassisMemberTable",
"sensor_descr": "TA3716412345",
"group": "Virtual Chassis Members",
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 1,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": "jnxVirtualChassisMemberTable"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.4.2.2.1.0",
"sensor_index": "0",
"sensor_type": "jnxYellowAlarmState",
"sensor_descr": "Yellow Alarm",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 3,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": "jnxYellowAlarmState"
},
{
"sensor_deleted": 0,
"sensor_class": "temperature",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.1.13.1.7.7.1.0.0",
"sensor_index": "7.1.0.0",
"sensor_type": "junos",
"sensor_descr": "FPC: QFX5100-48S-6Q @ 0/*/*",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 41,
"sensor_limit": 61,
"sensor_limit_warn": null,
"sensor_limit_low": 31,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "temperature",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.1.13.1.7.9.1.0.0",
"sensor_index": "9.1.0.0",
"sensor_type": "junos",
"sensor_descr": "Routing Engine 0",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 26,
"sensor_limit": 46,
"sensor_limit_warn": null,
"sensor_limit_low": 16,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "temperature",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.60.1.1.1.1.8.513",
"sensor_index": "rx-513",
"sensor_type": "junos",
"sensor_descr": "xe-0/0/0 Temperature",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 42,
"sensor_limit": 90,
"sensor_limit_warn": 85,
"sensor_limit_low": -10,
"sensor_limit_low_warn": -5,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": "513",
"entPhysicalIndex_measured": "ports",
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "temperature",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.2636.3.60.1.1.1.1.8.518",
"sensor_index": "rx-518",
"sensor_type": "junos",
"sensor_descr": "xe-0/0/1 Temperature",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 43,
"sensor_limit": 90,
"sensor_limit_warn": 85,
"sensor_limit_low": -10,
"sensor_limit_low_warn": -5,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": "518",
"entPhysicalIndex_measured": "ports",
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
}
],
"state_indexes": [
{
"state_name": "jnxFruTable",
"state_descr": "unknown",
"state_draw_graph": 1,
"state_value": 1,
"state_generic_value": 3
},
{
"state_name": "jnxFruTable",
"state_descr": "empty",
"state_draw_graph": 1,
"state_value": 2,
"state_generic_value": 3
},
{
"state_name": "jnxFruTable",
"state_descr": "present",
"state_draw_graph": 1,
"state_value": 3,
"state_generic_value": 1
},
{
"state_name": "jnxFruTable",
"state_descr": "ready",
"state_draw_graph": 1,
"state_value": 4,
"state_generic_value": 0
},
{
"state_name": "jnxFruTable",
"state_descr": "announceOnline",
"state_draw_graph": 1,
"state_value": 5,
"state_generic_value": 0
},
{
"state_name": "jnxFruTable",
"state_descr": "online",
"state_draw_graph": 1,
"state_value": 6,
"state_generic_value": 0
},
{
"state_name": "jnxFruTable",
"state_descr": "anounceOffline",
"state_draw_graph": 1,
"state_value": 7,
"state_generic_value": 1
},
{
"state_name": "jnxFruTable",
"state_descr": "offline",
"state_draw_graph": 1,
"state_value": 8,
"state_generic_value": 2
},
{
"state_name": "jnxFruTable",
"state_descr": "diagnostic",
"state_draw_graph": 1,
"state_value": 9,
"state_generic_value": 3
},
{
"state_name": "jnxFruTable",
"state_descr": "standby",
"state_draw_graph": 1,
"state_value": 10,
"state_generic_value": 3
},
{
"state_name": "jnxRedAlarmState",
"state_descr": "unknown",
"state_draw_graph": 1,
"state_value": 1,
"state_generic_value": 3
},
{
"state_name": "jnxRedAlarmState",
"state_descr": "off",
"state_draw_graph": 1,
"state_value": 2,
"state_generic_value": 0
},
{
"state_name": "jnxRedAlarmState",
"state_descr": "on",
"state_draw_graph": 1,
"state_value": 3,
"state_generic_value": 2
},
{
"state_name": "jnxVirtualChassisMemberTable",
"state_descr": "master",
"state_draw_graph": 0,
"state_value": 1,
"state_generic_value": 0
},
{
"state_name": "jnxVirtualChassisMemberTable",
"state_descr": "backup",
"state_draw_graph": 0,
"state_value": 2,
"state_generic_value": 0
},
{
"state_name": "jnxVirtualChassisMemberTable",
"state_descr": "linecard",
"state_draw_graph": 0,
"state_value": 3,
"state_generic_value": 0
},
{
"state_name": "jnxYellowAlarmState",
"state_descr": "unknown",
"state_draw_graph": 1,
"state_value": 1,
"state_generic_value": 3
},
{
"state_name": "jnxYellowAlarmState",
"state_descr": "off",
"state_draw_graph": 1,
"state_value": 2,
"state_generic_value": 0
},
{
"state_name": "jnxYellowAlarmState",
"state_descr": "on",
"state_draw_graph": 1,
"state_value": 3,
"state_generic_value": 2
}
]
}
"poller": "matches discovery"
},
"storage": {
"discovery": {

View File

File diff suppressed because it is too large Load Diff