mirror of
https://github.com/furyhawk/cloudy.git
synced 2026-07-21 02:05:53 +00:00
feat: add metrics entrypoint for Prometheus scraping in Traefik configuration
This commit is contained in:
@@ -147,6 +147,8 @@ 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
|
||||
@@ -163,7 +165,9 @@ 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.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
|
||||
|
||||
@@ -15,5 +15,5 @@ scrape_configs:
|
||||
# so 'traefik' resolves via Swarm DNS.
|
||||
- job_name: 'traefik'
|
||||
static_configs:
|
||||
- targets: ['traefik:8080']
|
||||
- targets: ['traefik:8082']
|
||||
metrics_path: /metrics
|
||||
|
||||
Reference in New Issue
Block a user