From 6a3cbe756cb2c37477325b16e250372c974e0d51 Mon Sep 17 00:00:00 2001 From: Tobias Manske Date: Wed, 9 Aug 2023 02:56:23 +0200 Subject: [PATCH] Prometheus: Scrape even metrics from mimir promtail and loki --- .../plays/services/prometheus/docker-compose.yaml | 9 +++++++++ coreos-config/plays/services/prometheus/promtail.yml | 2 ++ 2 files changed, 11 insertions(+) diff --git a/coreos-config/plays/services/prometheus/docker-compose.yaml b/coreos-config/plays/services/prometheus/docker-compose.yaml index a1896e3..a878e8d 100644 --- a/coreos-config/plays/services/prometheus/docker-compose.yaml +++ b/coreos-config/plays/services/prometheus/docker-compose.yaml @@ -168,6 +168,9 @@ services: volumes: - ./loki.yml:/etc/loki/loki.yaml:ro,Z - loki_data:/loki + labels: + - "prometheus-scrape.enabled=true" + - "prometheus-scrape.port=3100" networks: - backend - default @@ -183,6 +186,9 @@ services: - /var/lib/docker/containers:/var/lib/docker/containers:ro - /var/run/docker.sock:/var/run/docker.sock command: -config.file=/etc/promtail/config.yml + labels: + - "prometheus-scrape.enabled=true" + - "prometheus-scrape.port=8080" networks: - backend @@ -196,6 +202,9 @@ services: - /bin/mimir - -config.file=/etc/mimir-config/mimir.yaml - -validation.max-label-names-per-series=60 + labels: + - "prometheus-scrape.enabled=true" + - "prometheus-scrape.port=8080" networks: - backend - default diff --git a/coreos-config/plays/services/prometheus/promtail.yml b/coreos-config/plays/services/prometheus/promtail.yml index 1d0052d..a9b66e3 100644 --- a/coreos-config/plays/services/prometheus/promtail.yml +++ b/coreos-config/plays/services/prometheus/promtail.yml @@ -1,5 +1,7 @@ positions: filename: /positions.yaml +server: + http_listen_port: 8080 clients: - url: http://loki:3100/loki/api/v1/push