Can't use "Store Metrics" in Cockpit

Problem Description
I can’t enable the Store Metrics option in Cockpit, the switch always goes back to off.

Steps to Reproduce

  1. Login to FreedomBox.
  2. Log in to Cockpit
  3. Click the Enable Store Metrics button and try to install necessary packages. When PackageKit crashes, install them from the command line.
  4. 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.

Screenshot

Information

  • FreedomBox version: Debian GNU/Linux 10 (buster) and FreedomBox version 21.1. FreedomBox is up to date.
  • Hardware: Olimex LIME2-SERVER-1000GB-HDD
  • How did you install FreedomBox?: ‘by downloading a stable image from https://freedombox.org’)
1 Like

Hi @Ultrapeer

Thanks to you for this querie and welcome here :slight_smile:

Metrics (and cockpit-pcp) should be handled with first installing the FreedomBox System/Performance app.

By the way, I also actually get some troubles with testing version and Olimex LIME2 SBC as you may want to see in this last feedback.

My guess, so far, is about the way pcp store its time serial data as mentioned there.

Can you let us know about the device and FreedomBox version you are using ?

Thank you for the warm welcome and your reply @fred1m :slight_smile: . 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.

IIRC @Ultrapeer, you installed cockpit-pcp with some sudo apt install command lines.

You may want to use FreedomBox web UI and install Performance App (see System tab),

Capture d’écran de 2021-02-10 14-04-44

to complete things around cron security.

Also, about installing again, you may want to read this.

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 :slight_smile: 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

1 Like

Yes @Ultrapeer we should see something like:

I can have with ./container when testing, but…

Let’s wait others to help :thinking: