Drop unsed metrics

13 views
Skip to first unread message

anwer shahith

unread,
Sep 3, 2024, 2:11:12 AM9/3/24
to Prometheus Users
Hi Team, 
I have find unsed metrics from my promethues i want to drop them 
I tried various relabel_configs configs but looks like non of them are working

eg: 


metric_relabel_configs:

        - source_labels: [__name__]

          regex: container_processes

          action: drop


please help me to fix this

Brian Candler

unread,
Sep 3, 2024, 4:21:53 AM9/3/24
to Prometheus Users
That looks OK to me. I think it should drop all metrics with name "container_processes".

Can you show a wider context of the entire scrape job config? metric_relabel_configs is configured under a specific scrape job. and only applies to metrics collected by that scrape job.

There are simple things to check, like did you send prometheus a HUP or reload signal after changing the config? And if you check prometheus output (typically "journalctl -eu prometheus") did it say the reload was successful, with no syntax errors in the new config?

Are you deploying prometheus via some higher-level wrapper, like a helm chart? If so, the issue is likely somewhere around that.
Reply all
Reply to author
Forward
0 new messages