Changing your metrics scrape interval
scrape_interval configuration is important because it determines the number of data points per minute (DPM) scraped in your active series. Depending on how you ship metrics to Grafana Cloud, you can reduce your total DPM by adjusting the
scrape_interval setting in the Grafana Agent configuration file (
agent.yaml) or your Prometheus configuration.
Note: Grafana Cloud Pro provides 1 DPM (scrape interval of 60s) resolution at a cost of 8$ per 1000 active series of additional usage. If you ship metrics at a DPM of 4 (scrape interval of 15s), your cost will be
$8 * 4 = $32per 1000 active series of additional usage. You can learn more about DPM and pricing in Active Series and DPM.
If Grafana Agent was deployed to your infrastructure prior to October 15, 2021, the
scrape_interval setting is likely set to 10-15 seconds (4-6 DPM). New installations of the Grafana Agent will default to a 60s scrape interval (1 DPM). You may increase or decrease this setting depending on your production needs.
Note: You can also set a job-specific
scrape_intervalwhich defaults to the global setting. As a general best practice, we recommend setting the global
scrape_intervalto 60s and increasing the frequency per job when a higher level of granularity is needed.
If you are not sure what your
scrape_interval is set to, use the query below in Explore to find the number of samples scraped over the last minute (DPM), split by target:
To increase your
scrape_interval , open up your Agent configuration file and change
60s. You can learn more about configuration options on the global_config page of the Agent docs.
Open up your Prometheus config and check the
scrape_interval setting. We recommend sticking with the Prometheus default of 60s (DPM of 1) and adjusting per-job scrape intervals as needed.
If you are still uncertain and want to share your config files with our engineers for review, please create a support ticket from the Grafana Cloud portal. Be sure to remove any API keys or sensitive credentials.
To learn more about controlling your Prometheus metrics usage, please see Control Prometheus metrics usage.
Related Grafana Cloud resources
How to set up and visualize synthetic monitoring at scale with Grafana Cloud
Learn how to use Kubernetes, Grafana Loki, and Grafana Cloud’s synthetic monitoring feature to set up your infrastructure's checks in this GrafanaCONline session.
Using Grafana Cloud to drive manufacturing plant efficiency
This GrafanaCONline session tells how Grafana helps a 75-year-old manufacturing company with product quality and equipment maintenance.