Each downloadable file comes with it's own checksum. Replace the actual checksum and URL of the download link in the code block above.
Make sure to choose the amd64 version. Right click on the linked text and select "copy link address" to get the URL of the download link to curl.
Expected output: Verify output of the checksum verification
prometheus-2.55.0.linux-amd64.tar.gz: OK
If checksum is verified, extract the files and move them into the /usr/local/bin and /etc/prometheus directories for neatness and best practice. Then, clean up the duplicated copies.
Create an account (prometheus) without server access for Prometheus to run as a background service. This restricts potential attackers to only the Prometheus service in the unlikely event that they manage to infiltrate via a compromised client update.
Create a directory for Prometheus to store the monitoring data. Then set the owner of this and the /etc/prometheus directory to prometheus so that this user can read and write to the directories.
Create a configuration file so that Prometheus knows where to pull data from.
Paste the configuration parameters below into the file:
1) General + execution client parameters:
2) Consensus client parameters:
According to your selected consensus client, append the following block to the general + execution client parameters above.
Once you're done, save with Ctrl+O and Enter, then exit with Ctrl+X.
Next, create a systemd configuration file for the Prometheus service to run in the background.
Paste the configuration parameters below into the file:
Once you're done, save with Ctrl+O and Enter, then exit with Ctrl+X.
Start the Prometheus service
Reload the systemd daemon to register the changes made, start Prometheus, and check its status to make sure its running.
Expected output: The output should say Prometheus is “active (running)”. Press CTRL-C to exit and Prometheus will continue to run.
sudo systemctl status prometheus.service
Use the following command to check the logs for any warnings or errors:
Expected output:
Press CTRL-C to exit.
If the Prometheus service is running smoothly, we can now enable it to fire up automatically when rebooting the system.