[8.19] Expose frozen indices information on the rule health endpoint (#219703)#220540
Merged
[8.19] Expose frozen indices information on the rule health endpoint (#219703)#220540
Conversation
## Summary This is a follow up PR to expose the metric `frozen_indices_queried_max_count` on the rule healthcheck endpoint. This metric is an aggregation of the metric `frozen_indices_queried_count` which is calculated upon rule execution. Refer to [this PR](#218435) to see more details about it. ## How to test this? - Run Elastic locally with these additional parameters in order to enable the frozen data tier: -E path.repo="/tmp" -E xpack.searchable.snapshot.shared_cache.size=20GB. - Use [this tutorial](https://docs.elastic.dev/security-soution/analyst-experience-team/eng-prod/how-to/configure-local-frozen-tier) to create the snapshot repository and an ILM policy. You can disable rollover for the ILM policy and configure indices to be moved to frozen after 0 days. - Create an index manually and populate it with a couple of documents. - Assign the ILM policy to the index you created in the previous step and wait for it to be rolled to frozen. You can run this command to speed up the process: ``` PUT /_cluster/settings { "persistent": { "indices.lifecycle.poll_interval": "10s" } } ``` You can confirm that the index is indeed in frozen by calling ``` GET <YOUR_IDX_HERE>/_ilm/explain ``` `phase` should be `frozen` and `step` should be `complete`. - Create a rule querying the frozen index. - Call the rule health endpoint with: ``` curl -X POST --user elastic:changeme "http://localhost:5601/internal/detection_engine/health/_rule?date_start=2025-04-29T09:07:39.489Z&date_end=2025-05-01T09:08:39.489Z" \ -H "Content-Type: application/json" \ -H "elastic-api-version: 1" \ -H 'kbn-xsrf: 123' \ -H "x-elastic-internal-origin: Kibana" \ --data '{"rule_id":"2f9780b5-7819-4685-ab8e-d817d3701d10"}' ``` You should see `frozen_indices_queried_max_count` populated with `1`. (cherry picked from commit 0544125) # Conflicts: # x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/rule_monitoring/detection_engine_health/health_endpoints.md # x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/event_log/aggregations/types.ts
8014431 to
c7ac789
Compare
Contributor
💚 Build Succeeded
Metrics [docs]
History
|
dhurley14
approved these changes
May 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto8.19:Questions ?
Please refer to the Backport tool documentation