Skip to content

Commit ccdce91

Browse files
rolfbergheimlaf
andauthored
Enexus wrong oid in the state sensor for mainslow (librenms#18356)
* Wrond oid index in the state sensor for mainslow * Update enexus.json * added test data * Added test data for all the varians --------- Co-authored-by: Neil Lathwood <[email protected]>
1 parent d2346ec commit ccdce91

File tree

8 files changed

+1497
-4152
lines changed

8 files changed

+1497
-4152
lines changed

resources/definitions/os_discovery/enexus.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ modules:
8181
-
8282
oid: SP2-MIB::mainsMainsFailure
8383
value: SP2-MIB::mainsMainsFailureStatus
84-
num_oid: '.1.3.6.1.4.1.12148.10.3.2.5.{{ $index }}'
84+
num_oid: '.1.3.6.1.4.1.12148.10.3.2.1.{{ $index }}'
8585
descr: SP2-MIB::mainsMainsFailureDescription
8686
state_name: mainsMainsFailureStatus
8787
group: System

tests/data/enexus.json

Lines changed: 1083 additions & 54 deletions
Large diffs are not rendered by default.

tests/data/enexus_eltek-smartpack2-syst.json

Lines changed: 2 additions & 2192 deletions
Large diffs are not rendered by default.

tests/data/enexus_enexus.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@
752752
"sensor_deleted": 0,
753753
"sensor_class": "state",
754754
"poller_type": "snmp",
755-
"sensor_oid": ".1.3.6.1.4.1.12148.10.3.2.5.0",
755+
"sensor_oid": ".1.3.6.1.4.1.12148.10.3.2.1.0",
756756
"sensor_index": "0",
757757
"sensor_type": "mainsMainsFailureStatus",
758758
"sensor_descr": "MainsLow",
@@ -4058,14 +4058,14 @@
40584058
"sensor_deleted": 0,
40594059
"sensor_class": "state",
40604060
"poller_type": "snmp",
4061-
"sensor_oid": ".1.3.6.1.4.1.12148.10.3.2.5.0",
4061+
"sensor_oid": ".1.3.6.1.4.1.12148.10.3.2.1.0",
40624062
"sensor_index": "0",
40634063
"sensor_type": "mainsMainsFailureStatus",
40644064
"sensor_descr": "MainsLow",
40654065
"group": "System",
40664066
"sensor_divisor": 1,
40674067
"sensor_multiplier": 1,
4068-
"sensor_current": 0,
4068+
"sensor_current": 1,
40694069
"sensor_limit": null,
40704070
"sensor_limit_warn": null,
40714071
"sensor_limit_low": null,
@@ -4074,7 +4074,7 @@
40744074
"sensor_custom": "No",
40754075
"entPhysicalIndex": null,
40764076
"entPhysicalIndex_measured": null,
4077-
"sensor_prev": 1,
4077+
"sensor_prev": null,
40784078
"user_func": null,
40794079
"rrd_type": "GAUGE",
40804080
"state_name": "mainsMainsFailureStatus"

tests/data/enexus_smartpacks.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@
577577
"sensor_deleted": 0,
578578
"sensor_class": "state",
579579
"poller_type": "snmp",
580-
"sensor_oid": ".1.3.6.1.4.1.12148.10.3.2.5.0",
580+
"sensor_oid": ".1.3.6.1.4.1.12148.10.3.2.1.0",
581581
"sensor_index": "0",
582582
"sensor_type": "mainsMainsFailureStatus",
583583
"sensor_descr": "MainsLow",
@@ -3118,14 +3118,14 @@
31183118
"sensor_deleted": 0,
31193119
"sensor_class": "state",
31203120
"poller_type": "snmp",
3121-
"sensor_oid": ".1.3.6.1.4.1.12148.10.3.2.5.0",
3121+
"sensor_oid": ".1.3.6.1.4.1.12148.10.3.2.1.0",
31223122
"sensor_index": "0",
31233123
"sensor_type": "mainsMainsFailureStatus",
31243124
"sensor_descr": "MainsLow",
31253125
"group": "System",
31263126
"sensor_divisor": 1,
31273127
"sensor_multiplier": 1,
3128-
"sensor_current": 0,
3128+
"sensor_current": 1,
31293129
"sensor_limit": null,
31303130
"sensor_limit_warn": null,
31313131
"sensor_limit_low": null,
@@ -3134,7 +3134,7 @@
31343134
"sensor_custom": "No",
31353135
"entPhysicalIndex": null,
31363136
"entPhysicalIndex_measured": null,
3137-
"sensor_prev": 1,
3137+
"sensor_prev": null,
31383138
"user_func": null,
31393139
"rrd_type": "GAUGE",
31403140
"state_name": "mainsMainsFailureStatus"

tests/data/enexus_smartpacks2.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@
577577
"sensor_deleted": 0,
578578
"sensor_class": "state",
579579
"poller_type": "snmp",
580-
"sensor_oid": ".1.3.6.1.4.1.12148.10.3.2.5.0",
580+
"sensor_oid": ".1.3.6.1.4.1.12148.10.3.2.1.0",
581581
"sensor_index": "0",
582582
"sensor_type": "mainsMainsFailureStatus",
583583
"sensor_descr": "MainsLow",
@@ -3118,14 +3118,14 @@
31183118
"sensor_deleted": 0,
31193119
"sensor_class": "state",
31203120
"poller_type": "snmp",
3121-
"sensor_oid": ".1.3.6.1.4.1.12148.10.3.2.5.0",
3121+
"sensor_oid": ".1.3.6.1.4.1.12148.10.3.2.1.0",
31223122
"sensor_index": "0",
31233123
"sensor_type": "mainsMainsFailureStatus",
31243124
"sensor_descr": "MainsLow",
31253125
"group": "System",
31263126
"sensor_divisor": 1,
31273127
"sensor_multiplier": 1,
3128-
"sensor_current": 0,
3128+
"sensor_current": 1,
31293129
"sensor_limit": null,
31303130
"sensor_limit_warn": null,
31313131
"sensor_limit_low": null,
@@ -3134,7 +3134,7 @@
31343134
"sensor_custom": "No",
31353135
"entPhysicalIndex": null,
31363136
"entPhysicalIndex_measured": null,
3137-
"sensor_prev": 1,
3137+
"sensor_prev": null,
31383138
"user_func": null,
31393139
"rrd_type": "GAUGE",
31403140
"state_name": "mainsMainsFailureStatus"

0 commit comments

Comments
 (0)