Hi,
I’m using osupdate to track if systems have outstanding updates. This works fine on Ubuntu workstations, but on the Librenms Debian server itself, I have a weird issue. Any help is welcome.
validate.php: I don’t think the missing python package and smokeping files are relevant, the python package is discussed here.
When I run the poller manually, it fetches the correct value and writes to the database:
$ /opt/librenms/poller.php -h localhost -d -f -m applications | grep -A 1 os-updates
Application: os-updates, app_id=19SNMP['/usr/bin/snmpget' '-v2c' '-c' 'COMMUNITY' '-Oqv' '-m' 'NET-SNMP-EXTEND-MIB' '-M' '/opt/librenms/mibs' 'udp:HOSTNAME:161' '.1.3.6.1.4.1.8072.1.3.2.4.1.2.8.111.115.117.112.100.97.116.101.1']
0 <<<<< correct
MariaDB [librenms]> SELECT hostname,app_state,app_status FROM devices,applications WHERE devices.device_id = applications.device_id AND applications.app_status >= 0 AND applications.app_type = "os-updates";
+----------------+-----------+------------+
| hostname | app_state | app_status |
+----------------+-----------+------------+
| host1 | OK | 0 |
| host2 | OK | 1 |
| host3 | OK | 112 |
| localhost | OK | 0 | <<<<<<<
+----------------+-----------+------------+
Then always a few minutes later, the values get overwritten:
MariaDB [librenms]> SELECT hostname,app_state,app_status FROM devices,applications WHERE devices.device_id = applications.device_id AND applications.app_status >= 0 AND applications.app_
type = "os-updates";
+----------------+-----------+------------+
| hostname | app_state | app_status |
+----------------+-----------+------------+
| host1 | OK | 0 |
| host2 | OK | 1 |
| host3 | OK | 112 |
| localhost | UNKNOWN | | <<<<
From the mariadb log, these are the guilty queries:
43079 Prepare update `applications` set `app_state` = ?, `app_state_prev` = ?, `app_status` = ?, `timestamp` = NOW() where `app_id` = ?
43079 Execute update `applications` set `app_state` = 'UNKNOWN', `app_state_prev` = 'OK', `app_status` = '', `timestamp` = NOW() where `app_id` = 19
The only thing I can find is that in the Discovery log, two available applications show: osupdate
and os-updates
, which doesn´t make sense:
#### Load disco module applications ####
Applications:
SNMP['/usr/bin/snmpbulkwalk' '-v2c' '-c' 'COMMUNITY' '-OQUs' '-m' 'NET-SNMP-EXTEND-MIB' '-M' '/opt/librenms/mibs' 'udp:HOSTNAME:161' 'nsExtendStatus']
nsExtendStatus."distro" = active
nsExtendStatus."serial" = active
nsExtendStatus."hardware" = active
nsExtendStatus."osupdate" = active
nsExtendStatus."ups-apcups" = active
nsExtendStatus."manufacturer" = active
Available: [.....] opensips, os-updates, php-fpm, pi-hole, portactivity, [........] fbsdnfsclient, fbsdnfsserver, mailq, osupdate, phpfpmsp, [......]
- What is causing these queries?
- How can I correct the list of applications?
- Any other ideas?