Hi,Is there any way to specify the ignore-case flag when defining the regex used in relabeling_config or metric_relabeling_config?
My scenario is that I am receiving the same value for a Consul tag (but with different letter case) from two different agents. I am extracting and adding the Consul tag as a label to the scraped metrics. As I try to match the label name inside the consul tag, the case sensitive regex skips part of the metrics. Currently, I have solved this using two separate set of relabel_configs (once for each case).However, I wanted to check if there is a more elegant/simpler way to handle case-insensitive label matching.
--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/179c33d0-0ee9-4994-a6d4-7691e74a82f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sorry, that syntax was wrong. It should be(?i:(Match))
On Tue, Jun 27, 2017 at 9:25 AM, Ben Kochie <sup...@gmail.com> wrote:
The regexp matching in Prometheus is based on RE2[0]I think you can set flags within a match by using (?i(matchstring))
On Tue, Jun 27, 2017 at 8:57 AM, <sujit....@gmail.com> wrote:
Hi,Is there any way to specify the ignore-case flag when defining the regex used in relabeling_config or metric_relabeling_config?My scenario is that I am receiving the same value for a Consul tag (but with different letter case) from two different agents. I am extracting and adding the Consul tag as a label to the scraped metrics. As I try to match the label name inside the consul tag, the case sensitive regex skips part of the metrics. Currently, I have solved this using two separate set of relabel_configs (once for each case).However, I wanted to check if there is a more elegant/simpler way to handle case-insensitive label matching.Thanks,Sujit.
--
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.