Since the "up" metric is somewhat of a special case, does a metric_relabel_configs rule still apply to it? If not, is there a way to relabel those? We attach a special label for items in certain namespaces, and I'd like to tag the up metric with the same label, but it does not seem to currently take.
For my job scraping kubernetes pods, I have
metric_relabel_configs:
- source_labels: [namespace]
separator: ;
regex: (.+)(-test$)
target_label: foo
replacement: ${1}
action: replace
If I look at a list of metrics, I see the up metric does have the namespace label on it, but does not get the new foo label. Other metrics scraped by the same job do, but the automatic prometheus metrics (i.e. up, scrape_duration_seconds, etc.) do not seem to get the needed label.
up{app="testfoo",component="test",instance="
100.106.221.99:3000",job="kubernetes-pods",kubernetes_pod_name="testfoo-625644656d-pasp2",namespace="important-test",pod_template_hash="625458653a",release="testfoo"}
Is there a way to force this label on these as well?