From 437322f8cbc14e06ae197fe9dd30e15b567f7a2d Mon Sep 17 00:00:00 2001 From: O Palivan Date: Sun, 30 Oct 2022 11:13:41 +0100 Subject: [PATCH] TAIT-Infra93 - Fix state + skip_values for Battery (#14541) --- .../definitions/discovery/tait-infra93.yaml | 13 +++-- tests/data/tait-infra93_tb9300.json | 54 ++----------------- 2 files changed, 13 insertions(+), 54 deletions(-) diff --git a/includes/definitions/discovery/tait-infra93.yaml b/includes/definitions/discovery/tait-infra93.yaml index e4fee1f518..09151cad91 100644 --- a/includes/definitions/discovery/tait-infra93.yaml +++ b/includes/definitions/discovery/tait-infra93.yaml @@ -44,7 +44,7 @@ modules: index: 'healthNetworkConnLogChan1State.{{ $index }}' state_name: healthNetworkConnLogChan1State states: - - { descr: inactive, graph: 1, value: 0, generic: 1 } + - { descr: inactive, graph: 1, value: 0, generic: 3 } - { descr: idle, graph: 1, value: 1, generic: 3 } - { descr: traffic, graph: 1, value: 2, generic: 0 } - { descr: control, graph: 1, value: 3, generic: 0 } @@ -60,7 +60,7 @@ modules: index: 'healthNetworkConnLogChan2State.{{ $index }}' state_name: healthNetworkConnLogChan2State states: - - { descr: inactive, graph: 1, value: 0, generic: 1 } + - { descr: inactive, graph: 1, value: 0, generic: 3 } - { descr: idle, graph: 1, value: 1, generic: 3 } - { descr: traffic, graph: 1, value: 2, generic: 0 } - { descr: control, graph: 1, value: 3, generic: 0 } @@ -115,6 +115,11 @@ modules: - { descr: bad, graph: 1, value: 0, generic: 1 } - { descr: good, graph: 1, value: 1, generic: 0 } - { descr: not fitted, graph: 1, value: 2, generic: 3 } + skip_values: + - + oid: pmuStateBusConnect + op: '=' + value: '2' - oid: pmuState value: pmuStateBusConnect @@ -137,11 +142,11 @@ modules: states: - { descr: unconnected, graph: 1, value: 0, generic: 1 } - { descr: deprecatedUnconnected, graph: 1, value: 1, generic: 1 } - - { descr: standby, graph: 1, value: 2, generic: 1 } + - { descr: standby, graph: 1, value: 2, generic: 3 } - { descr: dmr-aligned, graph: 1, value: 3, generic: 0 } - { descr: dmr-offset, graph: 1, value: 4, generic: 3 } - { descr: dmr-two-slot-data, graph: 1, value: 5, generic: 0 } - - { descr: dmr-hibernate, graph: 1, value: 6, generic: 1 } + - { descr: dmr-hibernate, graph: 1, value: 6, generic: 3 } - { descr: analogue, graph: 1, value: 7, generic: 3 } - { descr: test-mode, graph: 1, value: 8, generic: 3 } - { descr: dmr-tier2-aligned, graph: 1, value: 9, generic: 0 } diff --git a/tests/data/tait-infra93_tb9300.json b/tests/data/tait-infra93_tb9300.json index 0fb1ebeb27..7ec61001ec 100644 --- a/tests/data/tait-infra93_tb9300.json +++ b/tests/data/tait-infra93_tb9300.json @@ -2040,31 +2040,6 @@ "rrd_type": "GAUGE", "state_name": "pmuStateAuxOutState" }, - { - "sensor_deleted": 0, - "sensor_class": "state", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.4.1.3570.2.2.2.1.2.4.2.2.0", - "sensor_index": "pmuStateBatteryInState.0", - "sensor_type": "pmuStateBatteryInState", - "sensor_descr": "PMU DC power input state", - "group": "PMUState", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "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": "pmuStateBatteryInState" - }, { "sensor_deleted": 0, "sensor_class": "state", @@ -3214,7 +3189,7 @@ "state_descr": "inactive", "state_draw_graph": 1, "state_value": 0, - "state_generic_value": 1 + "state_generic_value": 3 }, { "state_name": "healthNetworkConnLogChan1State", @@ -3263,7 +3238,7 @@ "state_descr": "inactive", "state_draw_graph": 1, "state_value": 0, - "state_generic_value": 1 + "state_generic_value": 3 }, { "state_name": "healthNetworkConnLogChan2State", @@ -3347,7 +3322,7 @@ "state_descr": "standby", "state_draw_graph": 1, "state_value": 2, - "state_generic_value": 1 + "state_generic_value": 3 }, { "state_name": "linkInfoCtrlProtocolStatus", @@ -3375,7 +3350,7 @@ "state_descr": "dmr-hibernate", "state_draw_graph": 1, "state_value": 6, - "state_generic_value": 1 + "state_generic_value": 3 }, { "state_name": "linkInfoCtrlProtocolStatus", @@ -4231,27 +4206,6 @@ "state_value": 2, "state_generic_value": 3 }, - { - "state_name": "pmuStateBatteryInState", - "state_descr": "bad", - "state_draw_graph": 1, - "state_value": 0, - "state_generic_value": 1 - }, - { - "state_name": "pmuStateBatteryInState", - "state_descr": "good", - "state_draw_graph": 1, - "state_value": 1, - "state_generic_value": 0 - }, - { - "state_name": "pmuStateBatteryInState", - "state_descr": "not fitted", - "state_draw_graph": 1, - "state_value": 2, - "state_generic_value": 3 - }, { "state_name": "pmuStateBusConnect", "state_descr": "connected",