Hi
I’ve recently moved our LibreNMS install from a quite elderly manual build which the whole git build environment was screwed up on meaning I couldn’t easily upgrade to the latest code. I ended up downloading the Virtualbox VM and importing into our VMware cluster. We also seem to have the worst proxy server/web gateway in the world as it frequently and randomly kills connection to github, and installing the php composer script takes about 36 hours to download all the bits.
That’s another story though. LibreNMS is up and working again, but I have a couple of oddities which I cannot fathom
The first are these errors from validate.php. I have ran daily.sh too
./validate.php ==================================== Component | Version --------- | ------- LibreNMS | 21.2.0-2-gd20e1bdf5 DB Schema | 2018_07_03_091322_add_foreign_keys_to_wireless_sensors_table (328) PHP | 7.4.3 Python | 3.8.10 MySQL | 10.3.30-MariaDB-0ubuntu0.20.04.1 RRDTool | 1.7.2 SNMP | NET-SNMP 5.8 ==================================== [OK] Composer Version: 2.0.9 [OK] Dependencies up-to-date. [OK] Database connection successful [FAIL] Database: incorrect column (devices/inserted) [FAIL] Database: incorrect column (ports_fdb/created_at) [FAIL] Database: incorrect column (ports_fdb/updated_at) [FAIL] Database: incorrect column (route/created_at) [FAIL] Database: incorrect column (route/updated_at) [FAIL] We have detected that your database schema may be wrong, please report the following to us on Discord (https://t.libren.ms/discord) or the community site (https://t.libren.ms/5gscd): [FIX]: Run the following SQL statements to fix. SQL Statements: ALTER TABLE `devices` CHANGE `inserted` `inserted` timestamp NULL DEFAULT CURRENT_TIMESTAMP ; ALTER TABLE `ports_fdb` CHANGE `created_at` `created_at` timestamp NULL ; ALTER TABLE `ports_fdb` CHANGE `updated_at` `updated_at` timestamp NULL ; ALTER TABLE `route` CHANGE `created_at` `created_at` timestamp NULL ; ALTER TABLE `route` CHANGE `updated_at` `updated_at` timestamp NULL ; [WARN] Your install is over 24 hours out of date, last update: Thu, 18 Feb 2021 14:10:32 +0000 [FIX]: Make sure your daily.sh cron is running and run ./daily.sh by hand to see if there are any errors.
when I pop these into SQL manually, I get the following.
MariaDB [librenms]> ALTER TABLE devices
CHANGE inserted
inserted
timestamp NULL DEFAULT CURRENT_TIMESTAMP ;
ERROR 1054 (42S22): Unknown column ‘inserted’ in ‘devices’
MariaDB [librenms]> ALTER TABLE ports_fdb
CHANGE created_at
created_at
timestamp NULL ;
ERROR 1054 (42S22): Unknown column ‘created_at’ in ‘ports_fdb’
MariaDB [librenms]> ALTER TABLE ports_fdb
CHANGE updated_at
updated_at
timestamp NULL ;
ERROR 1054 (42S22): Unknown column ‘updated_at’ in ‘ports_fdb’
MariaDB [librenms]> ALTER TABLE route
CHANGE created_at
created_at
timestamp NULL ;
ERROR 1054 (42S22): Unknown column ‘created_at’ in ‘route’
MariaDB [librenms]> ALTER TABLE route
CHANGE updated_at
updated_at
timestamp NULL ;
ERROR 1054 (42S22): Unknown column ‘updated_at’ in ‘route’
MariaDB [librenms]>
I’m pretty it’s probably some straightforward SQL commands to insert but SQL isn’t my strength. .
the second weird thing is that the URL to take me to the RRD graphs is wrongly formatted as it is inserting an extra http:// after the FQDN
Remove it and the graphs load clean and quickly. Again it’s probably something straightforward if you know where.
Thanks in advance for any assistance, and for such a great system. It meant we could unshackle from the big S a few years ago now, and it’s wonderful. I’m no coder but I do champion it to others when oppurtunity arises
Gaz