Re: [prometheus-users] Drop metrics based on label values

2020-05-16 Thread Matthias Rampke
The "drop" relabeling action does this. Specify the name of the label under "labels" and the match the value under "regex". For your case, labels: ['env'] regex: stg action: drop should do. You can also go the other way and use labels: ['env'] regex: prod action: keep /MR On Mon, May 11, 2020,

[prometheus-users] Drop metrics based on label values

2020-05-11 Thread piyush sharma
Hello , I want to achieve one thing . I have a label env which has 2 values prod and stage I want that if env = prod , then metrics should be collected and if env = stg metrics should be dropped. Is there any way I can achieve this ? I see the example below but it drops metrics based on t