Programs output CPU and RAM usage in plots (if possible)

Solution 1:

For this, I would recommend Grafana. I'm inclined to say the possibilities are almost endless.

However, Grafana is "only" a viewer, so you also need a data collecting backend - for this you can use Prometheus.

Finally you need the Prometheus Node Exporter installed on each machine where you want to gather metrics.

I've installed this set of tools using Docker containers - I find that this is the easiest way. However, it requires a little research on your side to set up things like you want it.

Here are the links to the official Docker images I can recommend:

Grafana - Docker Image

Prometheus - Docker Image

And finally, you need to install the Node exporter on the machines where you want to gather data. Make sure the "Universe" repositories are enabled in your /etc/sources.list:

deb http://archive.ubuntu.com/ubuntu focal universe
deb http://archive.ubuntu.com/ubuntu focal-updates universe

Then run the installation on each machine:

sudo apt install prometheus-node-exporter

Prometheus has very good documentation about how to configure, and there is an example configuration file on Github here.

In your prometheus config, you need a job that targets the machines where Node Exporter is running. In the below example, I have two machines (10.10.2.2 and 10.10.2.4) with Node Exporter running on port 9100.

  - job_name: 'node-exporter'
    static_configs:
    - targets: ['10.10.2.2:9100', '10.10.2.4:9100']

In Grafana, you then need a dashboard to show the statistics for Node Exporter. Here I can recommend the Node Exporter Full dashboard to begin with.

Everything can be customized, but at least now you can start to see the historic data on your machines.