Bringing your own Prometheus
This tutorial shows how to configure an external Prometheus instance to scrape both the control plane as well as the proxy’s metrics in a format that is consumable both by a user as well as Linkerd control plane components like web, etc.
There are two important points to tackle here.
- Configuring external Prometheus instance to get the Linkerd metrics.
The following scrape configuration has to be applied to the external Prometheus instance.
Note
Before applying, it is important to replace templated values (present in {{}}
) with direct values for the below configuration to work.
The running configuration of the builtin prometheus can be used as a reference.
Linkerd-Viz Extension Configuration
Linkerd’s viz extension components like , etc depend on the Prometheus instance to power the dashboard and CLI.
The prometheusUrl
field gives you a single place through which all these components can be configured to an external Prometheus URL. This is allowed both through the CLI and Helm.
Once applied, this configuration is not persistent across installs. The same has to be passed again by the user during re-installs, upgrades, etc.
When using an external Prometheus and configuring the field, Linkerd’s Prometheus will still be included in installation. If you wish to disable it, be sure to include the following configuration as well:
Helm
The same configuration can be applied through values.yaml
when using Helm. Once applied, Helm makes sure that the configuration is persistent across upgrades.
More information on installation through Helm can be found here