> But I want to just drop metrics for node_systemd_unit_state that have the
label 'name' match some specific patterns. name=~"*(pattern1|pattern2)*"
metric_relabel_configs:
- source_labels: [ __name__, name]
regex: 'node_systemd_unit_state;.*(pattern1|pattern2).*'
action: drop
Giving multiple source_labels concatenates the given labels, using a
semicolon separator by default, and then the regex matches against the
whole result.
(Aside: job name is mandatory, but it gets added to the metrics as the
'job' label, so it's worth giving it a meaningful name rather than "dummy")
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/797878b3-7978-45e9-a93b-989d33682883n%40googlegroups.com.