Metrics endpoint for Linkerd components in K8s


I’m working on setting up Linkerd component monitoring to pull some metrics into Dynatrace via an integration.

Essentially a Dynatrace component can query the pods for Prometheus format metrics based on the presence of some annotations that describe the port and path of the metrics endpoint.

I’ve already got this working for the proxy metrics /metrics on :4191 but am having trouble finding the endpoints for the component metrics. I’ve found this which discusses an endpoint needs to be enabled in a config but have two questions on that:

  • Following the tutorial Linkerd ships with a Prometheus instance that is already collecting these metrics so my expectation is that a metrics endpoint must already be available somewhere that this instance uses to scrape metrics unless there is something I’m missing about how Prometheus can collect metrics. I’ve tried to make sense of the configs I can find in Kubernetes but nothing seems to say “scrape this path on this port.”

  • If I do need to enable this in a config, where would I set that config in the case of the vanilla deployment coming from here?

Any assistance is greatly appreciated!

Hi @jimm-with-a-j

The control plane components expose their metrics on various admin ports in the 999* range and are accessible at the url: http://<component-pod>:<admin-port>/metrics

linkerd-controller, linkerd-proxy-injector: 9995
linkerd-identity: 9990
linkerd-destination: 9996
linkerd-sp-validator: 9997
linkerd-tap: 9998
linkerd-web: 9994

Have a look at each of the charts to see how the admin ports are configured.

Please join us in linkerd slack if you have any additional questions!

1 Like

Ah! I was so close, just didn’t try plain old metrics.

Will do. Thanks!