From 3bc88d51778b194b5b62e210ff066660a8f166c8 Mon Sep 17 00:00:00 2001 From: yorickdowne <71337066+yorickdowne@users.noreply.github.com> Date: Fri, 30 Aug 2024 10:44:56 -0400 Subject: [PATCH] Remove monitor-net from prometheus.tmpl As per https://stackoverflow.com/questions/66676204/prometheus-node-exporter-in-docker-host-networking-vs-hostnames/66689508#66689508 this is not necessary when using `host.docker.internal:host-gateway` Removing it allows the use of the Grafana stack in environments where other Docker stacks also run, and the hard-coded monitor-net may "step on" existing bridge networks. --- install/templates/prometheus.tmpl | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/install/templates/prometheus.tmpl b/install/templates/prometheus.tmpl index d265752..dc5cfc1 100644 --- a/install/templates/prometheus.tmpl +++ b/install/templates/prometheus.tmpl @@ -24,20 +24,9 @@ services: - "prometheus-data:/prometheus" networks: - net - - monitor-net extra_hosts: - "host.docker.internal:host-gateway" networks: - # Bridge so node-exporter can get the real NIC details - # See https://stackoverflow.com/a/66689508 for more info - monitor-net: - driver: bridge - ipam: - driver: default - config: - - subnet: 172.23.0.0/16 - ip_range: 172.23.5.0/24 - gateway: 172.23.5.254 net: volumes: prometheus-data: