segunda-feira, 25 de abril de 2016

Librenms - dump database

We've had a few reports of database problems with the latest database schema update (055 -> 056).  Symptoms are that lots of pollers are running, but are unable to query the database due to the schema update taking a very long time.  This results in gaps in the graphs due to the hanging pollers.  On most systems, a simple restart of mysql seems to resolve the issue:

service mysql restart          # or equivalent on your distro
./discovery.php -h new         # run the schema update
On one system, a dump & reload of the LibreNMS database was necessary:
vi /etc/cron.d/librenms        # comment out all entries
ps -ef | grep librenms         # wait until all librenms processes are stopped, or kill them
cd /opt/librenms               # (or your install location, if not the standard)
mysqldump --add-drop-database librenms > librenms-backup.sql
mysql librenms < librenms-backup.sql
./discovery.php -h new         # run the schema update
vi /etc/cron.d/librenms        # uncomment all entries to start pollers again

---- ou 

---- log all queries from mysql 

--- liberar acesso remoto a mysql

0 comentários: