From ac0a250354bf1fa6b28d70c43df24bc555782ee8 Mon Sep 17 00:00:00 2001 From: furyhawk Date: Sun, 12 Jul 2026 12:01:03 +0800 Subject: [PATCH] fix: update Prometheus service port configuration and correct Traefik target in scrape config --- swarm/prometheus.yml | 3 +++ swarm/prometheus/prometheus.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/swarm/prometheus.yml b/swarm/prometheus.yml index a6c245a..c03e830 100644 --- a/swarm/prometheus.yml +++ b/swarm/prometheus.yml @@ -21,6 +21,9 @@ services: - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro networks: - traefik-public + ports: + - target: 9090 + published: 9090 deploy: mode: replicated replicas: 1 diff --git a/swarm/prometheus/prometheus.yml b/swarm/prometheus/prometheus.yml index 348e81a..f47b131 100644 --- a/swarm/prometheus/prometheus.yml +++ b/swarm/prometheus/prometheus.yml @@ -16,4 +16,4 @@ scrape_configs: # Metrics are served on the dedicated "metrics" entrypoint (port 8082). - job_name: 'traefik' static_configs: - - targets: ['192.168.50.220:8082'] + - targets: ['core_traefik:8082']