👌 IMPROVE: Update Hetzner configuration files and scripts to include new targets, enhance health check metrics, and organize file paths for better maintainability
This commit is contained in:
@@ -1,12 +1,28 @@
|
||||
global:
|
||||
scrape_interval: 15s # Default for all jobs unless overridden
|
||||
scrape_interval: 15s # ⏱️ Default interval Prometheus uses to scrape metrics from all targets, unless overridden in specific jobs.
|
||||
|
||||
scrape_configs:
|
||||
# Existing Hetzner Dynamic Configuration
|
||||
- job_name: "hetzner-dynamic"
|
||||
scheme: http
|
||||
file_sd_configs:
|
||||
- job_name: "hetzner-dynamic" # 🏷️ Logical name for the scrape job (used in metrics as job="hetzner-dynamic").
|
||||
file_sd_configs: # 📂 Enable file-based service discovery. Prometheus will look at files to dynamically load targets.
|
||||
- files:
|
||||
- "/opt/phx/main/config/hetzner_targets.json"
|
||||
refresh_interval: 30s
|
||||
scrape_interval: 5s # Custom interval for Hetzner servers
|
||||
- "/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.
|
||||
scheme: http # 🌐 Use plain HTTP when scraping the targets (not HTTPS).
|
||||
|
||||
# - job_name: "phoenix-system"
|
||||
# file_sd_configs:
|
||||
# - files:
|
||||
# - "/opt/phx/main/config/phoenix_system_hetzner_targets.json"
|
||||
# refresh_interval: 30s
|
||||
# scrape_interval: 5s
|
||||
# scheme: http
|
||||
|
||||
# - job_name: "phoenix-worker"
|
||||
# file_sd_configs:
|
||||
# - files:
|
||||
# - "/opt/phx/main/config/phoenix_worker_hetzner_targets.json"
|
||||
# refresh_interval: 30s
|
||||
# scrape_interval: 5s
|
||||
# scheme: http
|
||||
Reference in New Issue
Block a user