Skip to content

Commit 738496e

Browse files
authored
Corrected index for EXOS sensors (librenms#16928)
* Corrected index for EXOS sensors * Updated yaml discovery and test data
1 parent 0f23ba5 commit 738496e

File tree

7 files changed

+8082
-223
lines changed

7 files changed

+8082
-223
lines changed

includes/definitions/discovery/exos.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ modules:
1313
descr: 'Connectivity Unit State'
1414
index: 'connUnitState.{{ $index }}'
1515
state_name: connUnitState
16+
snmp_flags: ['-OteQUsab']
1617
states:
1718
- { value: 2, generic: 0, graph: 0, descr: Online }
1819
- { value: 3, generic: 2, graph: 0, descr: Offline }
@@ -24,6 +25,7 @@ modules:
2425
descr: 'Connectivity Unit Status'
2526
index: 'connUnitStatus.{{ $index }}'
2627
state_name: connUnitStatus
28+
snmp_flags: ['-OteQUsab']
2729
states:
2830
- { value: 1, generic: 3, graph: 0, descr: none }
2931
- { value: 2, generic: 3, graph: 0, descr: Unused }
@@ -37,6 +39,12 @@ modules:
3739
descr: 'Principal Unit'
3840
index: 'connUnitPrincipal.{{ $index }}'
3941
state_name: connUnitPrincipal
42+
snmp_flags: ['-OteQUsab']
43+
skip_values:
44+
-
45+
oid: connUnitPrincipal
46+
op: '='
47+
value: 1
4048
states:
4149
- { value: 1, generic: 3, graph: 0, descr: Unknown }
4250
- { value: 2, generic: 0, graph: 0, descr: No }
@@ -48,6 +56,7 @@ modules:
4856
descr: '{{ $connUnitSensorName }}'
4957
index: 'connUnitSensorName.{{ $index }}'
5058
state_name: connUnitSensorName
59+
snmp_flags: ['-OteQUsab']
5160
states:
5261
- { value: 1, generic: 3, graph: 0, descr: Unknown }
5362
- { value: 2, generic: 3, graph: 0, descr: Other }

includes/discovery/sensors/current/exos.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
foreach ($pre_cache['exos']['connUnitSensorTable'] as $index => $entry) {
77
if (preg_match('/Current.* ([: 0-9\.]+A)/', $entry['connUnitSensorMessage'], $temp_value)) {
88
$value = str_replace('A', '', $temp_value[1]);
9-
discover_sensor($valid['sensor'], 'current', $device, ".1.3.6.1.3.94.1.8.1.6.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.{$entry['connUnitSensorIndex']}", $entry['connUnitSensorIndex'], 'exos', $entry['connUnitSensorName'], 1, '1', null, null, null, null, $value);
9+
discover_sensor($valid['sensor'], 'current', $device, ".1.3.6.1.3.94.1.8.1.6.{$index}", $entry['connUnitSensorIndex'], 'exos', $entry['connUnitSensorName'], 1, '1', null, null, null, null, $value);
1010
}
1111
}
1212
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?php
22

33
echo 'connUnitSensorTable ';
4-
$pre_cache['exos']['connUnitSensorTable'] = snmpwalk_cache_multi_oid($device, 'connUnitSensorTable', [], 'FCMGMT-MIB');
4+
$pre_cache['exos']['connUnitSensorTable'] = snmpwalk_cache_multi_oid($device, 'connUnitSensorTable', [], 'FCMGMT-MIB', null, '-OteQUsab');

includes/discovery/sensors/temperature/exos.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
foreach ($pre_cache['exos']['connUnitSensorTable'] as $index => $entry) {
77
if (preg_match('/ Temp.* ([: 0-9]+ C)/', $entry['connUnitSensorMessage'], $temp_value)) {
88
[$value, $dump] = explode(' ', $temp_value[1]);
9-
discover_sensor($valid['sensor'], 'temperature', $device, ".1.3.6.1.3.94.1.8.1.6.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.{$entry['connUnitSensorIndex']}", $entry['connUnitSensorIndex'], 'exos', $entry['connUnitSensorName'], 1, '1', null, null, null, null, $value);
9+
discover_sensor($valid['sensor'], 'temperature', $device, ".1.3.6.1.3.94.1.8.1.6.{$index}", $entry['connUnitSensorIndex'], 'exos', $entry['connUnitSensorName'], 1, '1', null, null, null, null, $value);
1010
}
1111
}
1212
}

includes/discovery/sensors/voltage/exos.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
foreach ($pre_cache['exos']['connUnitSensorTable'] as $index => $entry) {
77
if (preg_match('/Voltage.* ([: 0-9\.]+V)/', $entry['connUnitSensorMessage'], $temp_value)) {
88
$value = str_replace('V', '', $temp_value[1]);
9-
discover_sensor($valid['sensor'], 'voltage', $device, ".1.3.6.1.3.94.1.8.1.6.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.{$entry['connUnitSensorIndex']}", $entry['connUnitSensorIndex'], 'exos', $entry['connUnitSensorName'], 1, '1', null, null, null, null, $value);
9+
discover_sensor($valid['sensor'], 'voltage', $device, ".1.3.6.1.3.94.1.8.1.6.{$index}", $entry['connUnitSensorIndex'], 'exos', $entry['connUnitSensorName'], 1, '1', null, null, null, null, $value);
1010
}
1111
}
1212
}

0 commit comments

Comments
 (0)