Prometheus Exporter for Pyth Network on-chain metrics about a publisher.
- Main repo: https://gitlab.com/Blockdaemon/solana/pyth_exporter
- GitHub mirror: https://github.com/Blockdaemon/pyth_exporter
The Go 1.17 toolchain or newer is required to build from source.
To pull dependencies and build the publisher program, run the following:
go build -o ./pyth_exporter .
This program is also available as a Docker image based on Alpine Linux.
To build the Docker image from source:
docker build -t db-pyth .
The GitLab CI integration builds Docker images for every branch and release:
# Latest master build
docker pull registry.gitlab.com/blockdaemon/solana/pyth_exporter/master:latest
# Latest tagged release
docker pull registry.gitlab.com/blockdaemon/solana/pyth_exporter:latest
Usage of pyth_exporter:
-dev
Run in development mode
-env string
Pyth env (devnet, testnet, mainnet) (default "mainnet")
-listen string
Address where to serve debug info and metrics HTTP server (default ":8080")
-log-level value
Log level
-products value
Pyth product keys (default all)
-program value
Pyth program key (derived from env)
-publishers value
Pyth publishers (default all)
-rpc string
Solana RPC URL
-ws string
Solana WebSocket RPC URL
./docker-compose.yml defines a reference Docker Compose deployment on a single host.
The compose config includes the following services:
- pyth_exporter (this repo)
- Prometheus monitoring agent
- Grafana monitoring UI
The reference deployment requires Docker Compose: Compose installation guide
The env vars file contains deployment-specific config. Copy the example config and adjust it.
cp docker.example.env docker.env
$EDITOR docker.env
*_IMAGE
: Docker image stringsSOLANA_RPC
: Solana RPC accessSOLANA_WS
: Solana WebSocket accessSOLANA_ENV
: Environment name (devnet, testnet, mainnet)
Start all services
docker-compose --env-file docker.env up -d
Stop all services
docker-compose down
Stop all services and delete all data (!)
docker-compose down -v --remove-orphans
View service status
docker-compose ps
View service logs
docker-compose logs
Overview
Status Matrix
Aggregated Price
Multiple Price Components
Single Price Component