Skip to content

Commit e8796ed

Browse files
dot-mikemurrant
andauthored
Fix Enexus by adding index to sensors in discovery (librenms#18492)
* fix: Enexus add indexs to sensors in discovery * fix: enexus partial revert index names to avoid breaking graphs change * Update test data * Restore sensor * restore test data to upstream * New updated test data, restore runtime index * Fix limit * fix case??? --------- Co-authored-by: Tony Murray <[email protected]>
1 parent 63b17de commit e8796ed

File tree

7 files changed

+1318
-457
lines changed

7 files changed

+1318
-457
lines changed

resources/definitions/os_discovery/enexus.yaml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ modules:
114114
descr: '{{ SP2-MIB::rectifierType }} {{ $index }} Status'
115115
entPhysicalIndex: '2{{ $index }}'
116116
state_name: rectifierStatus
117+
index: 'rectifierStatus.{{ $index }}'
117118
group: Rectifier
118119
states:
119120
- { descr: error, graph: 0, value: 0, generic: 2 }
@@ -172,7 +173,7 @@ modules:
172173
oid: SP2-MIB::load
173174
value: SP2-MIB::loadFusesStatus
174175
num_oid: '.1.3.6.1.4.1.12148.10.9.3.{{ $index }}'
175-
descr: Overal Load Fuses Status
176+
descr: Overall Load Fuses Status
176177
entPhysicalIndex: '10'
177178
state_name: loadFusesStatus
178179
group: Load Fuse
@@ -223,7 +224,7 @@ modules:
223224
oid: SP2-MIB::battery
224225
value: SP2-MIB::batteryStatus
225226
num_oid: '.1.3.6.1.4.1.12148.10.10.1.{{ $index }}'
226-
descr: Overal Battery Status
227+
descr: Overall Battery Status
227228
entPhysicalIndex: '10'
228229
state_name: batteryStatus
229230
group: Battery
@@ -355,6 +356,7 @@ modules:
355356
num_oid: '.1.3.6.1.4.1.12148.10.2.3.{{ $index }}'
356357
descr: System Mode
357358
state_name: powerSystemMode
359+
group: System
358360
states:
359361
- { descr: off, graph: 0, value: 0, generic: 0 }
360362
- { descr: test, graph: 0, value: 1, generic: 0 }
@@ -433,7 +435,7 @@ modules:
433435
value: SP2-MIB::batteryBankSymmetryMeasureValue
434436
num_oid: '.1.3.6.1.4.1.12148.10.10.18.6.1.6.{{ $index }}'
435437
descr: SP2-MIB::batteryBankSymmetryDescription
436-
index: 'battery.{{ $index }}'
438+
index: 'batteryBankSymmetry.{{ $index }}'
437439
entPhysicalIndex: '3{{ $index }}'
438440
group: Battery
439441
divisor: 100
@@ -449,7 +451,7 @@ modules:
449451
value: SP2-MIB::batteryMonitorSymmetryDeltaValue
450452
num_oid: '.1.3.6.1.4.1.12148.10.10.19.6.1.7.{{ $index }}'
451453
descr: SP2-MIB::batteryMonitorSymmetryDescription
452-
index: 'battery.{{ $index }}'
454+
index: 'batteryMonitorSymmetry.{{ $index }}'
453455
group: Battery
454456
divisor: 100
455457
warn_limit: SP2-MIB::batteryMonitorSymmetryMinorAlarmLevel
@@ -469,7 +471,7 @@ modules:
469471
index: 'current.{{ $index }}'
470472
group: Rectifier
471473
warn_limit: SP2-MIB::rectifiersCurrentMinorAlarmLevel
472-
high_limit: rectifiersCurrentMajorAlarmLevel
474+
high_limit: SP2-MIB::rectifiersCurrentMajorAlarmLevel
473475
skip_values:
474476
-
475477
device: hardware
@@ -502,8 +504,8 @@ modules:
502504
oid: SP2-MIB::batteryCurrents
503505
value: SP2-MIB::batteryCurrentsValue
504506
num_oid: '.1.3.6.1.4.1.12148.10.10.6.5.{{ $index }}'
505-
descr: Overal Battery Current
506-
index: 'battery.{{ $index }}'
507+
descr: Overall Battery Current
508+
index: 'batteryCurrent.{{ $index }}'
507509
entPhysicalIndex: '100'
508510
group: Battery
509511
divisor: 10
@@ -516,7 +518,7 @@ modules:
516518
value: SP2-MIB::batteryCurrentValue
517519
num_oid: '.1.3.6.1.4.1.12148.10.10.18.4.1.6.{{ $index }}'
518520
descr: batteryCurrentDescription
519-
index: 'battery.{{ $index }}'
521+
index: 'batteryBankCurrent.{{ $index }}'
520522
entPhysicalIndex: '3{{ $index }}'
521523
group: Battery
522524
divisor: 10
@@ -541,8 +543,9 @@ modules:
541543
oid: SP2-MIB::batteryTemperatures
542544
value: SP2-MIB::batteryTemperaturesValue
543545
num_oid: '.1.3.6.1.4.1.12148.10.10.7.5.{{ $index }}'
544-
descr: Overal Battery Temperature
546+
descr: Overall Battery Temperature
545547
entPhysicalIndex: '100'
548+
index: 'batteryTemperature.{{ $index }}'
546549
low_limit: SP2-MIB::batteryTemperaturesMinorLowLevel
547550
low_warn_limit: SP2-MIB::batteryTemperaturesMinorLowLevel
548551
warn_limit: SP2-MIB::batteryTemperaturesMinorHighLevel
@@ -553,6 +556,7 @@ modules:
553556
num_oid: '.1.3.6.1.4.1.12148.10.10.18.3.1.6.{{ $index }}'
554557
descr: SP2-MIB::batteryTemperatureDescription
555558
entPhysicalIndex: '3{{ $index }}'
559+
index: 'batteryBankTemperature.{{ $index }}'
556560
low_limit: SP2-MIB::batteryTemperatureMinorLowLevel
557561
low_warn_limit: SP2-MIB::batteryTemperatureMinorLowLevel
558562
warn_limit: SP2-MIB::batteryTemperatureMinorHighLevel
@@ -568,6 +572,7 @@ modules:
568572
num_oid: '.1.3.6.1.4.1.12148.10.13.13.5.{{ $index }}'
569573
descr: SP2-MIB::ambientTemperatureDescription
570574
entPhysicalIndex: '10'
575+
index: 'ambientTemperature.{{ $index }}'
571576
low_limit: SP2-MIB::ambientTemperatureMinorLowLevel
572577
low_warn_limit: SP2-MIB::ambientTemperatureMinorLowLevel
573578
warn_limit: SP2-MIB::ambientTemperatureMinorHighLevel
@@ -597,13 +602,15 @@ modules:
597602
entPhysicalIndex: '100'
598603
low_warn_limit: SP2-MIB::batteryRemainingCapacityMinorLowLevel
599604
low_limit: SP2-MIB::batteryRemainingCapacityMajorLowLevel
605+
index: 'batteryRemainingCapacity.{{ $index }}'
600606
-
601607
oid: SP2-MIB::rectifiersCapacity
602608
value: SP2-MIB::rectifiersCapacityValue
603609
num_oid: '.1.3.6.1.4.1.12148.10.5.3.5.{{ $index }}'
604610
descr: SP2-MIB::rectifiersCapacityDescription
605611
warn_limit: SP2-MIB::rectifiersCapacityMinorAlarmLevel
606612
high_limit: SP2-MIB::rectifiersCapacityMajorAlarmLevel
613+
index: 'rectifiersCapacity.{{ $index }}'
607614
-
608615
oid: SP2-MIB::batteryQuality
609616
value: SP2-MIB::batteryQualityValue
@@ -612,6 +619,7 @@ modules:
612619
entPhysicalIndex: '100'
613620
low_warn_limit: SP2-MIB::batteryQualityMinorAlarmLevel
614621
low_limit: SP2-MIB::batteryQualityMajorAlarmLevel
622+
index: 'batteryQuality.{{ $index }}'
615623
-
616624
oid: SP2-MIB::batteryUsedCapacity
617625
value: SP2-MIB::batteryUsedCapacityValue
@@ -620,6 +628,7 @@ modules:
620628
entPhysicalIndex: '100'
621629
warn_limit: SP2-MIB::batteryUsedCapacityMinorAlarmLevel
622630
high_limit: SP2-MIB::batteryUsedCapacityMajorAlarmLevel
631+
index: 'batteryUsedCapacity.{{ $index }}'
623632
count:
624633
data:
625634
-
@@ -629,6 +638,7 @@ modules:
629638
descr: SP2-MIB::batteryAhChargedDescription
630639
entPhysicalIndex: '100'
631640
divisor: 100
641+
index: 'batteryAhCharged.{{ $index }}'
632642
warn_limit: SP2-MIB::batteryAhChargedMinorHighLevel
633643
high_limit: SP2-MIB::batteryAhChargedMajorHighLevel
634644
-
@@ -637,6 +647,7 @@ modules:
637647
num_oid: '.1.3.6.1.4.1.12148.10.10.11.5.{{ $index }}'
638648
descr: SP2-MIB::batteryTotalCapacityDescription
639649
entPhysicalIndex: '100'
650+
index: 'batteryTotalCapacity.{{ $index }}'
640651
low_warn_limit: SP2-MIB::batteryTotalCapacityMinorLowLevel
641652
low_limit: SP2-MIB::batteryTotalCapacityMajorLowLevel
642653
-
@@ -664,4 +675,4 @@ modules:
664675
value: SP2-MIB::batteryTest
665676
index: 'batteryTest.{{ $index }}'
666677
num_oid: '.1.3.6.1.4.1.12148.10.10.16.5.{{ $index }}'
667-
descr: Battery Test Max Duration (minutes)
678+
descr: Battery Test Max Duration (minutes)

0 commit comments

Comments
 (0)