Hello!
made
su - librenms
git pull
./daily.sh
but validate fails and wrote recomendationto fix DB. But new error that tables is missing
[FAIL] Database: extra table (port_out_measurements)
[FAIL] Database: extra table (voltage)
[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 hrDevice
CHANGE device_id
device_id
int unsigned NOT NULL ;
ALTER TABLE hrDevice
CHANGE hrDeviceErrors
hrDeviceErrors
int NOT NULL DEFAULT ‘0’ ;
ALTER TABLE hrDevice
DROP INDEX device_id
;
ALTER TABLE hrDevice
ADD INDEX hrdevice_device_id_index
(device_id
);
ALTER TABLE juniAtmVp
CHANGE juniAtmVp_id
juniAtmVp_id
int unsigned NOT NULL ;
ALTER TABLE juniAtmVp
ADD port_id
int unsigned NOT NULL AFTER juniAtmVp_id
;
ALTER TABLE juniAtmVp
CHANGE vp_id
vp_id
int unsigned NOT NULL ;
ALTER TABLE juniAtmVp
DROP interface_id
;
ALTER TABLE juniAtmVp
ADD INDEX juniatmvp_port_id_index
(port_id
);
DROP TABLE bgppeers
;
DROP TABLE bgppeers_cbgp
;
DROP TABLE ciscoasa
;
DROP TABLE cmpmempool
;
DROP TABLE current
;
DROP TABLE dbschema
;
and 11 more…
^C
Session terminated, terminating shell… …terminated.
sa[email protected]:/opt/librenms$ mysql -ulibrenms -ppassword -D librenms
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 11503
Server version: 10.0.38-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04
Copyright © 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [librenms]> ALTER TABLE hrDevice
CHANGE device_id
device_id
int unsigned NOT NULL ;
ALTER TABLE hrDevice
CHANGE hrDeviceErrors
hrDeviceErrors
int NOT NULL DEFAULT ‘0’ ;
ALTER TABLE hrDevice
DROP INDEX device_id
;
ALTER TABLE hrDevice
ADD INDEX hrdevice_device_id_index
(device_id
);
ALTER TABLE juniAtmVp
CHANGE juniAtmVp_id
juniAtmVp_id
int unsigned NOT NULL ;
ALTER TABLE juniAtmVp
ADD port_id
int unsigned NOT NULL AFTER juniAtmVp_id
;
ALTER TABLE juniAtmVp
CHANGE vp_id
vp_id
int unsigned NOT NULL ;
ALTER TABLE juniAtmVp
DROP interface_id
;
ALTER TABLE juniAtmVp
ADD INDEX juniatmvp_port_id_index
(port_id
);
DROP TABLE bgppeers
;
DROP TABLE bgppeers_cbgp
;
DROP TABLE ciscoasa
;
DROP TABLE cmpmempool
;
DROP TABLE current
;
DROP TABLE dbschema
;
Query OK, 0 rows affected (36.48 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [librenms]> ALTER TABLE hrDevice
CHANGE hrDeviceErrors
hrDeviceErrors
int NOT NULL DEFAULT ‘0’ ;
Query OK, 0 rows affected (0.18 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [librenms]> ALTER TABLE hrDevice
DROP INDEX device_id
;
Query OK, 0 rows affected (11.34 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [librenms]> ALTER TABLE hrDevice
ADD INDEX hrdevice_device_id_index
(device_id
);
Query OK, 0 rows affected (7.34 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [librenms]> ALTER TABLE juniAtmVp
CHANGE juniAtmVp_id
juniAtmVp_id
int unsigned NOT NULL ;
Query OK, 0 rows affected (24.80 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [librenms]> ALTER TABLE juniAtmVp
ADD port_id
int unsigned NOT NULL AFTER juniAtmVp_id
;
Query OK, 0 rows affected (11.26 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [librenms]> ALTER TABLE juniAtmVp
CHANGE vp_id
vp_id
int unsigned NOT NULL ;
Query OK, 0 rows affected (30.98 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [librenms]> ALTER TABLE juniAtmVp
DROP interface_id
;
Query OK, 0 rows affected (13.00 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [librenms]> ALTER TABLE juniAtmVp
ADD INDEX juniatmvp_port_id_index
(port_id
);
Query OK, 0 rows affected (8.32 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [librenms]> DROP TABLE bgppeers
;
Query OK, 0 rows affected (3.55 sec)
MariaDB [librenms]> DROP TABLE bgppeers_cbgp
;
Query OK, 0 rows affected (2.87 sec)
MariaDB [librenms]> DROP TABLE ciscoasa
;
Query OK, 0 rows affected (6.98 sec)
MariaDB [librenms]> DROP TABLE cmpmempool
;
Query OK, 0 rows affected (0.00 sec)
MariaDB [librenms]> DROP TABLE current
;
Query OK, 0 rows affected (0.00 sec)
MariaDB [librenms]> DROP TABLE dbschema
;
Query OK, 0 rows affected (6.26 sec)
MariaDB [librenms]> quit
Bye
[email protected]:/opt/librenms$ sudo ./validate.php
Component | Version |
---|---|
LibreNMS | 1.68 |
DB Schema | 2020_09_24_000500_create_cache_locks_table (176) |
PHP | 7.4.11 |
Python | 3.5.2 |
MySQL | 10.0.38-MariaDB-0ubuntu0.16.04.1 |
RRDTool | 1.5.5 |
SNMP | NET-SNMP 5.7.3 |
====================================
[OK] Installed from package; no Composer required
In Connection.php line 671:
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘librenms.bgppeers’ doesn’t exist (SQL: SHOW INDEX FROM bgpPeers
)
In PDOStatement.php line 131:
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘librenms.bgppeers’ doesn’t exist
In PDOStatement.php line 129:
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘librenms.bgppeers’ doesn’t exist
[email protected]:/opt/librenms$