diff --git a/docker-compose/prometheus-node-exporter.yml b/docker-compose/prometheus-node-exporter.yml index 6c1ccc2de5affad0ab7ad435b2cb7c07dd90fe95..da82726fc2ebec19bdba44067ea813adeb618170 100644 --- a/docker-compose/prometheus-node-exporter.yml +++ b/docker-compose/prometheus-node-exporter.yml @@ -15,8 +15,7 @@ services: options: max-size: "100m" max-file: "10" - networks: - - control + network_mode: host # run on the host to be able to access host network statistics logging: driver: syslog options: diff --git a/docker-compose/prometheus.yml b/docker-compose/prometheus.yml index 8029e9ba6d83e4af824ca307b8aae17af919333e..f91a1a17428b5abf7e53149377a21629539b3bb9 100644 --- a/docker-compose/prometheus.yml +++ b/docker-compose/prometheus.yml @@ -23,6 +23,8 @@ services: max-file: "10" networks: - control + extra_hosts: + - "host.docker.internal:host-gateway" volumes: - prometheus-data:/prometheus ports: diff --git a/docker-compose/prometheus/prometheus.yml b/docker-compose/prometheus/prometheus.yml index 8c847d8aa2c31298d7c8842f17d95b597df420b3..32746772773146e4b356c8c019e41c5356fecfd1 100644 --- a/docker-compose/prometheus/prometheus.yml +++ b/docker-compose/prometheus/prometheus.yml @@ -13,4 +13,4 @@ scrape_configs: scrape_interval: 60s static_configs: - targets: - - "prometheus-node-exporter:9100" + - "host.docker.internal:9100"