• /
  • EnglishEspañolFrançais日本語한국어Português
  • Inicia sesiónComenzar ahora

NRQL predictions

Overview

NRQL predictions in New Relic uses your time series' historical data patterns to predict or forecast future trends, providing insights into how metrics might behave in the future. This proactive approach helps you visualize trends and anticipate potential issues, enabling timely interventions to maintain optimal system performance. Predictions for your signal are generated by fitting a machine learning model to your historical data and using that model to predict into the future. This feature currently supports predictions for both seasonal (data that has a recurring, repeatable pattern on a set cadence) and non-seasonal time series. Metrics that exhibit a strong trend or defined seasonal pattern are best suited for predictions. These predictions are best utilized when added to existing dashboards to give a quick visual indicator as to where your metrics are headed.

Importante

NRQL predictions are only compatible with time series queries. For more details about writing time series queries, refer to the NRQL syntax documentation on the TIMESERIES clause.

NRQL Predictions

Predictions made using NRQL predictions (PREDICT clause) for a time series. In this example, forecasts are generated for one day into the future, based on the BY keyword. The model producing these predictions is trained on a total of 17 days of data: 3 days from the query window plus 2 weeks (14 days) from the USING keyword. Note that the chart does not display all the training data.

Examples of situations where you might want to add predictions to your chart or dashboard:

  • Your application is producing more logs over the past few hours and the disk space is running out.
  • Your application is steadily running out of memory, threatening to crash the entire container.
  • You need to project future revenue based upon observed seasonal and trend patterns.

While NRQL predictions themselves do not identify potential issues, they equip you with the information you need to assess trends and plan for future challenges. To generate alerts when the predicted values indicate an impending problem, you can use the Predictive Alerts feature. Predictive Alerts work alongside NRQL predictions to generate predictions for your metrics and alert when those predicted values pass a static threshold.

Pricing

The NRQL predictions is an Advanced Compute Product feature offered as an add-on or as a part of the Compute pricing model. Advanced CCUs are consumed when NRQL queries are executed for this feature.

Usage

NRQL predictions can be generated in two ways: either directly on charts you have already created or by writing a NRQL query using the PREDICT clause.

Default behavior

Importante

The usage of the default PREDICT clause provides the best prediction results.

The PREDICT clause in a query comes with the following default behaviors which are dependent upon your query window duration (specified using the SINCE and UNTIL clauses):

Default behavior

Seasonality

Automatically detects whether seasonality is present in the historic data. If seasonality is detected, the identified season length is used to generate a seasonal model, otherwise a non-seasonal model is used. We currently support seasonal lengths of hourly, daily, and weekly. For more details on seasonality, refer to the algorithm section.

Algorithm hyperparameters

Hyperparameters are automatically optimized and selected based on the historical data.

Amount of historical data for training

Uses historical data from the last three query windows (the current one and the two preceding it). For example, if your query window is one hour in length, a total of three hours will be used for training. The chart displays only the data from the current query window, not the entire training data.

  • If you want to only display a certain length of time in the query window but use more data for training, you can use the USING clause.
  • If a seasonality other than the default is specified, the amount of training data used will be different. For more details, refer to the seasonal section.

Prediction window

Predicts a range equal to 20% of the total time span specified in your query window. For example, if your query window is one hour, the predictions will be for the next 12 minutes. You can override this default with the BY clause.

Customizing the predictions with BY, USING and SLIDE BY

You can customize the predictions by manually setting the model's seasonality and adding the BY, USING and SLIDE BY keywords.

Algorithm

Currently, NRQL predictions supports the Holt-Winters algorithm, also known as exponential smoothing, for both seasonal and non-seasonal time series. This is a commonly used and standard algorithm for forecasting and time series predictions.

Non-seasonal

For non-seasonal time series, only the level (average value) and trend (average increase or decrease) are modeled. Non-seasonal predictions are linear, so a flat line with or without a trend is expected.

Non-seasonal predictions

Predictions generated using NRQL predictions for a non-seasonal time series.

Seasonal

For seasonal time series, the seasonal pattern is included in addition to the level and the trend. Seasonality represents a repeatable pattern that occurs on some periodic basis. We support automatic season detection of hourly, daily, and weekly seasonal lengths by default for the Holt-Winters model. In order to detect each seasonal length, you must ensure that you are providing enough data through a combination of the query window duration (specified using the SINCE and UNTIL clauses) and the USING clause. The minimum amount of data required for each seasonal length is specified below. By default, when no USING clause is used, NRQL predictions will use three times the query window to generate predictions.

Detectable seasonalities

Description

Minimum amount of required data

Hourly

Each timestamp within the hour behaves the same as in the previous hours. For example, 3:20pm will behave just like 2:20pm, 1:20pm, etc..

2 hours

Daily

Each hour behaves the same as the previous day's hours. For example, 3pm today will behave the same as 3pm yesterday.

2 days

Weekly

Each day of the week will behave the same as it did in the previous weeks. For example, Monday this week will behave the same as Monday in previous weeks.

2 weeks

You can specify custom seasonal lengths using the seasonality parameter.

Weekly seasonal predictions

Predictions generated using NRQL predictions for a time series with weekly seasonality.

Advanced usage

Copyright © 2025 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.