Get started with metric forecasts
In this guide, we will create a forecast for your Grafana Cloud metrics usage.
You can use this forecast to see if/when you are predicted to go over your limits, or if an unexpected increase in metrics occurs.
Create a forecast
- Navigate to Alerts & IRM > Machine Learning > Metric Forecasts.
- Click + Metric Forecast.
- In the Query builder choose Datasource grafanacloud-usage.
- Run the following query:
sum(grafanacloud_instance_active_series)
. - Click on the Training Model tab.
- You do not need to adjust anything here, but look at what knobs are tuneable.
- Click Create.
- Name your forecast and click Confirm.
On the Forecasts page, your forecast is ready to generate predictions when the circle turns green.
View your forecast
- Click View on the Grafana Cloud Active Series forecast.
- Change the view to an interesting time frame for your cast, by default the view is for this week.
Explore how the forecast matches your actual result, and be sure to include some days in the future to see how the model thinks your active series will evolve.
At the bottom of the screen, the UI displays your original query, as well as how you can query the forecast (
grafanacloud_active_series:predicted
) or actual(grafanacloud_active_series:actual
) data. You can use these series to create panels or alerts.
Use the forecast in a panel
From the view page:
- Click the Copy as panel button in the upper right.
- Open an existing dashboard or create a new dashboard.
- At the top of the dashboard, click Add and select Paste panel from the dropdown.
- Edit the new panel and view the generated queries.
Use the forecast in an alert
- Click the Create Alert button from either the view page or the list page.
- In the Alert evaluation behavior section, choose a folder in which to save the alert.
- Tune the alert conditions and labels, if desired.
- Click Save or Save and exit to create the alert and navigate back to the previous page.
See Grafana Alerting for more information on alerting.
Was this page helpful?
Related resources from Grafana Labs
![Getting started with the Grafana LGTM Stack](/static/assets/featured/getting-started-with-grafana-lgtm-stack-amer_featured.png?w=200 200w, /static/assets/featured/getting-started-with-grafana-lgtm-stack-amer_featured.png?w=400 400w)
![Intro to Kubernetes monitoring in Grafana Cloud](/media/webinar/Screenshot-2024-02-12-at-4.09.30-PM.png?w=200 200w, /media/webinar/Screenshot-2024-02-12-at-4.09.30-PM.png?w=400 400w)
![Building advanced Grafana dashboards](/media/webinar/AMER_buildadv_notxt.png?w=200 200w, /media/webinar/AMER_buildadv_notxt.png?w=400 400w)