Prometheus is a popular monitoring system used for monitoring and alerting. In this tutorial, we will be walking you through the steps to install Prometheus on Elementary OS Latest.
Before we begin, make sure that you have the following:
Before we can proceed with the installation of Prometheus, it is recommended that you update your system. You can do this by running the following command.
sudo apt update && sudo apt upgrade -y
To install Prometheus, follow the steps below:
Download the latest Prometheus binary from the official website. You can do this by running the following command.
wget https://github.com/prometheus/prometheus/releases/download/v2.30.1/prometheus-2.30.1.linux-amd64.tar.gz
Note: Replace the URL with the latest version of Prometheus available.
Extract the downloaded archive by running the following command.
tar -xvf prometheus-2.30.1.linux-amd64.tar.gz
Note: Replace the version number with the version you have downloaded.
Move the extracted directory to /opt
directory.
sudo mv prometheus-2.30.1.linux-amd64 /opt/prometheus
Create a Prometheus system user by running the following command.
sudo useradd -rs /bin/false prometheus
Change ownership of Prometheus directories to Prometheus user.
sudo chown -R prometheus:prometheus /opt/prometheus
Create a Prometheus systemd service file.
sudo nano /etc/systemd/system/prometheus.service
Paste the following contents into the file.
[Unit]
Description=Prometheus
Wants=network-online.target
After=network-online.target
[Service]
User=prometheus
Group=prometheus
Type=simple
ExecStart=/opt/prometheus/prometheus
Restart=always
[Install]
WantedBy=multi-user.target
Reload systemd services.
sudo systemctl daemon-reload
Enable Prometheus service.
sudo systemctl enable prometheus.service
Start the Prometheus service.
sudo systemctl start prometheus.service
Verify that Prometheus is running by accessing the web interface at http://localhost:9090/
You have successfully installed Prometheus on Elementary OS Latest. You can now use the monitoring tool to monitor and alert on your system.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!