Skip to content

Commit 50d9192

Browse files
authored
Fix Modem Connection State sensor for Opengear (librenms#18371)
* Update opengear.yaml * Update condition for ogCellModemEnabled check * Update oid format in opengear.yaml * Update OID for cell modem status in opengear.yaml * Change cell modem enabled value from 1 to 2 * Update opengear.json * Update opengear_humidity.json
1 parent aef8816 commit 50d9192

File tree

3 files changed

+81
-3
lines changed

3 files changed

+81
-3
lines changed

resources/definitions/os_discovery/opengear.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ modules:
129129
- { value: 2, descr: Disconnected, graph: 2, generic: 2 }
130130
skip_values:
131131
-
132-
oid: 'ogCellModemEnabled.{{ $index }}'
133-
op: '!='
134-
value: enabled
132+
oid: 'OG-STATUSv2-MIB::ogCellModemEnabled'
133+
op: '='
134+
value: 2
135135
-
136136
oid: OG-STATUSv2-MIB::ogCellModemTable
137137
value: OG-STATUSv2-MIB::ogCellModemRadioTechnology

tests/data/opengear.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,6 +1926,31 @@
19261926
"rrd_type": "GAUGE",
19271927
"state_name": null
19281928
},
1929+
{
1930+
"sensor_deleted": 0,
1931+
"sensor_class": "state",
1932+
"poller_type": "snmp",
1933+
"sensor_oid": ".1.3.6.1.4.1.25049.17.17.1.5.1",
1934+
"sensor_index": "ogCellModemConnected.1",
1935+
"sensor_type": "ogCellModemConnected",
1936+
"sensor_descr": "Modem Connection State",
1937+
"group": null,
1938+
"sensor_divisor": 1,
1939+
"sensor_multiplier": 1,
1940+
"sensor_current": 2,
1941+
"sensor_limit": null,
1942+
"sensor_limit_warn": null,
1943+
"sensor_limit_low": null,
1944+
"sensor_limit_low_warn": null,
1945+
"sensor_alert": 1,
1946+
"sensor_custom": "No",
1947+
"entPhysicalIndex": null,
1948+
"entPhysicalIndex_measured": null,
1949+
"sensor_prev": null,
1950+
"user_func": null,
1951+
"rrd_type": "GAUGE",
1952+
"state_name": "ogCellModemConnected"
1953+
},
19291954
{
19301955
"sensor_deleted": 0,
19311956
"sensor_class": "state",
@@ -1978,6 +2003,20 @@
19782003
}
19792004
],
19802005
"state_indexes": [
2006+
{
2007+
"state_name": "ogCellModemConnected",
2008+
"state_descr": "Connected",
2009+
"state_draw_graph": 1,
2010+
"state_value": 1,
2011+
"state_generic_value": 0
2012+
},
2013+
{
2014+
"state_name": "ogCellModemConnected",
2015+
"state_descr": "Disconnected",
2016+
"state_draw_graph": 2,
2017+
"state_value": 2,
2018+
"state_generic_value": 2
2019+
},
19812020
{
19822021
"state_name": "ogCellModemRadioTechnology",
19832022
"state_descr": "Unavailable",

tests/data/opengear_humidity.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,6 +1968,31 @@
19681968
"rrd_type": "GAUGE",
19691969
"state_name": null
19701970
},
1971+
{
1972+
"sensor_deleted": 0,
1973+
"sensor_class": "state",
1974+
"poller_type": "snmp",
1975+
"sensor_oid": ".1.3.6.1.4.1.25049.17.17.1.5.1",
1976+
"sensor_index": "ogCellModemConnected.1",
1977+
"sensor_type": "ogCellModemConnected",
1978+
"sensor_descr": "Modem Connection State",
1979+
"group": null,
1980+
"sensor_divisor": 1,
1981+
"sensor_multiplier": 1,
1982+
"sensor_current": 1,
1983+
"sensor_limit": null,
1984+
"sensor_limit_warn": null,
1985+
"sensor_limit_low": null,
1986+
"sensor_limit_low_warn": null,
1987+
"sensor_alert": 1,
1988+
"sensor_custom": "No",
1989+
"entPhysicalIndex": null,
1990+
"entPhysicalIndex_measured": null,
1991+
"sensor_prev": null,
1992+
"user_func": null,
1993+
"rrd_type": "GAUGE",
1994+
"state_name": "ogCellModemConnected"
1995+
},
19711996
{
19721997
"sensor_deleted": 0,
19731998
"sensor_class": "state",
@@ -2020,6 +2045,20 @@
20202045
}
20212046
],
20222047
"state_indexes": [
2048+
{
2049+
"state_name": "ogCellModemConnected",
2050+
"state_descr": "Connected",
2051+
"state_draw_graph": 1,
2052+
"state_value": 1,
2053+
"state_generic_value": 0
2054+
},
2055+
{
2056+
"state_name": "ogCellModemConnected",
2057+
"state_descr": "Disconnected",
2058+
"state_draw_graph": 2,
2059+
"state_value": 2,
2060+
"state_generic_value": 2
2061+
},
20232062
{
20242063
"state_name": "ogCellModemRadioTechnology",
20252064
"state_descr": "Unavailable",

0 commit comments

Comments
 (0)