From 710f8ce5aa5ca6dd11e4b19119df1e5de5d808f4 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 11 Dec 2020 18:23:45 +0200 Subject: [PATCH] docs/Single-server-VictoriaMetrics.md: clarify docs in `Relabeling` section --- README.md | 6 +++++- docs/Single-server-VictoriaMetrics.md | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 531ea7522..1bb4dfb29 100644 --- a/README.md +++ b/README.md @@ -983,11 +983,15 @@ VictoriaMetrics also may scrape Prometheus targets - see [these docs](#how-to-sc VictoriaMetrics supports Prometheus-compatible relabeling for all the ingested metrics if `-relabelConfig` command-line flag points to a file containing a list of [relabel_config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config) entries. +See [this article with relabeling tips and tricks](https://valyala.medium.com/how-to-use-relabeling-in-prometheus-and-victoriametrics-8b90fc22c4b2). + Example contents for `-relabelConfig` file: ```yml -# relabel_config.yml +# Add {cluster="dev"} label. - target_label: cluster replacement: dev + +# Drop the metric (or scrape target) with `{__meta_kubernetes_pod_container_init="true"}` label. - action: drop source_labels: [__meta_kubernetes_pod_container_init] regex: true diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md index 531ea7522..1bb4dfb29 100644 --- a/docs/Single-server-VictoriaMetrics.md +++ b/docs/Single-server-VictoriaMetrics.md @@ -983,11 +983,15 @@ VictoriaMetrics also may scrape Prometheus targets - see [these docs](#how-to-sc VictoriaMetrics supports Prometheus-compatible relabeling for all the ingested metrics if `-relabelConfig` command-line flag points to a file containing a list of [relabel_config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config) entries. +See [this article with relabeling tips and tricks](https://valyala.medium.com/how-to-use-relabeling-in-prometheus-and-victoriametrics-8b90fc22c4b2). + Example contents for `-relabelConfig` file: ```yml -# relabel_config.yml +# Add {cluster="dev"} label. - target_label: cluster replacement: dev + +# Drop the metric (or scrape target) with `{__meta_kubernetes_pod_container_init="true"}` label. - action: drop source_labels: [__meta_kubernetes_pod_container_init] regex: true