From bd750a2ae1fb76d035c16d579d301128d1b6d321 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: