Global monitoring stack with Prometheus (as a remote_write receiver) and Grafana. Simple local ports, no proxy, no TLS.
What you get:
- A remote_write endpoint at
http://<host>:<PROM_PUBLIC_PORT>/api/v1/write - Grafana served at
http://<host>:<GRAFANA_PORT>pre-provisioned with the Prometheus datasource
- Prereqs
- Docker and Docker Compose
- Configure
- Copy
.env.exampleto.envand set values:PROM_PUBLIC_PORT(default 9090)GRAFANA_PORTand Grafana admin creds- Adjust
PROM_RETENTIONif needed
- Launch
docker compose up -d
On each Prometheus (or Prometheus Agent) that should ship metrics to this global instance, add something like the following to its config:
global:
external_labels:
source: node-1 # unique per sender
chain: mainnet # e.g., network/tenant/project
remote_write:
- url: http://<your-host>:<PROM_PUBLIC_PORT>/api/v1/write
queue_config:
capacity: 20000
max_shards: 16
max_samples_per_send: 10000
max_backoff: 5m
Important: Ensure each sender has distinguishing external_labels to avoid series collisions and to make queries useful (e.g., source, chain, project).
- This setup is intentionally minimal and uses plain HTTP.
- If exposing to the internet, put it behind your own reverse proxy or LB that handles TLS and any auth/rate limiting you need.
- Size disk and adjust
PROM_RETENTIONaccording to expected metric volume and cardinality.
docker-compose.yml— services: Prometheus, Grafanaprometheus/prometheus.yml— minimal config; receiver is enabled by flaggrafana/provisioning/datasources/datasource.yml— pre-provisioned Prometheus datasource.env.example— copy to.envand fill