-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[9.2] [Infra] Fix legacy Infra search client to respect the frozen tier setting (#246438) #246583
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
Merged
Conversation
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
…ting (elastic#246438) ## Summary Basically what this elastic#245224 does, but focusing only on the Infra plugin changes `has_data` endpoint will run this when the setting is not set ```json { "index": "remote_cluster:metrics-*,remote_cluster:metricbeat-*", "allow_no_indices": true, "terminate_after": 1, "ignore_unavailable": true, "body": { "size": 0, "query": { "bool": {} } } } ``` and this when the setting is set ```json params { "index": "remote_cluster:metrics-*,remote_cluster:metricbeat-*", "allow_no_indices": true, "terminate_after": 1, "ignore_unavailable": true, "body": { "size": 0, "query": { "bool": { "filter": [ { "bool": { "must_not": [ { "terms": { "_tier": [ "data_frozen" ] } } ] } } ] } } } } ``` Other pages are affected by this change, but are not a source for the frozen tier being hit because they don't run unbounded queries - Infra Inventory UI ```json params { "allow_no_indices": true, "ignore_unavailable": true, "index": "remote_cluster:metrics-*,remote_cluster:metricbeat-*", "body": { "size": 0, "query": { "bool": { "must": [ { "bool": { "filter": [ { "bool": { "filter": [ { "bool": { "filter": [ { "term": { "data_stream.dataset": "hostmetricsreceiver.otel" } } ] } } ] } }, { "range": { "@timestamp": { "gte": 1765824423511, "lte": 1765824723511, "format": "epoch_millis" } } }, { "exists": { "field": "host.name" } } ] } } ], "filter": [ { "bool": { "must_not": [ { "terms": { "_tier": [ "data_frozen" ] } } ] } } ] } }, "aggs": { "groupings": { "composite": { "size": 2000, "sources": [ { "groupBy0": { "terms": { "field": "host.name" } } } ] }, "aggs": { "histogram": { "date_histogram": { "field": "@timestamp", "fixed_interval": "60s", "offset": "-57511ms", "extended_bounds": { "min": 1765824423511, "max": 1765824723511 } }, "aggregations": { "cpu_idle": { "terms": { "field": "state", "include": [ "idle", "wait" ] }, "aggs": { "avg": { "avg": { "field": "system.cpu.utilization" } } } }, "cpu_idle_total": { "sum_bucket": { "buckets_path": "cpu_idle.avg" } }, "cpuV2": { "bucket_script": { "buckets_path": { "cpuIdleTotal": "cpu_idle_total" }, "script": "1 - params.cpuIdleTotal", "gap_policy": "skip" } }, "__metadata__": { "top_metrics": { "size": 1, "metrics": [ { "field": "host.name" }, { "field": "host.ip" }, { "field": "host.os.name" }, { "field": "cloud.provider" } ], "sort": { "@timestamp": "desc" } } } } }, "metricsets": { "terms": { "field": "metricset.name" } } } } } } } ``` - Metrics Explorer ```json { "allow_no_indices": true, "ignore_unavailable": true, "index": "remote_cluster:metrics-*,remote_cluster:metricbeat-*", "body": { "size": 0, "query": { "bool": { "must": [ { "bool": { "filter": [ null, { "range": { "@timestamp": { "gte": 1765821298325, "lte": 1765824898325, "format": "epoch_millis" } } } ] } } ], "filter": [ { "bool": { "must_not": [ { "terms": { "_tier": [ "data_frozen" ] } } ] } } ] } }, "aggs": { "histogram": { "date_histogram": { "field": "@timestamp", "fixed_interval": "30s", "offset": "0s", "extended_bounds": { "min": 1765821298325, "max": 1765824898325 } }, "aggregations": { "metric_0": { "avg": { "field": "system.cpu.total.norm.pct" } }, "metric_1": { "avg": { "field": "kubernetes.pod.cpu.usage.node.pct" } }, "metric_2": { "avg": { "field": "docker.cpu.total.pct" } } } }, "metricsets": { "terms": { "field": "metricset.name" } } } } } ``` --------- Co-authored-by: Nathan L Smith <nathan.smith@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Caue Marcondes <caue.marcondes@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Coen Warmer <coen.warmer@gmail.com> (cherry picked from commit aedfb94) # Conflicts: # x-pack/solutions/observability/plugins/metrics_data_access/moon.yml # x-pack/solutions/observability/plugins/metrics_data_access/tsconfig.json
cauemarcondes
approved these changes
Dec 16, 2025
Contributor
cauemarcondes
left a comment
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.
LGTM
Contributor
💚 Build Succeeded
Metrics [docs]Module Count
Page load bundle
|
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
mainto9.2:Questions ?
Please refer to the Backport tool documentation