-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Draft for feb release]feat(On-demand forecast): Added On-demand forecasting content for PP #19667
Changes from all commits
8490a7c
2a62805
9cff6c6
2a11935
e2e2524
e170d3b
8475b8c
d7bf65c
7052c15
2d9087e
599146e
704eda1
8567304
c862e5b
bd00f65
8dc705c
d31bb84
fc95ee8
b26f661
2c375e5
1c4cd91
ddde227
a5f850c
7ddbde2
2d37d15
0c1f067
9d60d23
6522ba8
d238c90
497ae75
939a295
04f5aaa
1949d0c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
--- | ||
title: NRQL Predictions | ||
tags: | ||
- Prediction on a chart | ||
- Forecasting on a chart | ||
- NRQL Predictions | ||
- Forecasting | ||
metaDescription: 'Use NRQL Predictions to predict future trends and potential performance issues.' | ||
redirects: | ||
freshnessValidatedDate: never | ||
--- | ||
<Callout title="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](/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy). | ||
</Callout> | ||
|
||
<DNT>**NRQL Predictions**</DNT> in New Relic uses historical data 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. While <DNT>**NRQL Predictions**</DNT> itself does not identify potential issues, it equips you with the information needed to assess trends and plan for future challenges. | ||
|
||
|
||
For automatic identification of potential issues, you can enroll for the <DNT>**[Predictive Alerts](/docs/query-your-data/explore-query-data/use-charts/nrql-predictions)**</DNT> feature, currently available in public preview. <DNT>**Predictive Alerts**</DNT> work alongside <DNT>**NRQL Predictions**</DNT> to automatically trigger alerts when projected trends indicate a potential issue, allowing for proactive management of your systems. | ||
|
||
<Callout variant="tip"> | ||
New Relic currently uses the [Holt-Winters model](https://en.wikipedia.org/wiki/Exponential_smoothing#Triple_exponential_smoothing_(Holt_Winters)) for predicting, which supports hourly, daily, and weekly seasonal patterns and trends in your data. | ||
</Callout> | ||
|
||
## Pricing [#pricing] | ||
|
||
Your use of <DNT>**NRQL Predictions**</DNT> is billable during preview in accordance with your Order as applicable to the pricing model associated with your Account. New Relic Query Language queries (NRQLS) 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. | ||
|
||
## Enrollment [#enrollment] | ||
To enroll for the <DNT>**NRQL Predictions**</DNT> feature, navigate to <DNT>**[one.newrelic.com > Administration](https://one.newrelic.com//admin-portal) > Preview & Trials**</DNT>, and enable <DNT>**NRQL predictions**</DNT>. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "enroll in" or "sign up for" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "enroll for" is appropriate here. |
||
|
||
## Add prediction on a line or area chart [#add-prediction] | ||
To add prediction on a line or area chart, follow these steps: | ||
|
||
<Steps> | ||
|
||
<Step> | ||
### Access a line or area chart [#access-a-chart] | ||
|
||
1. Go to [one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities). | ||
2. To add prediction to a line or area chart, select it from <DNT>**Dashboards**</DNT>, or open it from <DNT>**Metrics and events**</DNT>. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might want to add a note somewhere that area charts are converted to line charts for PREDICT. For faceted area charts, this means the original shape will be lost. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a tip as following: |
||
</Step> | ||
|
||
<Step> | ||
### Add prediction [#add-prediction] | ||
|
||
To add prediction, from the <Icon name="fe-more-horizontal"/> menu, select <DNT>**Predict trend**</DNT>. In **Data Explorer**, the prediction trend appears on the chart, projecting future trends. The prediction range is automatically set to 20% of the query window, and highlighted in gray. The graph appears in dotted lines within the predicted range. | ||
|
||
The `PREDICT` keyword is appended to the chart query. You can [refine the query](#customize-prediction-range) according to your requirements and run it to get the updated trend. | ||
|
||
<Callout variant="tip"> | ||
When you add prediction to an area chart, the chart type changes to a line chart with prediction. | ||
</Callout> | ||
|
||
</Step> | ||
|
||
<Step> | ||
### Add to dashboard [#add-to-dashboard] | ||
|
||
1. To add the chart with prediction to a dashboard, click <DNT>**Add to dashboard**</DNT>. | ||
2. Enter a widget name. | ||
3. Select a dashboard in which you want to add the widget, or create a new dashboard for it. | ||
|
||
You can now view the chart with prediction on the selected dashboard. | ||
|
||
</Step> | ||
|
||
</Steps> | ||
|
||
## Default prediction range [#default-prediction-range] | ||
When you add a prediction to a chart, the `PREDICT` function appends to the existing chart query with the following default behaviors. | ||
* **Prediction range**: Projects 20% of the total time specified in your query window, allowing you to see a short-term projection based on current trends. | ||
* **Historical data**: Processes historical data from the current query window and the two preceding ones to generate predictions. | ||
* **Time interval**: Matches the data point interval of the prediction on the query window, ensuring consistency in data projection. | ||
|
||
Example: | ||
|
||
```sql | ||
FROM Transaction SELECT count(*) WHERE error IS TRUE TIMESERIES PREDICT | ||
``` | ||
The default prediction on the chart appears as follows: | ||
|
||
<img | ||
title="default prediction" | ||
alt="default prediction" | ||
src="/images/nrql-predictions-default.webp" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Within this image we're using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated the image. Was waiting for the env to be ready. |
||
/> | ||
|
||
<figcaption> | ||
<DNT>**[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > dashboards**</DNT>: default prediction. | ||
|
||
</figcaption> | ||
|
||
## Customize the prediction range [#customize-prediction-range] | ||
You can customize the prediction in the following ways. To get familiar with NRQL, refer to [NRQL documentation](/docs/nrql/get-started/introduction-nrql-new-relics-query-language). | ||
|
||
<CollapserGroup> | ||
<Collapser id="hyperparameters" title="Customize the query using hyperparameters and its smoothing levels"> | ||
As <DNT>**Holt-Winters**</DNT> is the only prediction model we support currently, you can fine tune the prediction model to your use case by adjusting the hyperparameters and its smoothing factors with `holtwinters`. | ||
|
||
Use the following hyperparameters to customize the prediction: | ||
|
||
* **`seasonality`**: Represents the length of the seasonal pattern in the time series. | ||
* **`seasonality: <time range>`**: Represents the seasonality of the time series for the specified time range. | ||
* **`seasonality: AUTO`**: Automatically detects the seasonality of the time series. | ||
* **`seasonality: NONE`**: Disables the seasonality of the time series. | ||
* **`alpha`**: Represents the level or average value of the time series. | ||
* **`beta`**: Represents the trend or slope of the time series, indicating upward or downward movements. | ||
* **`gamma`**: Represents the seasonal or repeated patterns of the time series. | ||
* **`phi`**: Represents the damping factor of the time series trend. | ||
|
||
You can set the smoothing factors for **`alpha`**, **`beta`**, **`gamma`**, and **`phi`**, from 0 to 1. Higher values indicate more weight on recent data, while lower values give more weight to historical data. | ||
|
||
</Collapser> | ||
<Collapser id="prediction-range" title="Customize the query by prediction range"> | ||
You can customize the query by projecting the prediction up to a specified time range. Use the `BY` keyword to project the prediction up to the specified time range. For example, `PREDICT BY 3 hours`. | ||
</Collapser> | ||
<Collapser id="historical-data-range" title="Customize the query by processing historical data for a specified time range"> | ||
You can customize the query by processing historical data from the defined time range to project the prediction. Use the `USING` keyword to process historical data. For example, `PREDICT USING 1 day`. | ||
|
||
</Collapser> | ||
</CollapserGroup> | ||
|
||
Example: | ||
|
||
```sql | ||
FROM Transaction SELECT count(*) WHERE error IS TRUE TIMESERIES PREDICT holtwinters(beta: 0.5) BY 3 hours USING 1 day | ||
``` | ||
|
||
The customized prediction on the chart appears as follows: | ||
|
||
<img | ||
title="Refined prediction" | ||
alt="Refined prediction" | ||
src="/images/nrql-predictions-refined.webp" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'll need to update the query bar in this image to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated the image. Was waiting for the env to be ready. |
||
/> | ||
|
||
<figcaption> | ||
<DNT>**[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > dashboards**</DNT>: customized prediction. | ||
|
||
</figcaption> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add somewhere that subqueries may need to be updated to include the USING timespan when using predict? Subqueries are resolved before evaluating the training window and thus need to include all information for training and visualization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @cehme . Please raise a separate PR for this. I will update the document post our today's release.