Add prometheus config, notes.

Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
This commit is contained in:
Henry de Valence 2020-02-14 14:52:53 -08:00 committed by Deirdre Connolly
parent 75d3d44fb3
commit 34ca18eed8
2 changed files with 22 additions and 0 deletions

View File

@ -20,3 +20,18 @@ Zebra is distributed under the terms of both the MIT license
and the Apache License (Version 2.0).
See [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT).
## Metrics
Notes on local metrics collection:
```
# create a storage volume for grafana (once)
sudo docker volume create grafana-storage
# run prometheus with the included config
sudo docker run --network host -v /path/to/zebra/prometheus.yaml:/etc/prometheus/prometheus.yml prom/prometheus
# run grafana
sudo docker run -d --network host -v grafana-storage:/var/lib/grafana grafana/grafana
```

7
prometheus.yaml Normal file
View File

@ -0,0 +1,7 @@
scrape_configs:
- job_name: 'zebrad'
scrape_interval: 1s
metrics_path: '/'
static_configs:
- targets: ['localhost:9999']