Monitor traefik with prometheus all on k8s

Hi,
in short: how can i montior traefik with prometheus. Anyone having a complete tutorial source for this.

  • i got traefik installed via helm chart in my k8s cluster
  • added some arguments:
    - "--metrics=true"
    - "--metrics.prometheus=true"
    - "--metrics.prometheus.buckets=0.100000, 0.300000, 1.200000, 5.000000"
    - "--metrics.prometheus.addEntryPointsLabels=true"
    - "--metrics.prometheus.addServicesLabels=true"
    - "--metrics.prometheus.addRoutersLabels=true"
    
  • traefik dashboard is enabled and says at metrics "prometheus"
  • prometheus is deployed via helm chart (prometheus-community/kube-prometheus-stack)
  • i have access to grafana

But theres either no data in grafana nor can i access "/metrics".

Some sources state the deployment of a service monitor but where can i find a working one for traefik?

I thougt this would be much easier and less challenging or am i missing something.

ok, i understand now this is more a prometheus related problem than a traefik one.
However anyone having a good starting point/example how to integrate traefik into prometheus?

Hello @lachnerd

Can you please have a look on that example:

?

1 Like

Ok, i got it working now, thx a lot.
Although i still don't get why i have to use a separate service "traefik-dashboard".

Why not use the traefik service itself ?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.