Prometheus is an open-source monitoring system that is used to collect and store metrics from various sources. In this tutorial, we will guide you through the process of installing Prometheus on Manjaro.
Before we start with the installation, you need to make sure that your system meets the following requirements:
To install Prometheus, follow the steps below:
Go to the Prometheus website and select the version you want to download.
Download the binary file prometheus-<version>.linux-amd64.tar.gz
corresponding to your Manjaro system’s architecture (32-bit or 64-bit).
Extract the contents of the downloaded archive file with the following command:
tar -xvf prometheus-<version>.tar.gz
After extracting the files, you will see a directory named prometheus-<version>.linux-amd64
containing the Prometheus binaries.
Move this directory to the installation path /usr/local/bin/prometheus
with the following command:
sudo mv prometheus-<version>.linux-amd64 /usr/local/bin/prometheus
This command will move the Prometheus binaries to the /usr/local/bin/prometheus
directory, which is commonly used as the installation directory for Prometheus.
Now that you have installed Prometheus on your Manjaro system, you need to create a configuration file for it.
Open a text editor and create a new file named prometheus.yml
.
Copy the following configuration and paste it into the prometheus.yml
file:
scrape_configs:
- job_name: 'prometheus'
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']
This configuration tells Prometheus to scrape data from itself (on localhost:9090
) every 5 seconds.
Save and close the file.
To run Prometheus, follow the steps below:
Open a terminal window and navigate to the /usr/local/bin/prometheus
directory with the following command:
cd /usr/local/bin/prometheus
Start Prometheus with the following command:
./prometheus
This command will start Prometheus and load the configuration file you created in the previous step.
Open a web browser and go to http://localhost:9090
.
This will open the Prometheus web interface, where you can view and explore the metrics collected by Prometheus.
Congratulations! You have successfully installed Prometheus on your Manjaro system. You can now configure Prometheus to collect metrics from other endpoints and set up monitoring for your systems.
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!