Using relabel_configs with promregator.scraping.labelEnrichment - promregator/promregator GitHub Wiki

Symptom

  1. You are unsure how to configure Prometheus correctly depending on the setting of promregator.scraping.labelEnrichment.
  2. You see labels in Prometheus whose names start with exported_*.

Background / Root Cause

Starting with 0.5.0, Promregator is capable of delegating the enrichment of labels to Prometheus. This has the advantage that you are enabled to use the relabel_configs in Prometheus to define your custom labels.

Solution

You may want to review the section "Label Rewriting" at our documentation page.

Additionally, you may want to have a look at Brian Brazil's post on dealing with the instance label.

Moreover, check that the configurations of Promregator and Prometheus fit to each other. The following table gives an overview:

Single Endpoint Scraping Mode Single Target Scraping Mode
promregator.scraping.labelEnrichment = true (default) You should not have any relabel_configs configured. relabel_configs should rewrite instance at least; usually no further rules should exist.
promregator.scraping.labelEnrichment = false You should not have any relabel_configs configured. relabel_configs should rewrite instance at least; additional rules as you please.

References