Metric relabel configs in Promtheus not working as expected

Viewed 190

recently I'm trying to drop some metrics since prometheus usage is getting way too much than I expected.

metric_relabel_configs:
  - source_labels: [__name__]
    separator: ;
    regex: (istio_requests_total)
    replacement: $1
    action: drop

But I tried this fairly straight forward metric_relabel_configs, "istio_requests_total" doesn't drop as expected. I know you may ask why I don't drop this in relabeling.

My very first goal is to drop all the metrics with destination_service = unknown associated with istio like :

  - source_labels: [destination_service]
    separator: ;
    regex: ^unknown(.*)
    replacement: $1
    action: drop

This doens't work ,so I go back to a simple "metric" drop see if this can work. Anyways let me know if I made anything wrong and thank you all in advance !

0 Answers
Related