TrueNas SCALE - Rebuild NetData Metrics
I came across an issue after having some problems with one of my arrays. The metrics for things like network/cpu/etc were no longer loading. Regular console log kept saying "loading defaults" and not much information. After doing some digging I finally found that the DB files used with the metrics became corrupt. The fix is simple enough, rename the old DB files and restart the netdata daemon.
First off saw the netdata daemon kept stopping even after starting it.
systemctl status netdata
What gave this away was finally finding in the NetData log that it had a SQLite error.
Log Directory: /var/log/netdata
Error Log: error.log
Error Entry: SQLite error during database setup, rc = 10 (disk I/O error)
I decided to take the hammer approach and rather than attempt to fix the DB files, I just renamed them and started the netdata daemon.
DB Directory: /var/cache/netdata
DB Files: netdata-meta.db netdata-meta.db-shm netdata-meta.db-wal
Here is what I ended up running and everything started working
mv /var/cache/netdata/netdata-meta.db /var/cache/netdata/netdata-meta.db.old
mv /var/cache/netdata/netdata-meta.db-shm /var/cache/netdata/netdata-meta.db-shm.old
mv /var/cache/netdata/netdata-meta.db-wal /var/cache/netdata/netdata-meta.db-shm.wal
systemctl start netdata
Comments
Post a Comment