From 9e193fb76475849615f490675b6c1a12cc7aef71 Mon Sep 17 00:00:00 2001 From: Peter Dupej Date: Mon, 2 May 2022 08:42:58 +0200 Subject: [PATCH] Update MetricsQL.md (#2519) remove typo from label_replace doc. --- docs/MetricsQL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/MetricsQL.md b/docs/MetricsQL.md index 83943770a6..48d3105f7d 100644 --- a/docs/MetricsQL.md +++ b/docs/MetricsQL.md @@ -774,7 +774,7 @@ sum by (__name__) ( #### label_replace -`label_replace(q, "dst_label", "replacement", "src_label", "regex")` applies the given `regex` to `src_label` and stores the `replacement` in `dst_label` if the given `regex` matches `src_label`. The `replacement` may contain references to regex captures such as `$1`, `$2`, etc. These references are substituted by the corresponding regex captures. For example, `label_replace(up{job="node-exporter"}, "foo", "bar-$1", "job", "node-(.+)")` would store `bar-node-exporter` label value into `foo` label. This function is supported by PromQL. +`label_replace(q, "dst_label", "replacement", "src_label", "regex")` applies the given `regex` to `src_label` and stores the `replacement` in `dst_label` if the given `regex` matches `src_label`. The `replacement` may contain references to regex captures such as `$1`, `$2`, etc. These references are substituted by the corresponding regex captures. For example, `label_replace(up{job="node-exporter"}, "foo", "bar-$1", "job", "node-(.+)")` would store `bar-exporter` label value into `foo` label. This function is supported by PromQL. #### label_set