Skip to main content


Prometheus is a monitoring application that must be installed on a separate monitoring machine

Download & Installation

To get started, begin by downloading the most recent release. Once the download is complete, proceed to unzip the file, and you'll be all set to proceed.

tar xvfz prometheus-X.X.X.linux-amd64.tar.gz
sudo rm -f prometheus-X.X.X.linux-amd64.tar.gz
mv prometheus-X.X.X.linux-amd64/ prometheus/
cd prometheus/

Add a symbolic link to the /usr/local/bin/ directory for system-wide access to Prometheus:

sudo ln -s /home/${USER}/prometheus/prometheus /usr/local/bin/

Configure Jobs in the Config File

Inside your prometheus directory open the prometheus.yml file:

sudo nano prometheus.yml

Ensure that both your Validator machine and local machine are included in the list of scrape targets in the configuration file. This step enables Prometheus to collect metrics from these sources. I have added all the exported outlined in this guide


# Monitoring Node with prometheus installed
- job_name: "monitor-hardware-metrics"

# current machine ip and port
- targets: ["localhost:9100"]

# Validator Host Hardware Metrics
- job_name: "validator-hardware-metrics"

# validator ip and port
- targets: ["validator_ip:9100"]

# Validator Internal Metrics
- job_name: "validator-internal-metrics"

# validator ip and port
- targets: ["validator_ip:26660"]

# Cosmos Validator Exporter
- job_name: "cosmos-validator-exporter"

# validator ip and port
- targets: ["<your_validator_ip>:9560"]

# Cosmos Node Exporter
- job_name: "cosmos-node-exporter"

# validator ip and port
- targets: ["<your_validator_ip>:9500"]

Additionally, when installing any additional exporter, don't forget to update the prometheus.yml file by adding the corresponding job configuration.

Create the web authentication file

First we need to have bcrypt tools installed (can be on any device) to generate a hash of your login password.

Create the gen-pass file

sudo nano

Paste the following text
import getpass
import bcrypt

password = getpass.getpass("password: ")
hashed_password = bcrypt.hashpw(password.encode("utf-8"), bcrypt.gensalt())

Save the file and execute the pythin script


You will be prompted for a password. Please enter it, and you will be provided with the encrypted password that you need to copy. Please see the example below

password: test

Create the file web.yml

sudo nano /home/user/prometheus/web.yml

Add your authentication to access Prometheus metrics. Replace <password> with the encrypted password you got from your

admin: <password>

(optional) You can now validate the file web.yml with this command:

promtool check web-config web.yml

You should get the following output:

web.yml SUCCESS

Add a system unit file

Open the .service with a text editor

sudo nano /etc/systemd/system/prometheus.service

Paste the below text



User=<your_user> #modify this field with your user
ExecStart=prometheus --config.file=/home/<your_user>/prometheus/prometheus.yml --web.config.file=/home/<your_user>/prometheus/web.yml --storage.tsdb.path=/home/<your_user>/prometheus/data


Reload the systemd Daemon

sudo systemctl daemon-reload

Enable autostart of Node Exporter service

sudo systemctl enable prometheus.service

Start Prometheus service

sudo systemctl start prometheus.service

Use this command to check logs in real time

sudo journalctl -u prometheus.service -f --output cat

After installing and running Prometheus, you can verify whether metrics are being exported from Node Exporter to Prometheus by using cURL to request the /metrics endpoint on Prometheus port 9090 (you need to insert the password created before)

curl -u admin http://localhost:9090/metrics

If you are running Prometheus on a VPS and want to access the web UI via an external browser, you need to first enable port 9090 on ufw

sudo ufw allow 9090/tcp

You can now enter this address in your browser to check if Prometheus displays them.