Adding support to LibreNMS for WUT thermometers 57605 and 57614

hey guys , im trying to add support to LibreNMS for the WUT thermometers version 57605 and 57614.
this is my validate.php
bash-5.1$ php validate.php

Component Version
LibreNMS 22.6.0-2-g1056f28de
DB Schema 2021_02_09_122930_migrate_to_utf8mb4 (242)
PHP 7.4.30
Python 3.9.10
MySQL 10.5.13-MariaDB
RRDTool 1.7.2
SNMP 5.9.1

====================================

[OK] Composer Version: 2.3.7
[OK] Dependencies up-to-date.
[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 schema correct
[OK] MySQl and PHP time match
[OK] rrd_dir is writable
[OK] rrdtool version ok

now the issue is :
i’ve collected all the snmp-data via these commands:

php /opt/librenms/scripts/collect-snmp-data.php --full -o wut -v 57605 -h themometer1
php /opt/librenms/scripts/collect-snmp-data.php --full -o wut -v 57614 -h themometer2

but when i generate the .json file , there is no section that has enclose the sensors…

running this command :
php /opt/librenms/scripts/save-test-data.php -o wut -v 57605 -m sensors -d

php /opt/librenms/scripts/save-test-data.php -o wut -v 57614 -m sensors -d

even if i run the commands without -m , same result , the .json files have no sensor section created.

i’ve aslo uploaded the mibs for the respective devices, and renamed them as standard requested.

i don’t know what im doing wrong …any help would be welcomed.
thanks again.
Ervin.

i’ve changed the wut.yaml file, in order to get from the thermometers what i need:

this is what my yaml file looks like:

mib: WebGraph-Thermometer-PT-MIB:WebGraph-Thermometer-NTC-MIB:WebGraph-Thermometer-MIB:WebGraph-8xThermometer-MIB:WebGraph-2xThermometer-MIB
modules:
sensors:
temperature:
options:
divisor: 10
data:
-
oid: wtWebioAn1GraphTemp
value: wtWebioAn1GraphBinaryTempValue
num_oid: ‘.1.3.6.1.4.1.5040.1.2.{{ $index }}’
descr: ‘Temperature’
index: wtWebioAn1GraphSensorEntry.{{ $index }}

now the issue is that at the initial discovery via this command :
php discovery.php -h thermometer1 -m sensors -d
php discovery.php -h thermometer2 -m sensors -d

i get the values from the sensors , the graph is being created (empty)
but minimum / max/ and current value remain always 0.

and here it shows for a moment the real temperature , then it gets back to 0

this is from manual discovery.php :

php discovery.php -h thermometer1 -m sensors -d

SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“count”,158,“snmp”] 0.2ms]

Temperature: Dynamic Discovery (temperature):
array (
‘options’ =>
array (
‘divisor’ => 10,
),
‘data’ =>
array (
0 =>
array (
‘oid’ => ‘wtWebioAn1GraphTemp’,
‘value’ => ‘wtWebioAn1GraphBinaryTempValue’,
‘num_oid’ => ‘.1.3.6.1.4.1.5040.1.2.{{ $index }}’,
‘descr’ => ‘Temperature’,
‘index’ => ‘wtWebioAn1GraphSensorEntry.{{ $index }}’,
),
),
)
Data wtWebioAn1GraphTemp:
array (
0 =>
array (
‘wtWebioAn1GraphSensors’ => ‘1’,
),
1 =>
array (
‘wtWebioAn1GraphSensorNo’ => ‘1’,
‘wtWebioAn1GraphTempValue’ => ‘19,9’,
‘wtWebioAn1GraphBinaryTempValue’ => ‘199’,
),
)
Sensor fetched value: 199
Cur 19.9, Low: null, Low Warn: null, Warn: null, High: null
Discover sensor: .1.3.6.1.4.1.5040.1.2.1, wtWebioAn1GraphSensorEntry.1, wut, Temperature, snmp, 10, 1, , 19.9, (limits: LL: , LW: , W: , H: )
SQL[SELECT COUNT(sensor_id) FROM sensors WHERE poller_type= ? AND sensor_class = ? AND device_id = ? AND sensor_type = ? AND sensor_index = ? [“snmp”,“temperature”,158,“wut”,“wtWebioAn1GraphSensorEntry.1”] 0.17ms]

hi guys , can someone give me a hint why this is happening :
im running the following command:
./poller.php -r -f -p -d -h thermometer1

SNMP[’/usr/bin/snmpget’ ‘-M’ ‘/opt/librenms/mibs:/opt/librenms/mibs/wut’ ‘-v1’ ‘-c’ ‘COMMUNITY’ ‘-OQXUte’ ‘-t’ ‘5’ ‘-r’ ‘10’ ‘udp:HOSTNAME:161’ ‘SNMP-FRAMEWORK-MIB::snmpEngineTime.0’ ‘HOST-RESOURCES-MIB::hrSystemUptime.0’]
Exitcode: 2 [“Error in packet\nReason: (noSuchName) There is no such variable name in this MIB.\nFailed object: SNMP-FRAMEWORK-MIB::snmpEngineTime.0\n\n”]

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMP-FRAMEWORK-MIB::snmpEngineTime.0

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMP-FRAMEWORK-MIB::snmpEngineTime.0```

then

SNMP[’/usr/bin/snmpget’ ‘-v1’ ‘-c’ ‘COMMUNITY’ ‘-OUQnte’ ‘-M’ ‘/opt/librenms/mibs:/opt/librenms/mibs/wut’ ‘-t’ ‘5’ ‘-r’ ‘10’ ‘udp:HOSTNAME:161’ ‘.1.3.6.1.4.1.5040.1.2.8.1’]

Exitcode: 2
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: .1.3.6.1.4.1.5040.1.2.8.1

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: .1.3.6.1.4.1.5040.1.2.8.1
Checking (snmp) temperature …
0 C

setting the temperature , as 0 , when i do an initial discovery the temperature shows correnctly for around 1min 45 sec (or less) and then it switches to 0 C.

i’ve downloaded the MIB files from the provider’s website. also i’ve updated the yaml file (actually adapted to my case) and as i said it gets the initial value , then it switches to 0.

i can see also this warning


Warning: include(includes/polling/mib.inc.php): failed to open stream: No such file or directory in /opt/librenms/includes/polling/functions.inc.php on line 329

Warning: include(): Failed opening 'includes/polling/mib.inc.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /opt/librenms/includes/polling/functions.inc.php on line 329