Hey,
I'm new to using Traefik so please excuse my depth in knowledge
I have 2 instances of traefik deployed to a Nomad cluster with Consul used as the service discovery provider to Traefik. Everything is working great except now that I want to monitor Traefik itself, the endpoint to get the metrics is stuck on :8081/metrics.
This wouldn't be so much a problem but when configuring prometheus to also use Consul, the exposed Traefik service is on port 8080.
I guess my question is, can I expose another service like "traefik-metrics" to Consul when deploying Traefik, or is something like exporting metrics on port 8080 possible?
snippet of traefik config
[entryPoints]
[entryPoints.http]
address = ":8080"
[entryPoints.traefik]
address = ":8081"
[ping]
entryPoint = "http"
[api]
dashboard = true
insecure = true
# Enable Consul Catalog configuration backend.
[providers.consulCatalog]
prefix = "traefik"
exposedByDefault = false
[providers.consulCatalog.endpoint]
address = "127.0.0.1:8500"
scheme = "http"
# Metrics
[metrics]
[metrics.prometheus]
EOF
prometheus config
- job_name: 'traefik'
metrics_path: '/metrics'
consul_sd_configs:
- server: '{{ env "NOMAD_IP_prometheus_ui" }}:8500'
services: ['traefik']