Relabeling Cookbook | Relabeling Stages | Metric relabel debug
Configs:
A Time Series:
Original labels: {__address__="172.16.18.221:9100", __meta_filepath="targets/node/172.16.18.221.yml", __metrics_path__="/metrics", __scheme__="http", __scrape_interval__="10s", __scrape_timeout__="8s", cls="production-maacare", ins="production-maacare-2", ip="172.16.18.221", job="node"}
StepRelabeling RuleInput LabelsOutput labels
0
add missing instance label from __address__ label
{__address__="172.16.18.221:9100", __meta_filepath="targets/node/172.16.18.221.yml", __metrics_path__="/metrics", __scheme__="http", __scrape_interval__="10s", __scrape_timeout__="8s", cls="production-maacare", ins="production-maacare-2", ip="172.16.18.221", job="node"}
{__address__="172.16.18.221:9100", __meta_filepath="targets/node/172.16.18.221.yml", __metrics_path__="/metrics", __scheme__="http", __scrape_interval__="10s", __scrape_timeout__="8s", cls="production-maacare", ins="production-maacare-2", instance="172.16.18.221:9100", ip="172.16.18.221", job="node"}
1
remove labels with __ prefix
{__address__="172.16.18.221:9100", __meta_filepath="targets/node/172.16.18.221.yml", __metrics_path__="/metrics", __scheme__="http", __scrape_interval__="10s", __scrape_timeout__="8s", cls="production-maacare", ins="production-maacare-2", instance="172.16.18.221:9100", ip="172.16.18.221", job="node"}
{cls="production-maacare", ins="production-maacare-2", instance="172.16.18.221:9100", ip="172.16.18.221", job="node"}
Resulting labels: {cls="production-maacare", ins="production-maacare-2", instance="172.16.18.221:9100", ip="172.16.18.221", job="node"}
Target URL: http://172.16.18.221:9100/metrics (response)