██╗ ██╗██╗ ██╗██╗ ██╗ ███╗ ███╗ ██████╗ ███╗ ██╗
██║ ██║██║ ██║██║ ██║ ████╗ ████║██╔═══██╗████╗ ██║
██║ ██║██║ █╗ ██║██║ ██║█████╗██╔████╔██║██║ ██║██╔██╗ ██║
██║ ██║██║███╗██║██║ ██║╚════╝██║╚██╔╝██║██║ ██║██║╚██╗██║
╚██████╔╝╚███╔███╔╝╚██████╔╝ ██║ ╚═╝ ██║╚██████╔╝██║ ╚████║
╚═════╝ ╚══╝╚══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝
\.
\'. ;.
\ '. ,--''-.~-~-'-,
\,-' ,-. '.~-~-~~,
,-' (###) \-~'~=-.
_,-' '-' \=~-"~~',
/o \~-""~=-,
\__ \=-,~"-~,
"""===-----. \~=-"~-.
\ \*=~-"
\ "=====----
\
\
A monitoring solution for Unicorn validators using Prometheus, Grafana, and a custom consensus metrics exporter.
- Custom Prometheus exporter for Unicorn validators.
- Pre-configured Grafana dashboards.
- Dockerized setup for easy deployment.
Ensure the following are installed on the machine running the Grafana + Prometheus stack:
- Docker
- Docker Compose
Install with:
sudo apt install -y docker docker-compose
On the machine to be monitored (this could be the same as your Prometheus server), ensure the Prometheus exporter and REST API server are listening on ports 26660 and 1317, respectively:
# Modify prometheus settings in config.toml
sed -i '/^prometheus[[:space:]]*=/c\prometheus = true' ~/.unicornd/config/config.toml && \
sed -i '/^prometheus-listen-addr[[:space:]]*=/c\prometheus-listen-addr = ":26660"' ~/.unicornd/config/config.toml && \
# Modify API settings in app.toml
sed -i '/^enable[[:space:]]*=/c\enable = true' ~/.unicornd/config/app.toml && \
sed -i '/^address[[:space:]]*=/c\address = "tcp://0.0.0.0:1317"' ~/.unicornd/config/app.toml
Restart the unicornd service:
sudo systemctl restart unicornd.service
Alternatively, restart the unicornd process based on your setup.
Install Node Exporter to gather machine-level metrics:
curl -L https://github.com/prometheus/node_exporter/releases/download/v1.6.1/node_exporter-1.6.1.linux-amd64.tar.gz | sudo tar xvz -C /usr/local/bin --strip-components=1
Configure Node Exporter as a systemd service:
sudo tee /etc/systemd/system/node-exporter.service > /dev/null <<EOF
[Unit]
Description=Node Exporter
[Service]
User=ubuntu
Group=ubuntu
ExecStart=/usr/local/bin/node_exporter
Restart=always
[Install]
WantedBy=multi-user.target
EOF
Reload systemd configuration and start node-exporter
:
sudo systemctl daemon-reload
sudo systemctl enable node-exporter
sudo systemctl start node-exporter
-
Clone the repository:
git clone https://github.com/validaoxyz/uwu-mon.git cd uwu-mon/docker
-
Set up environment variables:
Copy
.env.sample
to.env
and fill in the required valuescp .env.sample .env
Edit
.env
:VALOPER=unicornvaloper... INSTANCE_IP=x.x.x.x
-
Build and start the containers:
bash generate-config.sh docker-compose up -d
-
Access the services:
Grafana will be available on port
3000
. To access your dashboard:- Ensure your firewall allows port
3000
- Visit
http://<your-ip>:3000
and log in using credentials from your.env
file.
- Ensure your firewall allows port
- Grafana Dashboards: Located in grafana/dashboards/.
- Prometheus Configuration: Files located in prometheus/.
- Exporter Code: Located in exporter/.
Contributions are welcome! Please submit a pull request or open an issue on GitHub.