Changing your metrics scrape interval
Your 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 = $32
per 1000 active series of additional usage. You can learn more about DPM and pricing in Active Series and DPM.
Grafana Agent
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_interval
which defaults to the global setting. As a general best practice, we recommend setting the globalscrape_interval
to 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:
count_over_time(scrape_samples_scraped[1m])
To increase your scrape_interval
, open up your Agent configuration file and change scrape_interval
from 15s
to 60s
. You can learn more about configuration options on the global_config page of the Agent docs.
Prometheus
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
Intro to Prometheus and Grafana Cloud
Prometheus is taking over the monitoring world! In this webinar, we will start with a quick introduction to the open source project that’s the de facto standard for monitoring modern, cloud native systems.
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.