From 34ca18eed80b1cdc22e2f118c3d170610b82bf72 Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Fri, 14 Feb 2020 14:52:53 -0800 Subject: [PATCH] Add prometheus config, notes. Co-authored-by: Deirdre Connolly --- README.md | 15 +++++++++++++++ prometheus.yaml | 7 +++++++ 2 files changed, 22 insertions(+) create mode 100644 prometheus.yaml diff --git a/README.md b/README.md index 9daf45a6..c7b5e462 100644 --- a/README.md +++ b/README.md @@ -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 +``` \ No newline at end of file diff --git a/prometheus.yaml b/prometheus.yaml new file mode 100644 index 00000000..4001c0fa --- /dev/null +++ b/prometheus.yaml @@ -0,0 +1,7 @@ +scrape_configs: + - job_name: 'zebrad' + scrape_interval: 1s + metrics_path: '/' + static_configs: + - targets: ['localhost:9999'] +