How relabeling in Prometheus works
Relabeling is a powerful tool that allows you to classify and filter Prometheus targets and metrics by rewriting their label set. The purpose of this post is to explain the value of Prometheus’ relabel_config block, the different places where it can be found, and its usefulness in taming Prometheus metrics. Much of the content here also applies to Grafana Agent users. For reference, here’s our guide to Reducing Prometheus metrics usage with relabeling.