# Exporting metrics to prometheus

**URL:** <https://community.traefik.io/t/exporting-metrics-to-prometheus/11338>\
**Category:** Traefik v2\
**Tags:** consul-catalog, metrics\
**Created:** [July 29, 2021, 6:16pm UTC](https://community.traefik.io/t/exporting-metrics-to-prometheus/11338 "2021-07-29T18:16:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![henjem](https://avatars.discourse-cdn.com/v4/letter/h/df788c/32.png) [@henjem](https://community.traefik.io/u/henjem)\
**Post date:** [July 29, 2021, 6:16pm UTC](https://community.traefik.io/t/exporting-metrics-to-prometheus/11338/1 "2021-07-29T18:16:35Z")

</div>

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

```auto
[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

```yaml
  - job_name: 'traefik'
    metrics_path: '/metrics'

    consul_sd_configs:
    - server: '{{ env "NOMAD_IP_prometheus_ui" }}:8500'
      services: ['traefik']

```
