Hi!
First off, sorry for my english. It’s not that good…
I have a huge problems with LibreNMS after updating from (as far as I remember) the late 2019 version.
The problems manifest themselves as follows:
1/ poller stopped working,
2/ graphs do not scratch new data,
3/ by entering the coordinates on the device card, a list of devices from the same location should appear. Meanwhile, the message ‘No results found!’ Is displayed. Interestingly, entering the locations from the ‘Devices / Geo … / ….’ menu displays the lists correctly.
currently typing commands:
./daily.sh
Updating to latest codebase OK
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK
$ ./validate.php
Component Version LibreNMS 1.70.1-52-g4ba095853 DB Schema 2020_11_02_164331_add_powerstate_enum_to_vminfo (191) PHP 7.3.1-1+0~20190113101756.25+stretch~1.gbp15aaa9 Python 3.5.3 MySQL 10.1.23-MariaDB-9+deb9u1 RRDTool 1.6.0 SNMP NET-SNMP 5.7.3 ====================================
[OK] Composer Version: 2.0.8
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
$ ./discovery.php -h HOSTNAME -d | ./pbin.sh
SQL[select
migration
frommigrations
order byid
desc limit 1 [] 0.35ms]SQL[select count(*) as aggregate from
migrations
limit 1 [] 4.25ms]SQL[SELECT version() [] 0.53ms]
Updating os_def.cache
SQL[SELECT * FROMdevices
WHERE disabled = 0 AND snmp_disable = 0 ANDhostname
LIKE ‘HOSTNAME’ ORDER BY device_id DESC [] 1.4ms]./discovery.php HOSTNAME 2021-01-26 18:30:31 - 0 devices discovered in 0.284 secs
title:
name: librenms
private: 1
expire: 0
curl: (1) Protocol “'https” not supported or disabled in libcurl
$ ./poller.php -h HOSTNAME -r -f -d | ./pbin.sh
SQL[selectmigration
frommigrations
order byid
desc limit 1 [] 0.37ms]SQL[select count(*) as aggregate from
migrations
limit 1 [] 0.23ms]SQL[SELECT version() [] 0.42ms]
Updating os_def.cache
SQL[SELECT * FROMdevices
WHEREdisabled
= 0 ANDhostname
= ‘HOSTNAME’ ORDER BYdevice_id
ASC [] 1.02ms]./poller.php HOSTNAME 2021-01-26 18:31:24 - 0 devices polled in 0.286 secs
title:
name: librenms
private: 1
expire: 0
curl: (1) Protocol “'https” not supported or disabled in libcurl
Now I would like to say what exactly I updated …
1 / First, I ran ./daily.sh
2 / Then I updated python to version 3
3 / Then according to…
$ ./validate.php
Component Version LibreNMS 1.70.1-52-g4ba095853 DB Schema 2020_11_02_164331_add_powerstate_enum_to_vminfo (191) PHP 7.3.1-1+0~20190113101756.25+stretch~1.gbp15aaa9 Python 3.5.3 MySQL 10.1.23-MariaDB-9+deb9u1 RRDTool 1.6.0 SNMP NET-SNMP 5.7.3 ====================================
[OK] Composer Version: 2.0.8
[OK] Dependencies up-to-date.
[OK] Database connection successful
[FAIL] Database: extra index (devices/sysName)
[FAIL] Database: missing index (entityState/entitystate_device_id_index)
[FAIL] Database: extra index (entityState/entityState_device_id_index)
[FAIL] Database: extra index (mefinfo/mefID)
[FAIL] Database: extra index (munin_plugins/UNIQUE)
[FAIL] Database: extra index (ports/device_ifIndex)
[FAIL] Database: extra index (ports_vlans/unique)
[FAIL] Database: extra index (syslog/device_id-timestamp)
[FAIL] Database: extra index (tnmsneinfo/neID)
[FAIL] Database: extra index (vminfo/vmwVmVMID)
[FAIL] We have detected that your database schema may be wrong, please report the following to us on Discord :
[FIX]:
Run the following SQL statements to fix.
SQL Statements:
ALTER TABLEdevices
DROP INDEXsysName
;
ALTER TABLEentityState
DROP INDEXentityState_device_id_index
;
ALTER TABLEentityState
ADD INDEXentitystate_device_id_index
(device_id
);
ALTER TABLEmefinfo
DROP INDEXmefID
;
ALTER TABLEmunin_plugins
DROP INDEXUNIQUE
;
ALTER TABLEports
DROP INDEXdevice_ifIndex
;
ALTER TABLEports_vlans
DROP INDEXunique
;
ALTER TABLEsyslog
DROP INDEXdevice_id-timestamp
;
ALTER TABLEtnmsneinfo
DROP INDEXneID
;
ALTER TABLEvminfo
DROP INDEXvmwVmVMID
;
[WARN] Global lnms shortcut not installed. lnms command must be run with full path
[FIX]:
sudo ln -s /opt/librenms/lnms /usr/bin/lnms
[WARN] Bash completion not installed. lnms command tab completion unavailable.
[FIX]:
sudo cp /opt/librenms/misc/lnms-completion.bash /etc/bash_completion.d/
My output was
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 26569475
Server version: 10.1.23-MariaDB-9+deb9u1 Debian 9.0Copyright © 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [librenms]> ALTER TABLE
devices
DROP INDEXsysName
;
Query OK, 0 rows affected (0.02 sec)
Records: 0 Duplicates: 0 Warnings: 0MariaDB [librenms]> ALTER TABLE
entityState
DROP INDEXentityState_device_id_index
;
Query OK, 0 rows affected (0.08 sec)
Records: 0 Duplicates: 0 Warnings: 0MariaDB [librenms]> ALTER TABLE
devices
DROP INDEXsysName
;
ERROR 1091 (42000): Can’t DROP ‘sysName’; check that column/key exists
MariaDB [librenms]> ALTER TABLEentityState
DROP INDEXentityState_device_id_index
;
ERROR 1091 (42000): Can’t DROP ‘entityState_device_id_index’; check that column/key exists
MariaDB [librenms]> ALTER TABLEentityState
ADD INDEXentitystate_device_id_index
(device_id
);
ALTER TABLEmefinfo
DROP INDEXmefID
;
ALTER TABLEmunin_plugins
DROP INDEXUNIQUE
;
ALTER TABLEports
DROP INDEXdevice_ifIndex
;
ALTER TABLEports_vlans
DROP INDEXunique
;
ALTER TABLEsyslog
DROP INDEXdevice_id-timestamp
;
ALTER TABLEtnmsneinfo
DROP INDEXneID
;
ALTER TABLEvminfo
DROP INDEXvmwVmVMID
;
Query OK, 0 rows affected (0.12 sec)
Records: 0 Duplicates: 0 Warnings: 0MariaDB [librenms]> ALTER TABLE
mefinfo
DROP INDEXmefID
;
Query OK, 0 rows affected (0.10 sec)
Records: 0 Duplicates: 0 Warnings: 0MariaDB [librenms]> ALTER TABLE
munin_plugins
DROP INDEXUNIQUE
;
Query OK, 0 rows affected (0.06 sec)
Records: 0 Duplicates: 0 Warnings: 0MariaDB [librenms]> ALTER TABLE
ports
DROP INDEXdevice_ifIndex
;
Query OK, 0 rows affected (0.04 sec)
Records: 0 Duplicates: 0 Warnings: 0MariaDB [librenms]> ALTER TABLE
ports_vlans
DROP INDEXunique
;
Query OK, 0 rows affected (0.03 sec)
Records: 0 Duplicates: 0 Warnings: 0MariaDB [librenms]> ALTER TABLE
syslog
DROP INDEXdevice_id-timestamp
;
Query OK, 0 rows affected (0.05 sec)
Records: 0 Duplicates: 0 Warnings: 0MariaDB [librenms]> ALTER TABLE
tnmsneinfo
DROP INDEXneID
;
Query OK, 0 rows affected (0.06 sec)
Records: 0 Duplicates: 0 Warnings: 0MariaDB [librenms]> ALTER TABLE
vminfo
DROP INDEXvmwVmVMID
;
Query OK, 0 rows affected (0.05 sec)
Records: 0 Duplicates: 0 Warnings: 0MariaDB [librenms]> exit
Bye
MariaDB [librenms]> ALTER TABLE
devices
DROP INDEXsysName
;
ERROR 1091 (42000): Can’t DROP ‘sysName’; check that column/key exists
MariaDB [librenms]> ALTER TABLEentityState
DROP INDEXentityState_device_id_index
;
Query OK, 0 rows affected (0.10 sec)
Records: 0 Duplicates: 0 Warnings: 0MariaDB [librenms]> ALTER TABLE
entityState
ADD INDEXentitystate_device_id_index
(device_id
);
Query OK, 0 rows affected (0.02 sec)
Records: 0 Duplicates: 0 Warnings: 0MariaDB [librenms]> ALTER TABLE
mefinfo
DROP INDEXmefID
;
ERROR 1091 (42000): Can’t DROP ‘mefID’; check that column/key exists
MariaDB [librenms]> ALTER TABLEmunin_plugins
DROP INDEXUNIQUE
;
ERROR 1091 (42000): Can’t DROP ‘UNIQUE’; check that column/key exists
MariaDB [librenms]> ALTER TABLEports
DROP INDEXdevice_ifIndex
;
ERROR 1091 (42000): Can’t DROP ‘device_ifIndex’; check that column/key exists
MariaDB [librenms]> ALTER TABLEports_vlans
DROP INDEXunique
;
ERROR 1091 (42000): Can’t DROP ‘unique’; check that column/key exists
MariaDB [librenms]> ALTER TABLEsyslog
DROP INDEXdevice_id-timestamp
;
ERROR 1091 (42000): Can’t DROP ‘device_id-timestamp’; check that column/key exists
MariaDB [librenms]> ALTER TABLEtnmsneinfo
DROP INDEXneID
;
ERROR 1091 (42000): Can’t DROP ‘neID’; check that column/key exists
MariaDB [librenms]> ALTER TABLEvminfo
DROP INDEXvmwVmVMID
;
ERROR 1091 (42000): Can’t DROP ‘vmwVmVMID’; check that column/key exists
I would like to add my observation to the following point:
3/ by entering the coordinates on the device card, a list of devices from the same location should appear. Meanwhile, the message ‘No results found!’ Is displayed. Interestingly, entering the locations from the ‘Devices / Geo … / ….’ menu displays the lists correctly.
We save our location as:
AAA, BBB, CCC / DDD [51.47FFF29, 17.85XTTT99]
When we open the device, the summary table shows:
AAA, BBB, CCC / DDD
When we go to the link under the device’s IP address, the system in a new window searches for devices with a location named:
AAA, BBB, CCC
Entering the locations from the ‘Devices / Geo … / ….’ menu displays the lists correctly:
AAA, BBB, CCC / DDD [51.47FFF29, 17.85XTTT99]
Please help!