How to write write_relabel_configs?

224 views
Skip to first unread message

Qiheng Li

unread,
Jun 28, 2017, 11:40:02 PM6/28/17
to Prometheus Users, liqi...@huawei.com
I want to keep metrics when following two requirements are meet:

label1=value1  and label2=value2


how should I write write_relabel_configs?


thanks

Matthias Rampke

unread,
Jun 29, 2017, 3:11:10 AM6/29/17
to Qiheng Li, Prometheus Users, liqi...@huawei.com

When you specify multiple `source_labels`, they are joined with the `separator`, and you can then match the whole string.

source_labels: [ "label1", "label2" ]
separator: ";" # this is the default
regex: "value1;value2"

/MR


--
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 prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/d5745b29-45fc-4343-829b-4da2e3927789%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages