Visualizing Zcash Metrics: TUTORIAL

Опубликовано: 02 Август 2026
на канале: ZecHub
205
15

A tutorial showing how to view Zcash Metrics using the Zebra Node and Grafana

1.) Install Zebra with metric support

https://zebra.zfnd.org/user/metrics.html

`cargo install --features prometheus --git https://github.com/ZcashFoundation/zebra --tag v1.9.0 zebrad`


2.) Configure Zebra

If you dont have a zebrad.toml file, create one as follows:

`zebrad generate -o zebrad.toml`

Update the following settings:

mousepad ~/.config/zebrad.toml

`[metrics]
endpoint_addr = "127.0.0.1:9999"`


3.) Sync Zebra

``` bash
screen -S zebra
zebrad start
```
Prometheus

wget https://github.com/ZcashFoundation/ze...

Move this file to a desired location and update the upcoming docker command of its location.

*file permissions on downloaded prometheus.yml are important and cause major issues with mounting this proplerly!!!* chmod 664

https://chmod-calculator.com/

sudo docker run --detach --network host --volume prometheus-storage:/prometheus --volume /home/zkhb/Documents/Crypto/Zcash/prometheus.yaml:/etc/prometheus/prometheus.yml prom/prometheus
sudo docker run --detach --network host --env GF_SERVER_HTTP_PORT=3030 --env GF_SERVER_HTTP_ADDR=localhost --volume grafana-storage:/var/lib/grafana grafana/grafana

Now the grafana dashboard is available at http://localhost:3030

the default username and password is admin/admin, please update




4.) Helpful commands

`sudo docker container ls` list all containers
`sudo docker ps -a` list containers running
`sudo docker image ls` list all images
`sudo docker volume ls` list all volumes
`sudo docker system df -v` Displays information regarding the amount of disk space used by the Docker daemon

In Docker,

an `image` a blueprint or template containing all the necessary files and configurations to run an application, essentially a read-only snapshot of an environment
a `container` a running instance of an image, allowing you to execute the application defined within the image
a `volume` a mechanism to store persistent data outside of the container, enabling data to persist even when the container is stopped and restarted, effectively acting as a separate storage area mounted into the container's filesystem

if you need to reset the admin password for grafana, here is how you do it

`sudo docker exec -ti YOURIMAGEID grafana-cli admin reset-admin-password --homepath /var/lib/grafana YOURPW`