Fix nginx-exporter: use host network mode for direct stub_status access

nginx-exporter couldn't reach host nginx via host.docker.internal
(connection timeout). Switch to network_mode: host so it can access
127.0.0.1:8888 directly. Prometheus scrapes via host.docker.internal
with extra_hosts mapping.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
justin 2026-05-01 03:19:57 -05:00
parent 27cc925c4d
commit 433827138b
2 changed files with 5 additions and 4 deletions

View file

@ -42,7 +42,7 @@ scrape_configs:
# ── nginx ──────────────────────────────────────────────────────────
- job_name: nginx
static_configs:
- targets: ["nginx-exporter:9113"]
- targets: ["host.docker.internal:9113"]
# ── Blackbox probes (HTTP endpoint monitoring) ─────────────────────
- job_name: blackbox_http