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

NRQL Predictions

preview

We're still working on this feature, but we'd love for you to try it out!

This feature is currently provided as part of a preview program pursuant to our pre-release policies.

Overview

NRQL Predictions in New Relic uses your metric's historical data patterns to predict 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. 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 NRQL predictions. These predictions are best utilized when added to existing dashboards to give a quick visual indicator as to where your metrics are headed.

Examples of situations where you might want to add a prediction to your chart:

  • 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 predictions indicate an impending problem, you can enroll for the Predictive Alerts feature, currently available in public preview. Predictive Alerts works alongside NRQL Predictions to generate predictions for your metrics and alert when those predictions pass a static threshold.

Pricing

Your use of NRQL Predictions is billable during preview in accordance with your Order as applicable to the pricing model associated with your Account. New Relic Query Language queries related to use of this feature are billable as the Core Compute Product. If this feature becomes generally available, your use will be billable in accordance with your Order.

For further details on pricing, please contact our sales team or refer to your Order.

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

Currently, NRQL predictions only 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 prediction tasks. We support hourly, daily, and weekly seasonal lengths for the Holt-Winters model.

In general, the default behavior should be sufficient for the majority of NRQL prediction use cases.

The PREDICT clause in a query comes with the following default behaviors:

  • Seasonality: Automatically detects whether seasonality is present in the historic data. If seasonality is detected, the identified season length is used in the Holt-Winters seasonal algorithm. If no seasonality is found, it constructs a non-seasonal model.
  • Hyperparameters: Sets the hyperparameters for the Holt-Winters algorithm based upon the seasonality and historical data.
  • Prediction window: Predicts a range equal to 20% of the total time span specified in your query window.
  • Historical data for training: Uses historical data from the current query window and the two preceding ones to generate predictions.
  • Time interval: Aligns with the data point interval of the time series in the query window to ensure consistency in data projection.

Customizing the predictive model

You can customize the predictions by manually setting the training model's hyperparameters and adding the USING and BY keywords. To learn more about NRQL and its syntax, refer to NRQL documentation. Generally, the only hyperparameter most users will want to adjust will be the seasonality. The algorithm will perform best when a known seasonality (or known non-seasonality) is specified by the user. The other hyperparameters for the Holt-Winters algorithm are accessible and changeable, but default values are determined based on the historical data for your metric.

Example query with the PREDICT clause specifying custom hyperparameters, and adding the BY and USING keywords:

FROM Transaction SELECT count(*) WHERE error IS TRUE TIMESERIES PREDICT holtwinters(seasonality: AUTO, alpha: 0.2) BY 1 hour USING 2 hours

This query sets the seasonality to automatic detection and emphasizes historical data by adjusting the level smoothing factor. It predicts one hour into the future and trains the model using the query window length along with the previous two hours of historical data. The chart displays the customized prediction as follows:

Custom prediction

one.newrelic.com > All capabilities > dashboards: customized prediction.

Copyright © 2025 New Relic Inc.

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