Skip to content

Commit

Permalink
chore: Add metrics-services (prometheus and grafana) for dev purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyno-zeta committed Jun 21, 2020
1 parent 7f861cc commit 0cecdd4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Makefile
Expand Up @@ -103,6 +103,16 @@ down/services:
docker rm -f opa || true
docker rm -f keycloak || true

.PHONY: down/metrics-services
down/metrics-services:
docker rm -f prometheus || true
docker rm -f grafana || true

.PHONY: setup/metrics-services
setup/metrics-services:
docker run --rm -d --name prometheus -v $(CURRENT_DIR)/local-resources/prometheus/prometheus.yml:/prometheus/prometheus.yml --network=host prom/prometheus:v2.18.0 --web.listen-address=:9191
docker run --rm -d --name grafana --network=host grafana/grafana:7.0.3

.PHONY: setup/services
setup/services: down/services
tar czvf local-resources/opa/bundle.tar.gz --directory=local-resources/opa/bundle example/
Expand Down
13 changes: 13 additions & 0 deletions local-resources/prometheus/prometheus.yml
@@ -0,0 +1,13 @@
scrape_configs:
- job_name: "prometheus"

scrape_interval: 5s
scrape_timeout: 5s

static_configs:
- targets: ["localhost:9191"]

- job_name: "s3-proxy"
scrape_interval: 5s
static_configs:
- targets: ["localhost:9090"]

0 comments on commit 0cecdd4

Please sign in to comment.