Problem Description
I can’t enable the Store Metrics option in Cockpit, the switch always goes back to off.
Steps to Reproduce
Login to FreedomBox.
Log in to Cockpit
Click the Enable Store Metrics button and try to install necessary packages. When PackageKit crashes, install them from the command line.
Click on the “On” button to store the metrics.
Expected Results
I expected to be able to see metrics in different time frames and that they wouldn’t be lost when I log out from Cockpit.
Actual results
Every time I tried to install the cockpit-pcp package PackageKit crashed. So I opened an SSH session to the server, tried to remove pcp with a sudo apt-get remove --purge pcp and then tried to reinstall it along with cockpit-pcp (thought it was worth giving it a try). The remove --purge command returned the following warnings:
dpkg: warning: while removing pcp, directory ‘/var/log/pcp/pmproxy’ not empty so not removed
dpkg: warning: while removing pcp, directory ‘/var/log/pcp/pmlogger’ not empty so not removed
dpkg: warning: while removing pcp, directory ‘/var/log/pcp/pmie’ not empty so not removed
dpkg: warning: while removing pcp, directory ‘/var/log/pcp/pmcd’ not empty so not removed
dpkg: warning: while removing pcp, directory ‘/var/lib/pcp/pmns’ not empty so not removed
dpkg: warning: while removing pcp, directory ‘/var/lib/pcp/config/pmlogger’ not empty so not removed
dpkg: warning: while removing pcp, directory ‘/var/lib/pcp/config/pmie’ not empty so not removed
dpkg: warning: while removing pcp, directory ‘/var/lib/pcp/config/pmda’ not empty so not removed
The reinstallation seems to have worked fine according to the output of the command line, but I have never been able to enable the Store Metrics option in Cockpit. The screenshot below should give an idea. What do I need to do to enable that option? Thanks in advance.
Thank you for the warm welcome and your reply @fred1m . The board information and FreedomBox version are at the bottom of my previous message (although I have now upgraded to version 21.2 but the problem remains, rebooting doesn’t help).
The performance page was showing the following:
Service pmcd.service is running
passed
Service pmie.service is running
failed
Service pmlogger.service is running
passed
Service pmproxy.service is running
failed
After restarting these two with a sudo systemctl restart pmie.service pmproxy.service the issue is still there so I definitely hope munin will be included in the future.
Yes, I had installed cockpit-pcp with apt-get because PackageKit consistently crashed when I tried to install that package from within Cockpit. Thank you for the link, I’ve learned something So, I did sudo apt-get remove --purge cockpit-pcp
sudo apt-get install sqlite3
sudo echo “delete from plinth_module where name=‘cockpit-pcp’;” | sudo sqlite3 /var/lib/plinth/plinth.sqlite3
and then reënabled the Performance app. All the tests passed. But still no luck, I can’t have my stored metrics in Cockpit.
And as a side note, apt-get now tells me that The following package was automatically installed and is no longer required:
pcp