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