Answers: <p>I haven't found any way to do that, so I created a simple CLI based on Python, which can assist with the task - make sure you don’t scrape metrics in Prometheus, which you don’t present in Grafana dashboards.</p>
  <p>frigga - <a href="https://github.com/unfor19/frigga" rel="nofollow noreferrer">https://github.com/unfor19/frigga</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2020-06-29T12:46:54.233Z
Answers: 2020-06-29T12:46:54.233Z
Answers: Meir Gabay
Body: <p>As a customer of <a href="https://grafana.com/products/cloud/" rel="nofollow noreferrer">Grafna Cloud</a>, I need to minimize the number of DataSeries that are being sent (remote_write) to Grafana Cloud, to avoid being overcharged for metrics that I don't really use.</p>
  <p>This can be done by filtering out the metrics that I don't use in my Grafana dashboards, is there a way to do that automatically? Without having to write down all the <code>metric_relabel_configs</code> rules manually?</p>
  
Tags: <monitoring><prometheus><metrics><grafana>
Title: Is there a way to make Prometheus to scrape only the metrics which are present in Grafana?
UserDisplayName: Meir Gabay
ThreadText: # Is there a way to make Prometheus to scrape only the metrics which are present in Grafana?
  
  (Asked by: username_0 on 2020-06-29)
  
  As a customer of [Grafna Cloud](https://grafana.com/products/cloud/), I need to minimize the number of DataSeries that are being sent (remote\_write) to Grafana Cloud, to avoid being overcharged for metrics that I don't really use.
  
  This can be done by filtering out the metrics that I don't use in my Grafana dashboards, is there a way to do that automatically? Without having to write down all the `metric_relabel_configs` rules manually?
  
  **Tags:** monitoring, prometheus, metrics, grafana
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-06-29. Score: 1 | Accepted answer
  
  I haven't found any way to do that, so I created a simple CLI based on Python, which can assist with the task - make sure you don’t scrape metrics in Prometheus, which you don’t present in Grafana dashboards.
  
  frigga - <https://github.com/unfor19/frigga>
  
  
  ---
  
  