π‘Granfana Dashboard - Monitor node
1. Install Prometheus
cd $HOME
wget https://github.com/prometheus/prometheus/releases/download/v2.42.0/prometheus-2.42.0.linux-amd64.tar.gz
tar xvf prometheus-2.42.0.linux-amd64.tar.gz
sudo cp prometheus-2.42.0.linux-amd64 /opt/prometheus# Create Prometheus user
sudo useradd --no-create-home --shell /bin/false prometheus# Create directory
sudo mkdir /etc/prometheus
sudo mkdir /var/lib/prometheus
sudo touch /etc/default/prometheus
sudo chown prometheus:prometheus /etc/prometheus
sudo chown prometheus:prometheus /var/lib/prometheus
sudo chown -R prometheus:prometheus /opt/prometheus
sudo chown -R prometheus:prometheus /etc/prometheus
sudo chown -R prometheus:prometheus /var/lib/prometheus
sudo chmod 755 /opt/prometheus/prometheus# Create Prometheus config
Sample:
Explain config:
For config this port IP_VPS:51660 you have to edit 2 files at your node app.toml & config.tomland Restart node


Set permissions for the configuration file
# Create service file
Content:
Reload systemd & Start
2. Install Node Exporter:
Node Exporter is a tool that collects hardware and OS-level metrics from Linux systems. It exposes these metrics in a format that Prometheus can scrape, providing insights into system performance and resource usage.
# Create service file
*Port listen: 9200 (you can custom) with flag `--web.listen-address=:9200`
# Reload systemd and start
3. Install Grafana
Start & check status
Web interface:
# Grafana config
Default port is 3000 if you need custom find this line to change to 3002and restart
4. Set up Dashboard and Alerting
# Access your Grafana
Launch browser and go to http://<YOUR-SERVER-GLOBAL-IP>:3000/

# Click Add new data source and select Prometheus

Enter http://localhost:9099 into Prometheus server URL

Scroll to the bottom and click Save & test

# Go to Dashboards to create dashboard

Click Upload JSON file:
Please download the 0G-grafana-json-file and upload: https://josephtran.co/0g_validator.json
# Select prometheus datasource

# Finish

Last updated
