Prefixing Prometheus metrics #4887
Answered
by
ihcsim
adinhodovic
asked this question in
General
-
Bug ReportWhat is the issue?How do I prefix Linkerd Prometheus metrics, I've found documentation for linkerd but cannot find any documentation for linkerd2. |
Beta Was this translation helpful? Give feedback.
Answered by
ihcsim
Aug 17, 2020
Replies: 1 comment 2 replies
-
@adinhodovic For a static prefix, you can update the Prometheus metric_relabel_configs:
- source_labels: [__name__]
target_label: __name__
replacement: "prefix_${1}" For dynamic prefixes, it's better to use labels. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
adinhodovic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@adinhodovic For a static prefix, you can update the Prometheus
scrape_configs
with something like:For dynamic prefixes, it's better to use labels.