From eed8b229c8eab56672a9959b895551b296471846 Mon Sep 17 00:00:00 2001 From: furyhawk Date: Sun, 12 Jul 2026 10:08:01 +0800 Subject: [PATCH] feat: update Traefik metrics endpoint for Prometheus scraping from port 8082 to 8080 --- swarm/core.yml | 9 +++++---- swarm/prometheus/prometheus.yml | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/swarm/core.yml b/swarm/core.yml index 1b94025..ee11198 100644 --- a/swarm/core.yml +++ b/swarm/core.yml @@ -46,6 +46,10 @@ services: - target: 8033 published: 8033 mode: host + # Metrics endpoints for Prometheus scraping + - target: 8080 + published: 8080 + mode: host deploy: placement: constraints: @@ -147,8 +151,6 @@ services: - --entrypoints.web-socket-secure.address=:8084 - --entrypoints.bolt-socket.address=:7687 - --entrypoints.xiaozhi-ws.address=:8033 - # Create an entrypoint "metrics" for Prometheus scraping (not published externally) - - --entrypoints.metrics.address=:8082 # Create the certificate resolver "le" for Let's Encrypt, uses the environment variable EMAIL - --certificatesresolvers.le.acme.email=${EMAIL?Variable not set} # Store the Let's Encrypt certificates in the mounted volume @@ -165,9 +167,8 @@ services: # Enable the Dashboard and API - --api=true # Enable Prometheus metrics for scraping by Prometheus - # Metrics are served on the dedicated "metrics" entrypoint (port 8082) + # Metrics are served on the default API port (8080) - --metrics.prometheus=true - - --metrics.prometheus.entryPoint=metrics - --metrics.prometheus.buckets=0.1,0.3,1.2,5.0 - --metrics.prometheus.addEntryPointsLabels=true - --metrics.prometheus.addServicesLabels=true diff --git a/swarm/prometheus/prometheus.yml b/swarm/prometheus/prometheus.yml index f9ef4ae..e1f834f 100644 --- a/swarm/prometheus/prometheus.yml +++ b/swarm/prometheus/prometheus.yml @@ -15,5 +15,5 @@ scrape_configs: # so 'traefik' resolves via Swarm DNS. - job_name: 'traefik' static_configs: - - targets: ['traefik:8082'] + - targets: ['traefik:8080'] metrics_path: /metrics