From ea11a14c2d6fc4620cfec09fbdbdc49003853eae Mon Sep 17 00:00:00 2001 From: Tobias Manske Date: Wed, 10 Jan 2024 08:19:30 +0100 Subject: [PATCH] Add scrape option for host.docker.internal --- ansible/plays/services/metric-export/docker-compose.yaml | 2 ++ ansible/plays/services/traefik/docker-compose.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/plays/services/metric-export/docker-compose.yaml b/ansible/plays/services/metric-export/docker-compose.yaml index 12009b8..61aad6c 100644 --- a/ansible/plays/services/metric-export/docker-compose.yaml +++ b/ansible/plays/services/metric-export/docker-compose.yaml @@ -15,6 +15,8 @@ services: - prometheus-docker-sd - cadvisor - node-exporter + extra_hosts: + - host.docker.internal:host-gateway networks: - default # send - backend diff --git a/ansible/plays/services/traefik/docker-compose.yaml b/ansible/plays/services/traefik/docker-compose.yaml index 6265034..8c8f1fe 100644 --- a/ansible/plays/services/traefik/docker-compose.yaml +++ b/ansible/plays/services/traefik/docker-compose.yaml @@ -20,7 +20,7 @@ services: labels: - "prometheus-scrape.enabled=true" - "prometheus-scrape.port=9091" - - "prometheus-scrape.hostname=tobiasmanske.de" + - "prometheus-scrape.hostname=host.docker.internal" {% if deploy_traefik_fa %} traefik-fa: