-
Notifications
You must be signed in to change notification settings - Fork 575
Add forecasting section #10133
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
base: main
Are you sure you want to change the base?
Add forecasting section #10133
Conversation
Signed-off-by: Kaituo Li <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged. Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer. When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review. |
@kaituo: I couldn't add my edits to your original PR. Can you take a look at this updated PR before I pass this to editorial? |
Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Thanks @Naarcha-AWS. I'll aim to review tomorrow (6/25). |
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.
@Naarcha-AWS Editorial review complete. Please see my comments and changes. Thanks!
|
||
You can specify a custom index for forecast results instead of using the default result index. If the custom index does not already exist, it will be created automatically when you create a forecaster and start a real-time analysis or test run. | ||
|
||
If the custom index already exists, the Forecasting plugin checks that the index mapping matches the expected forecast result structure. To ensure compatibility, the index must conform to the schema defined in the [`forecast-results.json`](https://github.com/opensearch-project/anomaly-detection/blob/main/src/main/resources/mappings/forecast-results.json) file. |
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.
If the custom index already exists, the Forecasting plugin checks that the index mapping matches the expected forecast result structure. To ensure compatibility, the index must conform to the schema defined in the [`forecast-results.json`](https://github.com/opensearch-project/anomaly-detection/blob/main/src/main/resources/mappings/forecast-results.json) file. | |
If the custom index already exists, the Forecasting API checks that the index mapping matches the expected forecast result structure. To ensure compatibility, the index must conform to the schema defined in the [`forecast-results.json`](https://github.com/opensearch-project/anomaly-detection/blob/main/src/main/resources/mappings/forecast-results.json) file. |
|
||
If the custom index already exists, the Forecasting plugin checks that the index mapping matches the expected forecast result structure. To ensure compatibility, the index must conform to the schema defined in the [`forecast-results.json`](https://github.com/opensearch-project/anomaly-detection/blob/main/src/main/resources/mappings/forecast-results.json) file. | ||
|
||
When a user creates a forecaster—either in OpenSearch Dashboards or by calling the Forecasting API—the system verifies that the user has the following index-level permissions on the custom index: |
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.
When a user creates a forecaster—either in OpenSearch Dashboards or by calling the Forecasting API—the system verifies that the user has the following index-level permissions on the custom index: | |
When a user creates a forecaster—either in OpenSearch Dashboards or by calling the Forecasting API—the system verifies that the user has the following index-level permissions for the custom index: |
|
||
- `indices:admin/create` – Required to create and roll over the custom result index. | ||
- `indices:admin/aliases` – Required to create and manage the index alias. | ||
- `indices:data/write/index` – Required to write forecast results into the index (single-stream forecasters). |
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.
- `indices:data/write/index` – Required to write forecast results into the index (single-stream forecasters). | |
- `indices:data/write/index` – Required to write forecast results to the index (single-stream forecasters). |
|
||
## Next step | ||
|
||
For additional guidance on Transport Layer Security (TLS), authentication backends, tenant isolation, and audit logging, refer to the [Security plugin documentation]({{site.url}}{{site.baseurl}}/security/). |
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.
For additional guidance on Transport Layer Security (TLS), authentication backends, tenant isolation, and audit logging, refer to the [Security plugin documentation]({{site.url}}{{site.baseurl}}/security/). | |
For more information about TLS, authentication backends, tenant isolation, and audit logging, see the [Security plugin documentation]({{site.url}}{{site.baseurl}}/security/). |
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.
@Naarcha-AWS Editorial review complete. Please see my comments and changes. Thanks!
_observing-your-data/forecast/api.md
Outdated
|
||
### Example request: Built-in query with distance under a threshold | ||
|
||
The following request returns the top entities whose forecast values fall farthest under a specified threshold, based on the `DISTANCE_TO_THRESHOLD_VALUE` metric: |
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.
The following request returns the top entities whose forecast values fall farthest under a specified threshold, based on the `DISTANCE_TO_THRESHOLD_VALUE` metric: | |
The following request returns the top entities whose forecast values fall farthest from a specified threshold, based on the `DISTANCE_TO_THRESHOLD_VALUE` metric: |
_observing-your-data/forecast/api.md
Outdated
The `DISTANCE_TO_THRESHOLD_VALUE` metric calculates `forecast_value – threshold`. Because `relation_to_threshold` is `LESS_THAN`, the API returns negative distances only and sorts them in ascending order (most negative first). Each bucket includes the following values: | ||
|
||
- `doc_count`: The number of forecast points that matched. | ||
- `DISTANCE_TO_THRESHOLD_VALUE`: The worst (most negative) distance within the forecast horizon. |
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.
- `DISTANCE_TO_THRESHOLD_VALUE`: The worst (most negative) distance within the forecast horizon. | |
- `DISTANCE_TO_THRESHOLD_VALUE`: The largest distance within the forecast horizon from the threshold value. |
_observing-your-data/forecast/api.md
Outdated
**Introduced 3.1** | ||
{: .label .label-purple } | ||
|
||
Returns execution-time state such as initialization progress, per-entity model metadata, and errors. This API is useful for inspecting forecaster internals during runtime. |
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.
Returns execution-time state such as initialization progress, per-entity model metadata, and errors. This API is useful for inspecting forecaster internals during runtime. | |
Returns execution-time state such as initialization progress, per-entity model metadata, and errors. This API is useful for inspecting forecaster intervals during runtime. |
``` | ||
|
||
|
||
4. Under **Timestamp field**, select the field that stores event time. |
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.
4. Under **Timestamp field**, select the field that stores event time. | |
4. Under **Timestamp field**, select the field that stores the timestamps. |
|----------|-------------|------|------|---------|----------| | ||
| `result_index_min_size` | The minimum total primary shard size before rollover. | Integer | MB | `51200` (50 GB) | No | | ||
| `result_index_min_age` | The minimum index age to trigger rollover. | Integer | Days | `7` | No | | ||
| `result_index_ttl` | The minimum age before deletion. | Integer | Days | `60` | No | |
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.
| `result_index_ttl` | The minimum age before deletion. | Integer | Days | `60` | No | | |
| `result_index_ttl` | The minimum amount of time before rolled-over indexes are deleted | Integer | Days | `60` | No | |
Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Naarcha-AWS <[email protected]>
|
||
To isolate results for another team, such as `human-resources`, create a separate role (for example, `forecast_human_resources_result_access`) and update the term value to match the appropriate backend role. | ||
|
||
### Define data-source read access |
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.
### Define data-source read access | |
### Define `data-source` read access |
Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
@Naarcha-AWS Just this one comment outstanding, and then we can merge. |
Signed-off-by: Naarcha-AWS <[email protected]>
Description
Update #10123 with writer edits.
Issues Resolved
Closes #10069
Version
List the OpenSearch version to which this PR applies, e.g. 2.14, 2.12--2.14, or all.
Frontend features
If you're submitting documentation for an OpenSearch Dashboards feature, add a video that shows how a user will interact with the UI step by step. A voiceover is optional.
Checklist
For more information on following Developer Certificate of Origin and signing off your commits, please check here.