-
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 20 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 |
---|---|---|
|
@@ -737,6 +737,44 @@ As noted in our [basic NRQL syntax doc](/docs/query-your-data/nrql-new-relic-que | |
</Callout> | ||
</Collapser> | ||
|
||
<Collapser | ||
className="freq-link" | ||
id="#sel-prediction" | ||
title={<><InlineCode>PREDICT</InlineCode> clause</>} | ||
> | ||
<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> | ||
|
||
```sql | ||
FROM NrAiIncidentDebug SELECT count(*) WHERE environment LIKE 'production' | ||
TIMESERIES 1 hour FACET event SINCE 1 day ago PREDICT | ||
... | ||
``` | ||
|
||
With the `PREDICT` clause, you can incorporate predictions regarding future data trends into line and area charts based on historical data. This clause: | ||
|
||
* Applies only to queries with a `TIMESERIES` clause. | ||
* Uses the `TIMESERIES <time period>` as the interval for predicted data points. | ||
* Sets the prediction range to 20% of the query window by default. | ||
* Processes historical data from the current query window and the two preceding ones to generate predictions by default. | ||
* Does not support [metric timeslice data](/docs/data-analysis/metrics/analyze-your-metrics/data-collection-metric-timeslice-event-data#timeslice-data) while in Public Preview. | ||
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. 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 commentThe 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. |
||
|
||
<Callout variant="important"> | ||
The `PREDICT` clause is not supported when used with the [`COMPARE WITH`](/docs/nrql/nrql-syntax-clauses-functions/#sel-compare) clause, [nested aggregations](/docs/nrql/using-nrql/nested-aggregation-make-ordered-computations-single-query) inside [subqueries](/docs/nrql/using-nrql/subqueries-in-nrql/), or JSON functions. | ||
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.
I'm unsure what "JSON functions" is referring to within the limitations here, could you expand a bit on this? |
||
</Callout> | ||
You can additionally append `BY <time range>` and `USING <time range>` to refine the prediction trend to your specific needs. | ||
To indicate the time range and historical data span, use `integer units`. | ||
|
||
```sql | ||
FORECAST BY 1 hour USING 2 days | ||
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. I believe this should be changed to |
||
``` | ||
|
||
To learn more about how and when you can use `PREDICT`, refer to [NRQL Predictions](/docs/query-your-data/explore-query-data/use-charts/nrql-predictions/). | ||
</Collapser> | ||
|
||
<Collapser | ||
className="freq-link" | ||
id="show-event-types" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ Other things the data explorer view helps you: | |
|
||
* View data from different perspectives: from raw data to various visualizations that give insights on evolution, distribution, and more. | ||
* Drill down into data using filters. | ||
* View the prediction on your data trend (available with the public preview of [NRQL Predictions](/docs/query-your-data/explore-query-data/use-charts/nrql-predictions)). | ||
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. Now that we've changed from forecast to prediction, I think "View a prediction based on your data's trend" sounds better. 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 to "View a prediction based on the trend of your data" |
||
* Add your searches to a dashboard. | ||
* Understand how NRQL works: the Data Explorer automatically generates the NRQL queries based on your selections. | ||
|
||
|
@@ -43,9 +44,13 @@ To access the Data Explorer, navigate to the bottom <DNT>**Query your data**</DN | |
|
||
### Use the data explorer [#use-data-explorer] | ||
|
||
1. **Define the Scope**: Select the data type (metric, event, or log), the account, and the entities. | ||
2. **Select the Time Range**: Use the time picker to define the time range for your query. | ||
3. **Build Your Search**: Use the blocks on the left to browse the available data and construct your search. Blocks are searchable, and you can use the actions in the action menu to create and update your query. | ||
* **Define the Scope**: Select the data type (metric, event, or log), the account, and the entities. | ||
* **Select the Time Range**: Use the time picker to define the time range for your query. | ||
* **Build Your Search**: Use the blocks on the left to browse the available data and construct your search. Blocks are searchable, and you can use the actions in the action menu to create and update your query. | ||
* **Refine your query**: Modify your query by adding filters, facets, and aggregations. | ||
* **Customize the chart visualization**: Upgrade your chart visualization from the customization options available. | ||
* **Add prediction to a line or area chart (available with the public preview of [NRQL Predictions](/docs/query-your-data/explore-query-data/use-charts/nrql-predictions))**: Use <DNT>**Predict trend**</DNT> from the **Options** menu to get a predicted trend. | ||
* **Add to dashboard**: Add your chart to a dashboard for future reference. | ||
|
||
<img | ||
title="Data explorer view" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
--- | ||
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**</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. | ||
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. 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" sounds awkward to me (and I think it's more common in non-US English) but I do see it used when I google, so I agree. |
||
|
||
<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> | ||
|
||
The <DNT>**NRQL Predictions**</DNT> feature is available only to the **[Advanced Compute](https://newrelic.com/pricing/compute#pricing_plan-compute)** customers. To enroll, navigate to <DNT>**[one.newrelic.com > Administration](https://one.newrelic.com//admin-portal) > Preview & Trails**</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. I believe this will be available to all customers during the Public Preview period. |
||
|
||
## 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 forecast range. | ||
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. Should we change |
||
|
||
The chart query populates with the `PREDICT` function. You can [refine the query](/docs/nrql/nrql-syntax-clauses-functions/#sel-prediction) according to your requirements and run it to get the updated trend. | ||
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. It is not obvious to me why "refine the query" jumps to the nrql reference section on PREDICT especially since many users will have come to this page from the nrql reference. Is there a reason not to jump down to #customize-prediction-range instead? 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. I'd also phrase this as "The |
||
|
||
</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 NrAiIncidentDebug SELECT count(*) WHERE environment LIKE 'production' | ||
TIMESERIES 1 hour FACET event SINCE 1 day ago 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 by adding the projection range and historical data span in the chart query. | ||
To get familiar with NRQL, refer to [NRQL documentation](/docs/nrql/get-started/introduction-nrql-new-relics-query-language). | ||
|
||
Use the following keywords to refine a prediction: | ||
* **`BY <time range>`**: Project the prediction up to the specified time range. | ||
* **`USING <time range>`**: Process historical data from the defined time range to project the prediction. | ||
|
||
Example: | ||
|
||
```sql | ||
FROM NrAiIncidentDebug SELECT count(*) WHERE environment LIKE 'production' | ||
TIMESERIES 1 hour FACET event SINCE 1 day ago PREDICT BY 1 day USING 30 days | ||
``` | ||
|
||
The refined prediction on the chart appears as follows: | ||
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. Nit: At this point in the section, we switch from using "customize" to "refined" to describe the process of manually setting PREDICT parameters. 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 |
||
|
||
<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>: refined forecast. | ||
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. Should this still be forecast? 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 |
||
|
||
</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.
"into line charts" (area charts are not yet supported)
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.
Done