feat: update Traefik job configuration in Prometheus to use DNS service discovery

This commit is contained in:
2026-07-12 10:36:55 +08:00
parent 239adbbef9
commit bbe7725346
+4 -3
View File
@@ -15,6 +15,7 @@ scrape_configs:
# Traefik is in the 'core' stack, so the Swarm DNS name is core_traefik.
# Metrics are served on the dedicated "metrics" entrypoint (port 8082).
- job_name: 'traefik'
static_configs:
- targets: ['core_traefik:8082']
metrics_path: /metrics
dns_sd_configs:
- names: ['core_traefik']
type: 'A'
port: 8082