👌 IMPROVE: Add new health exporter targets configuration and update Prometheus to include the new health exporter job

This commit is contained in:
2025-05-23 09:30:33 +00:00
parent 945cae3908
commit 7f9f7b1aa4
4 changed files with 395 additions and 421 deletions

View File

@@ -8,8 +8,16 @@ scrape_configs:
- files:
- "/opt/phx/main/config/hetzner_targets.json" # 📁 JSON file containing the list of targets (e.g. IPs, ports, labels).
refresh_interval: 30s # 🔁 How often Prometheus checks the file for changes and updates the target list.
scrape_interval: 5s # ⏱️ Override global default: scrape metrics from each target in this job every 5 seconds.
scrape_interval: 5s # ⏱️ Override global default: scrape metrics from each target in this job every x seconds.
scheme: http # 🌐 Use plain HTTP when scraping the targets (not HTTPS).
- job_name: "phoenix-health-exporter"
file_sd_configs:
- files:
- "/opt/phx/main/config/phoenix_health_exporter_hetzner_targets.json"
refresh_interval: 30s
scrape_interval: 2m # Change it carefully, it is a heavy job to keep open and close to check the health of DB connection, there annotation to refactor it and use a new pgDebounce image.
scheme: http
# - job_name: "phoenix-system"
# file_sd_configs: