It's generally a Bad Idea to run random scripts from the internet on your node unless you know what they're doing. To that end, please read and try to understand this before installing it, and only install it if you feel comfortable.
Make a new docker-compose.yml file in your home directory:
touch ~/docker-compose.yml
Edit it with your favorite text editor, eg nano ~/docker-compose.yml
Populate it like this (you need to fill in YOUR_API_KEY, which you can get in your beaconcha.in account settings, and YOUR_NODE_NAME which can be any string (without spaces):
version: "3.7"
services:
eth2-client-metrics-exporter:
image: gobitfly/eth2-client-metrics-exporter
container_name: eth2-client-metrics-exporter
restart: unless-stopped
command:
- --server.address=https://beaconcha.in/api/v1/client/metrics?apikey=YOUR_API_KEY&machine=YOUR_NODE_NAME
- --system.partition=/host/rootfs
- --beaconnode.type=nimbus
- --beaconnode.address=http://eth2:9100/metrics
volumes:
- /sys:/host/sys:ro
- /proc:/host/proc:ro
- /:/host/rootfs:ro
environment:
- HOST_PROC=/host/proc
- HOST_SYS=/host/sys
networks:
default:
name: rocketpool_net
external: true
Then, pull the image with docker compose pull
Start the container with docker compose up -d
Note: The beaconcha.in app has a 10 to 15 minute delay before data will start to show up.
Periodically, you may want to update the image by running docker compose pull
and then docker compose up -d
.
If you need to check the logs to debug, you can use docker logs eth2-client-metrics-exporter
I forked & applied fixes here
Gist doesn't support pull requests, I guess.