From 8c4205c61458126ca6e346b800331a0c02acd048 Mon Sep 17 00:00:00 2001 From: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com> Date: Tue, 19 Mar 2024 10:24:07 +0100 Subject: [PATCH] refactor - remove unused entPhysicalIndex_measured (#15892) * remove unused entPhysicalIndex_measured * tests * tests * doc * entPhysicalIndex_measured must be ports OR null currently * Should not pass tests * tests * back to normal --- doc/Developing/os/Health-Information.md | 9 +- .../discovery/alpineoe-tdcmedfa.yaml | 35 ------ includes/definitions/discovery/rutos-2xx.yaml | 1 - .../definitions/discovery/rutos-rutx.yaml | 4 - includes/definitions/discovery/rutos.yaml | 1 - misc/discovery_schema.json | 6 +- .../alpineoe-tdcmedfa_alpineoe-tdcmedfa.json | 104 +++++++++--------- tests/data/rutos-2xx.json | 52 ++++----- tests/data/rutos-rutx_rut360.json | 8 +- tests/data/rutos-rutx_rutx11.json | 8 +- tests/data/rutos.json | 46 ++++---- 11 files changed, 118 insertions(+), 156 deletions(-) diff --git a/doc/Developing/os/Health-Information.md b/doc/Developing/os/Health-Information.md index 4d9fca2187..18c86a5535 100644 --- a/doc/Developing/os/Health-Information.md +++ b/doc/Developing/os/Health-Information.md @@ -117,10 +117,11 @@ are as follows: over (see note below). - `skip_value_lt` (optional): If sensor value is less than this, skip the discovery. - `skip_value_gt` (optional): If sensor value is greater than this, skip the discovery. -- `entPhysicalIndex` (optional): If the sensor belongs to a physical - entity then you can specify the index here. -- `entPhysicalIndex_measured` (optional): If the sensor belongs to a - physical entity then you can specify the entity type here. +- `entPhysicalIndex` and `entPhysicalIndex_measured` (optional) : If the + sensor belongs to a physical entity then you can link them here. The currently + supported variants are : + - `entPhysicalIndex` contains the entPhysicalIndex from entPhysical table, and `entPhysicalIndex_measured` is NULL + - `entPhysicalIndex` contains "ifIndex" value of the linked port and `entPhysicalIndex_measured` contains "ports" - `user_func` (optional): You can provide a function name for the sensors value to be processed through (i.e. Convert fahrenheit to celsius use `fahrenheit_to_celsius`) diff --git a/includes/definitions/discovery/alpineoe-tdcmedfa.yaml b/includes/definitions/discovery/alpineoe-tdcmedfa.yaml index c080ce95c8..1336e563cb 100644 --- a/includes/definitions/discovery/alpineoe-tdcmedfa.yaml +++ b/includes/definitions/discovery/alpineoe-tdcmedfa.yaml @@ -27,7 +27,6 @@ modules: descr: 'Slot {{ $index }}' index: 'alpineTEBISlotTemperature.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' low_limit: alpineTeatTempLowAlarmThld low_warn_limit: alpineTeatTempLowWarningThld warn_limit : alpineTeatTempHighWarningThld @@ -40,7 +39,6 @@ modules: descr: 'Slot {{ $index }}' index: 'gceTemperature.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'EDFA' high_limit : gceaTemperatureThld group: 'EDFA' state: @@ -52,7 +50,6 @@ modules: descr: 'Slot {{ $index }} : Power 1' index: 'alpineTEBISlotPower1Status.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' group: 'Power' state_name: powerAlarm states: @@ -67,7 +64,6 @@ modules: descr: 'Slot {{ $index }} : Power 2' index: 'alpineTEBISlotPower2Status.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' group: 'Power' state_name: powerAlarm states: @@ -81,7 +77,6 @@ modules: descr: 'Slot {{ $index }} : PSU Input' index: 'alpineTEPowerCardPowerInStatus.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' group: 'Power' state_name: psuPresence states: @@ -95,7 +90,6 @@ modules: descr: 'Slot {{ $index }} : PSU Output' index: 'alpineTEPowerCardPowerOutStatus.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' group: 'Power' state_name: powerOutAlarm states: @@ -110,7 +104,6 @@ modules: descr: 'Slot {{ $index }} : Alarm Input Loss' index: 'geaiLossInputAlarm.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'EDFA' group: 'Alarm' state_name: lossAlarm states: @@ -124,7 +117,6 @@ modules: descr: 'Slot {{ $index }} : Alarm Output Loss' index: 'geaiLossOutputAlarm.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'EDFA' group: 'Alarm' state_name: lossAlarm states: @@ -138,7 +130,6 @@ modules: descr: 'Slot {{ $index }} : Status' index: 'alpineTESlotStatus.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' group: 'Slot' state_name: slotStatus states: @@ -152,7 +143,6 @@ modules: descr: 'Slot {{ $index }} : Fan 1' index: 'alpineTEFanCardFan1Status.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' group: 'Fan' state_name: fanStatus states: @@ -166,7 +156,6 @@ modules: descr: 'Slot {{ $index }} : Fan 2' index: 'alpineTEFanCardFan2Status.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' group: 'Fan' state_name: fanStatus states: @@ -180,7 +169,6 @@ modules: descr: 'Slot {{ $index }} : Fan 3' index: 'alpineTEFanCardFan3Status.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' group: 'Fan' state_name: fanStatus states: @@ -194,7 +182,6 @@ modules: descr: 'Slot {{ $index }} : Work mode' index: 'gctiWorkMode.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'TDCM' group: 'Mode' state_name: workModeTDCM states: @@ -208,7 +195,6 @@ modules: descr: 'Slot {{ $index }} : Save config' index: 'gctiSaveConfig.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'TDCM' state_name: saveConfigStatus group: 'Config' states: @@ -222,7 +208,6 @@ modules: num_oid: '.1.3.6.1.4.1.52326.1.1.1.1.3.{{ $index }}' descr: 'Slot {{ $index }} : Work mode' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'EDFA' group: 'Mode' index: 'gceMode.{{ $index }}' state_name: workModeEDFA @@ -237,7 +222,6 @@ modules: descr: 'Slot {{ $index }} : Save config' index: 'gceSaveConfig.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'EDFA' state_name: saveConfigStatus group: 'Config' states: @@ -252,7 +236,6 @@ modules: descr: 'Slot {{ $index }} : Common alarm' index: 'geaiCommonAlarm.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'EDFA' group: 'Alarm' state_name: commonAlarm states: @@ -266,7 +249,6 @@ modules: descr: 'Slot {{ $index }} : Temperature alarm' index: 'geaiPumpTemperatureAlarm.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'EDFA' group: 'Alarm' state_name: tempAlarm states: @@ -280,7 +262,6 @@ modules: descr: 'Slot {{ $index }} : Bias alarm' index: 'geaiPumpBiasAlarm.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'EDFA' group: 'Alarm' state_name: biasAlarm states: @@ -297,7 +278,6 @@ modules: descr: 'Slot {{ $index }} : Fan 1' index: 'alpineTEFanCardFan1Speed.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' - oid: alpineTdcmEdfaSystem @@ -306,7 +286,6 @@ modules: descr: 'Slot {{ $index }} : Fan 2' index: 'alpineTEFanCardFan2Speed.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' - oid: alpineTdcmEdfaSystem @@ -315,7 +294,6 @@ modules: descr: 'Slot {{ $index }} : Fan 3' index: 'alpineTEFanCardFan3Speed.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' dbm: data: @@ -326,7 +304,6 @@ modules: descr: 'Slot {{ $index }} : Power Input' index: 'gceInputPower.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'EDFA' low_limit: gceaInputPowerThld group: 'Input' @@ -337,7 +314,6 @@ modules: descr: 'Slot {{ $index }} : Power Output' index: 'gceOuputPower.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'EDFA' low_limit: gceaOutputPowerThld group: 'Output' @@ -348,7 +324,6 @@ modules: descr: 'Slot {{ $index }} : Power Output Target' index: 'gceOutputPowerTarget.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'EDFA' group: 'Output' quality_factor: @@ -360,7 +335,6 @@ modules: descr: 'Slot {{ $index }} : Gain' index: 'gceGain.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'EDFA' - oid: alpineGenCardEdfa @@ -369,7 +343,6 @@ modules: descr: 'Slot {{ $index }} : Gain Target' index: 'gceGainTarget.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'EDFA' voltage: data: @@ -380,7 +353,6 @@ modules: descr: 'Slot {{ $index }} : Power 1' index: 'alpineTEBISlotPower1Val.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' group: 'Power' - oid: alpineTdcmEdfaSystem @@ -389,7 +361,6 @@ modules: descr: 'Slot {{ $index }} : Power 2' index: 'alpineTEBISlotPower2Val.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' group: 'Power' - @@ -399,7 +370,6 @@ modules: descr: 'Slot {{ $index }} : PSU Ouput' index: 'alpineTEPowerCardPowerOutVal.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' group: 'Power' - @@ -409,7 +379,6 @@ modules: descr: 'Slot {{ $index }} : Fan' index: 'alpineTEFanCardPower1Val.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' group: 'Fan' count: @@ -421,7 +390,6 @@ modules: descr: 'Slot {{ $index }} : Fans' index: 'alpineTEFanCardFansTotalCnt.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' group: 'Fan' - oid: alpineTdcmEdfaSystem @@ -430,7 +398,6 @@ modules: descr: 'Slot {{ $index }} : Powers' index: 'alpineTEBISlotPowerTotalCnt.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Slot' group: 'Power' chromatic_dispersion: @@ -442,7 +409,6 @@ modules: descr: 'Slot {{ $index }} : Default' index: 'gctiDefaultDispersion.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'TDCM' - oid: alpineGenCardTdcm @@ -451,5 +417,4 @@ modules: descr: 'Slot {{ $index }} : Current' index: 'gctiCurrentDispersion.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'TDCM' diff --git a/includes/definitions/discovery/rutos-2xx.yaml b/includes/definitions/discovery/rutos-2xx.yaml index 7a5051471b..fa7c33e9be 100644 --- a/includes/definitions/discovery/rutos-2xx.yaml +++ b/includes/definitions/discovery/rutos-2xx.yaml @@ -85,7 +85,6 @@ modules: oid: Signal num_oid: ".1.3.6.1.4.1.48690.2.4.{{ $index }}" entPhysicalIndex: "{{ $index }}" - entPhysicalIndex_measured: "Signal" descr: "Signal Level" group: Mobile index: "Signal.{{ $index }}" diff --git a/includes/definitions/discovery/rutos-rutx.yaml b/includes/definitions/discovery/rutos-rutx.yaml index 8e58a102b2..85ca29acb0 100644 --- a/includes/definitions/discovery/rutos-rutx.yaml +++ b/includes/definitions/discovery/rutos-rutx.yaml @@ -170,7 +170,6 @@ modules: oid: mSignal num_oid: ".1.3.6.1.4.1.48690.2.2.1.12.{{ $index }}" entPhysicalIndex: "{{ $index }}" - entPhysicalIndex_measured: "Signal" descr: "Signal Level - RSSI" group: Mobile index: "mSignal.{{ $index }}" @@ -181,7 +180,6 @@ modules: oid: mRSRP num_oid: ".1.3.6.1.4.1.48690.2.2.1.20.{{ $index }}" entPhysicalIndex: "{{ $index }}" - entPhysicalIndex_measured: "Signal" descr: "Signal Level - RSRP" group: Mobile index: "mRSRP.{{ $index }}" @@ -192,7 +190,6 @@ modules: oid: mRSRQ num_oid: ".1.3.6.1.4.1.48690.2.2.1.21.{{ $index }}" entPhysicalIndex: "{{ $index }}" - entPhysicalIndex_measured: "Signal" descr: "Signal Level - RSRQ" group: Mobile index: "mRSRQ.{{ $index }}" @@ -205,7 +202,6 @@ modules: oid: mSINR num_oid: ".1.3.6.1.4.1.48690.2.2.1.19.{{ $index }}" entPhysicalIndex: "{{ $index }}" - entPhysicalIndex_measured: "Signal" descr: "Signal Level - SINR" group: Mobile index: "mSINR.{{ $index }}" diff --git a/includes/definitions/discovery/rutos.yaml b/includes/definitions/discovery/rutos.yaml index f13562cf41..c6c2f6e946 100644 --- a/includes/definitions/discovery/rutos.yaml +++ b/includes/definitions/discovery/rutos.yaml @@ -60,7 +60,6 @@ modules: value: Signal num_oid: '.1.3.6.1.4.1.48690.2.4.{{ $index }}' entPhysicalIndex: '{{ $index }}' - entPhysicalIndex_measured: 'Signal' descr: 'signal' index: 'Signal.{{ $index }}' diff --git a/misc/discovery_schema.json b/misc/discovery_schema.json index a516355866..72ba50a4dc 100644 --- a/misc/discovery_schema.json +++ b/misc/discovery_schema.json @@ -289,7 +289,8 @@ "type": ["integer", "string"] }, "entPhysicalIndex_measured": { - "type": "string" + "type": [ "string", "null" ], + "enum": [ "ports", null ] }, "snmp_no_Ih_flag": { "type": "string" @@ -469,7 +470,8 @@ "type": ["integer", "string"] }, "entPhysicalIndex_measured": { - "type": "string" + "type": [ "string", "null" ], + "enum": [ "ports", null ] }, "user_func": { "type": "string" diff --git a/tests/data/alpineoe-tdcmedfa_alpineoe-tdcmedfa.json b/tests/data/alpineoe-tdcmedfa_alpineoe-tdcmedfa.json index 5c1ec46779..4954887717 100644 --- a/tests/data/alpineoe-tdcmedfa_alpineoe-tdcmedfa.json +++ b/tests/data/alpineoe-tdcmedfa_alpineoe-tdcmedfa.json @@ -252,7 +252,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "TDCM", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -277,7 +277,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "TDCM", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -302,7 +302,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -327,7 +327,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -352,7 +352,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -377,7 +377,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -402,7 +402,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2.1", - "entPhysicalIndex_measured": "EDFA", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -427,7 +427,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2.1", - "entPhysicalIndex_measured": "EDFA", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -452,7 +452,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2.1", - "entPhysicalIndex_measured": "EDFA", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -477,7 +477,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -502,7 +502,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -527,7 +527,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -552,7 +552,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -577,7 +577,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -602,7 +602,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -627,7 +627,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2.1", - "entPhysicalIndex_measured": "EDFA", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -652,7 +652,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2.1", - "entPhysicalIndex_measured": "EDFA", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -677,7 +677,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2.1", - "entPhysicalIndex_measured": "EDFA", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -702,7 +702,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2.1", - "entPhysicalIndex_measured": "EDFA", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -727,7 +727,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -752,7 +752,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -777,7 +777,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -802,7 +802,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -827,7 +827,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -852,7 +852,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -877,7 +877,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2.1", - "entPhysicalIndex_measured": "EDFA", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -902,7 +902,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2.1", - "entPhysicalIndex_measured": "EDFA", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -927,7 +927,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -952,7 +952,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -977,7 +977,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1002,7 +1002,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1027,7 +1027,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1052,7 +1052,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1077,7 +1077,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1102,7 +1102,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1127,7 +1127,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2.1", - "entPhysicalIndex_measured": "EDFA", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1152,7 +1152,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "TDCM", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1177,7 +1177,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1202,7 +1202,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1227,7 +1227,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2.1", - "entPhysicalIndex_measured": "EDFA", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1252,7 +1252,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2.1", - "entPhysicalIndex_measured": "EDFA", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1277,7 +1277,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "TDCM", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1302,7 +1302,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1327,7 +1327,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1352,7 +1352,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2.1", - "entPhysicalIndex_measured": "EDFA", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1377,7 +1377,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1402,7 +1402,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1427,7 +1427,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1452,7 +1452,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1477,7 +1477,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1502,7 +1502,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -1527,7 +1527,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "2", - "entPhysicalIndex_measured": "Slot", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", diff --git a/tests/data/rutos-2xx.json b/tests/data/rutos-2xx.json index e865b29576..4d56e459eb 100644 --- a/tests/data/rutos-2xx.json +++ b/tests/data/rutos-2xx.json @@ -1437,8 +1437,8 @@ "ifName": "eth0", "portName": null, "ifIndex": 2, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "up", "ifOperStatus_prev": "up", @@ -1537,8 +1537,8 @@ "ifName": "eth1", "portName": null, "ifIndex": 3, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "down", "ifOperStatus_prev": "down", @@ -1637,8 +1637,8 @@ "ifName": "ip6tnl0", "portName": null, "ifIndex": 4, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "down", "ifOperStatus_prev": "down", @@ -1737,8 +1737,8 @@ "ifName": "ifb0", "portName": null, "ifIndex": 5, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "down", "ifOperStatus_prev": "down", @@ -1837,8 +1837,8 @@ "ifName": "ifb1", "portName": null, "ifIndex": 6, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "down", "ifOperStatus_prev": "down", @@ -1937,8 +1937,8 @@ "ifName": "gre0", "portName": null, "ifIndex": 7, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "down", "ifOperStatus_prev": "down", @@ -2037,8 +2037,8 @@ "ifName": "gretap0", "portName": null, "ifIndex": 8, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "down", "ifOperStatus_prev": "down", @@ -2137,8 +2137,8 @@ "ifName": "ip6gre0", "portName": null, "ifIndex": 9, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "down", "ifOperStatus_prev": "down", @@ -2237,8 +2237,8 @@ "ifName": "wwan0", "portName": null, "ifIndex": 10, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "up", "ifOperStatus_prev": "up", @@ -2337,8 +2337,8 @@ "ifName": "wwan0", "portName": null, "ifIndex": 11, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "up", "ifOperStatus_prev": "up", @@ -2437,8 +2437,8 @@ "ifName": "br-lan", "portName": null, "ifIndex": 12, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "up", "ifOperStatus_prev": "up", @@ -2537,8 +2537,8 @@ "ifName": "wlan0", "portName": null, "ifIndex": 13, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "up", "ifOperStatus_prev": "up", @@ -2827,7 +2827,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, - "entPhysicalIndex_measured": "Signal", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -3205,7 +3205,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, - "entPhysicalIndex_measured": "Signal", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", diff --git a/tests/data/rutos-rutx_rut360.json b/tests/data/rutos-rutx_rut360.json index 3fe703063b..522781b2ec 100644 --- a/tests/data/rutos-rutx_rut360.json +++ b/tests/data/rutos-rutx_rut360.json @@ -96,7 +96,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Signal", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -121,7 +121,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Signal", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -146,7 +146,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Signal", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -171,7 +171,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Signal", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", diff --git a/tests/data/rutos-rutx_rutx11.json b/tests/data/rutos-rutx_rutx11.json index 575dc27f54..1810f8aa55 100644 --- a/tests/data/rutos-rutx_rutx11.json +++ b/tests/data/rutos-rutx_rutx11.json @@ -5860,7 +5860,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Signal", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -5885,7 +5885,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Signal", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -5910,7 +5910,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Signal", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", @@ -5935,7 +5935,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": "1", - "entPhysicalIndex_measured": "Signal", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE", diff --git a/tests/data/rutos.json b/tests/data/rutos.json index 6e5768c014..bc67e3ecd8 100644 --- a/tests/data/rutos.json +++ b/tests/data/rutos.json @@ -1437,8 +1437,8 @@ "ifName": "eth0", "portName": null, "ifIndex": 2, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "down", "ifOperStatus_prev": "down", @@ -1637,8 +1637,8 @@ "ifName": "ip6tnl0", "portName": null, "ifIndex": 4, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "down", "ifOperStatus_prev": "down", @@ -1737,8 +1737,8 @@ "ifName": "ifb0", "portName": null, "ifIndex": 5, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "down", "ifOperStatus_prev": "down", @@ -1837,8 +1837,8 @@ "ifName": "ifb1", "portName": null, "ifIndex": 6, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "down", "ifOperStatus_prev": "down", @@ -1937,8 +1937,8 @@ "ifName": "gre0", "portName": null, "ifIndex": 7, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "down", "ifOperStatus_prev": "down", @@ -2037,8 +2037,8 @@ "ifName": "gretap0", "portName": null, "ifIndex": 8, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "down", "ifOperStatus_prev": "down", @@ -2137,8 +2137,8 @@ "ifName": "wwan0", "portName": null, "ifIndex": 10, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "up", "ifOperStatus_prev": "up", @@ -2237,8 +2237,8 @@ "ifName": "br-lan", "portName": null, "ifIndex": 11, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "down", "ifOperStatus_prev": "down", @@ -2337,8 +2337,8 @@ "ifName": "br-lan_dmz", "portName": null, "ifIndex": 12, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "down", "ifOperStatus_prev": "down", @@ -2437,8 +2437,8 @@ "ifName": "eth0.1", "portName": null, "ifIndex": 13, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "down", "ifOperStatus_prev": "down", @@ -2537,8 +2537,8 @@ "ifName": "tun_c_test", "portName": null, "ifIndex": 15, - "ifSpeed": 0, - "ifSpeed_prev": null, + "ifSpeed": null, + "ifSpeed_prev": 0, "ifConnectorPresent": "true", "ifOperStatus": "up", "ifOperStatus_prev": "up", @@ -2777,7 +2777,7 @@ "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, - "entPhysicalIndex_measured": "Signal", + "entPhysicalIndex_measured": null, "sensor_prev": null, "user_func": null, "rrd_type": "GAUGE",