Fix nginx-exporter: back to bridge network with host.docker.internal

host network mode prevented Prometheus from reaching the exporter.
Switched back to bridge with extra_hosts + explicit port mapping.
Added timeout flag to prevent hanging on stub_status fetch.

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

View file

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