Hello!
I rencently added a new Flood sensor to my HWG STE2 unit → 1w-uni
https://www.hw-group.com/sensor/flood-detector-1w-uni-3m
I can see the sensor and value when doing snmpwalk, i can see it when i run a discovery, but i cant monitor on the value beacuse it wont go in the database.
I beleve the Yaml-file needs some modification.
The OID-string for the flood sensor .1.3.6.1.4.1.21796.4.9.3.1.5.1
The value is 1 for flood and 0 when not (Integer)
Validate:
===========================================
Component | Version
--------- | -------
LibreNMS | 24.10.1-16-g1f50c51ed (2024-11-12T13:43:24+01:00)
DB Schema | 2024_11_07_110342_custommap_edge_add_text_align (305)
PHP | 8.1.2-1ubuntu2.19
Python | 3.10.12
Database | MariaDB 10.6.18-MariaDB-0ubuntu0.22.04.1
RRDTool | 1.7.2
SNMP | 5.9.1
===========================================
[OK] Composer Version: 2.8.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQL and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok
/opt/librenms/includes/definitions/discovery/hwg-ste2.yaml
mib: STE2-MIB
modules:
os:
sysDescr_regex: '/(?<hardware>.*),\s+fw:(?<version>.*)?/'
sensors:
temperature:
data:
-
oid: sensTable
value: sensValue
num_oid: '.1.3.6.1.4.1.21796.4.9.3.1.5.{{ $index }}'
descr: sensName
index: '{{ $index }}'
divisor: 10
skip_values:
-
oid: sensUnit
op: '!='
value: 1
humidity:
data:
-
oid: sensTable
value: sensValue
num_oid: '.1.3.6.1.4.1.21796.4.9.3.1.5.{{ $index }}'
descr: sensName
index: '{{ $index }}'
divisor: 10
skip_values:
-
oid: sensUnit
op: '!='
value: 4
state:
data:
-
oid: inpTable
value: inpAlarmState
num_oid: '.1.3.6.1.4.1.21796.4.9.1.1.4.{{ $index }}'
descr: 'Alarm: {{ $inpName }}'
index: 'inpAlarmState.{{ $index }}'
state_name: inpAlarmState
states:
- { descr: normal, graph: 0, value: 0, generic: 0 }
- { descr: alarm, graph: 0, value: 1, generic: 2 }
STE2 SNMP OID description:
-------------------------------------------------------------------------
System Values:
----------------------------------------------------
.1.3.6.1.2.1.1.1.0 System Description (string)
.1.3.6.1.2.1.1.2.0 System ObjectID (objid)
.1.3.6.1.2.1.1.3.0 System UpTime (timeticks)
.1.3.6.1.2.1.1.4.0 System Contact (string)
.1.3.6.1.2.1.1.5.0 System Name (string)
.1.3.6.1.2.1.1.6.0 System Location (string)
.1.3.6.1.2.1.1.7.0 System Services (integer)
.1.3.6.1.4.1.21796.4.9.70.1.0 System MAC address (string)
Input Dry Contacts
----------------------------------------------------
.1.3.6.1.4.1.21796.4.9.1.1.1.n Input Index (integer, NUM (1..x))
.1.3.6.1.4.1.21796.4.9.1.1.2.n Input Value (integer, 0=Open, 1=Close)
.1.3.6.1.4.1.21796.4.9.1.1.3.n Input Name (string, SIZE (0..16))
.1.3.6.1.4.1.21796.4.9.1.1.4.n Input Alarm State (integer, 0=Normal, 1=Alarm)
Sensors Values, (n = 1..x)
----------------------------------------------------
.1.3.6.1.4.1.21796.4.9.3.1.1.n Sensor Index (integer, NUM (1..x))
.1.3.6.1.4.1.21796.4.9.3.1.2.n Sensor Name (string, SIZE (0..16))
.1.3.6.1.4.1.21796.4.9.3.1.3.n Sensor State (integer, 0=Invalid, 1=Normal, 4=AlarmLo, 5=AlarmHi)
.1.3.6.1.4.1.21796.4.9.3.1.4.n Sensor String Value (string, SIZE (0..10))
.1.3.6.1.4.1.21796.4.9.3.1.5.n Sensor Value (integer, current value *10)
.1.3.6.1.4.1.21796.4.9.3.1.6.n Sensor SN (string, SIZE (0..16))
.1.3.6.1.4.1.21796.4.9.3.1.7.n Sensor Unit (integer, 0=unknown, 1=C, 2=F, 3=K, 4=%)
.1.3.6.1.4.1.21796.4.9.3.1.8.n Sensor ID (integer, NUM (0..x))