# openHop on this machine: everything on the host network, so the exporter # reaches the openHop companion on 127.0.0.1 -- no Docker-bridge-to-host # traffic, which host firewalls (ufw, the default nftables ruleset) block. # # Enable it with one line in .env: # COMPOSE_FILE=docker-compose.yml:docker-compose.host.yml # # Exporter and Prometheus listen on 127.0.0.1 only; Grafana on GRAFANA_PORT # of every interface, as in the default setup. services: exporter: network_mode: host environment: MC_LISTEN: 127.0.0.1 MC_METRICS_PORT: "9200" prometheus: network_mode: host command: - --config.file=/etc/prometheus/prometheus.yml - --storage.tsdb.path=/prometheus - --storage.tsdb.retention.time=${PROMETHEUS_RETENTION:-400d} - --web.listen-address=127.0.0.1:${PROMETHEUS_PORT:-9090} volumes: !override - ./host-network/prometheus.yml:/etc/prometheus/prometheus.yml:ro - prometheus:/prometheus grafana: network_mode: host ports: !reset [] environment: GF_SERVER_HTTP_PORT: ${GRAFANA_PORT:-3000} PROMETHEUS_PORT: ${PROMETHEUS_PORT:-9090} volumes: !override - ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards:ro - ./host-network/datasource.yml:/etc/grafana/provisioning/datasources/prometheus.yml:ro - ../dashboards:/var/lib/grafana/dashboards:ro - grafana:/var/lib/grafana