-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Infra] Fix legacy Infra search client to respect the frozen tier setting #246438
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
[Infra] Fix legacy Infra search client to respect the frozen tier setting #246438
Conversation
f4d98e4 to
af997f2
Compare
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ |
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.
There are duplicates of createSearchClient and the entire kibana_framework_adapter. I don't know why, this needs to be addessed separately
...bility/plugins/metrics_data_access/server/lib/adapters/framework/kibana_framework_adapter.ts
Outdated
Show resolved
Hide resolved
…ver/lib/adapters/framework/kibana_framework_adapter.ts Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
|
/ci |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
Pinging @elastic/obs-presentation-team (Team:obs-presentation) |
TFCMarques
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.
Exploration team's code changes LGTM 👍🏻
|
|
||
| import type { RequestHandlerContext } from '@kbn/core/server'; | ||
| import type { CallWithRequestParams, InfraDatabaseSearchResponse } from './adapters/framework'; | ||
| import { searchExcludedDataTiers } from '@kbn/observability-plugin/common/ui_settings_keys'; |
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.
We can't import from @kbn/observability-plugin here as it will create a circular dependency.
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.
Fixed with a68f68f
miloszmarcinkowski
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.
Code LGTM. It applies frozen data tier exclusion to api/metrics/source/default/hasData API.
Tested locally against ES cluster hitting frozen tiers by checking slowlog outputs in monitoring cluster.
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
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Page load bundle
History
|
weltenwort
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.
Logs UI code changes look ok to me. I left some nit-picky questions below, but if this is urgent they're probably good to clean up later.
| public async getResolvedLogViewStatus( | ||
| resolvedLogView: ResolvedLogView<DataView> | ||
| resolvedLogView: ResolvedLogView<DataView>, | ||
| uiSettings?: IUiSettingsClient |
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.
I appreciate this is an urgent fix. Normally I'd request to have uiSettings injected in the class's constructor like the other dependencies, but maybe we can do that as a follow-up clean-up?
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.
That is the idea @weltenwort , due to the urgency of the changes I end up doing this way.
| const { sourceId } = request.params; | ||
|
|
||
| const client = createSearchClient(requestContext, framework); | ||
| const client = await createSearchClient(requestContext, framework); |
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.
Why would we have to await this?
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.
uiSettings.client.get called internally is an async function
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.
yes, when calling the returned function, which already returned a promise before. but not during the client creation, right?
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.
I see. let me take a look
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.
but not during the client creation, right?
Exactly
|
Starting backport for target branches: 8.19, 9.1, 9.2 https://github.com/elastic/kibana/actions/runs/20273236068 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
…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
…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/platform/plugins/shared/logs_shared/public/services/log_views/log_views_client.ts # x-pack/platform/plugins/shared/logs_shared/public/services/log_views/types.ts # x-pack/solutions/observability/plugins/metrics_data_access/moon.yml # x-pack/solutions/observability/plugins/metrics_data_access/tsconfig.json
…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/platform/plugins/shared/logs_shared/public/services/log_views/log_views_client.ts # x-pack/platform/plugins/shared/logs_shared/public/services/log_views/types.ts # x-pack/solutions/observability/plugins/infra/public/utils/logs_overview_fetchers.ts # x-pack/solutions/observability/plugins/metrics_data_access/moon.yml # x-pack/solutions/observability/plugins/metrics_data_access/tsconfig.json
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…er setting (#246438) (#246583) # Backport This will backport the following commits from `main` to `9.2`: - [[Infra] Fix legacy Infra search client to respect the frozen tier setting (#246438)](#246438) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Carlos Crespo","email":"crespocarlos@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-12-16T15:25:48Z","message":"[Infra] Fix legacy Infra search client to respect the frozen tier setting (#246438)\n\n## Summary\n\nBasically what this #245224 does,\nbut focusing only on the Infra plugin changes\n\n`has_data` endpoint will run this when the setting is not set\n\n```json\n{\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {}\n }\n }\n}\n```\n\nand this when the setting is set\n\n```json\nparams {\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n }\n }\n}\n```\n\nOther pages are affected by this change, but are not a source for the\nfrozen tier being hit because they don't run unbounded queries\n\n- Infra Inventory UI\n```json\nparams {\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"term\": {\n \"data_stream.dataset\": \"hostmetricsreceiver.otel\"\n }\n }\n ]\n }\n }\n ]\n }\n },\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765824423511,\n \"lte\": 1765824723511,\n \"format\": \"epoch_millis\"\n }\n }\n },\n {\n \"exists\": {\n \"field\": \"host.name\"\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"groupings\": {\n \"composite\": {\n \"size\": 2000,\n \"sources\": [\n {\n \"groupBy0\": {\n \"terms\": {\n \"field\": \"host.name\"\n }\n }\n }\n ]\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"60s\",\n \"offset\": \"-57511ms\",\n \"extended_bounds\": {\n \"min\": 1765824423511,\n \"max\": 1765824723511\n }\n },\n \"aggregations\": {\n \"cpu_idle\": {\n \"terms\": {\n \"field\": \"state\",\n \"include\": [\n \"idle\",\n \"wait\"\n ]\n },\n \"aggs\": {\n \"avg\": {\n \"avg\": {\n \"field\": \"system.cpu.utilization\"\n }\n }\n }\n },\n \"cpu_idle_total\": {\n \"sum_bucket\": {\n \"buckets_path\": \"cpu_idle.avg\"\n }\n },\n \"cpuV2\": {\n \"bucket_script\": {\n \"buckets_path\": {\n \"cpuIdleTotal\": \"cpu_idle_total\"\n },\n \"script\": \"1 - params.cpuIdleTotal\",\n \"gap_policy\": \"skip\"\n }\n },\n \"__metadata__\": {\n \"top_metrics\": {\n \"size\": 1,\n \"metrics\": [\n {\n \"field\": \"host.name\"\n },\n {\n \"field\": \"host.ip\"\n },\n {\n \"field\": \"host.os.name\"\n },\n {\n \"field\": \"cloud.provider\"\n }\n ],\n \"sort\": {\n \"@timestamp\": \"desc\"\n }\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n }\n }\n}\n```\n- Metrics Explorer\n\n```json\n{\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n null,\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765821298325,\n \"lte\": 1765824898325,\n \"format\": \"epoch_millis\"\n }\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"30s\",\n \"offset\": \"0s\",\n \"extended_bounds\": {\n \"min\": 1765821298325,\n \"max\": 1765824898325\n }\n },\n \"aggregations\": {\n \"metric_0\": {\n \"avg\": {\n \"field\": \"system.cpu.total.norm.pct\"\n }\n },\n \"metric_1\": {\n \"avg\": {\n \"field\": \"kubernetes.pod.cpu.usage.node.pct\"\n }\n },\n \"metric_2\": {\n \"avg\": {\n \"field\": \"docker.cpu.total.pct\"\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n}\n```\n\n---------\n\nCo-authored-by: Nathan L Smith <nathan.smith@elastic.co>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Caue Marcondes <caue.marcondes@elastic.co>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\nCo-authored-by: Coen Warmer <coen.warmer@gmail.com>","sha":"aedfb94b2118c1e925e5678c585ab2093b04ed12","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.1.0","v8.19.0","v9.2.0","v9.3.0","ci:beta-faster-pr-build","Team:obs-presentation","v9.1.9"],"title":"[Infra] Fix legacy Infra search client to respect the frozen tier setting","number":246438,"url":"https://github.com/elastic/kibana/pull/246438","mergeCommit":{"message":"[Infra] Fix legacy Infra search client to respect the frozen tier setting (#246438)\n\n## Summary\n\nBasically what this #245224 does,\nbut focusing only on the Infra plugin changes\n\n`has_data` endpoint will run this when the setting is not set\n\n```json\n{\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {}\n }\n }\n}\n```\n\nand this when the setting is set\n\n```json\nparams {\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n }\n }\n}\n```\n\nOther pages are affected by this change, but are not a source for the\nfrozen tier being hit because they don't run unbounded queries\n\n- Infra Inventory UI\n```json\nparams {\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"term\": {\n \"data_stream.dataset\": \"hostmetricsreceiver.otel\"\n }\n }\n ]\n }\n }\n ]\n }\n },\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765824423511,\n \"lte\": 1765824723511,\n \"format\": \"epoch_millis\"\n }\n }\n },\n {\n \"exists\": {\n \"field\": \"host.name\"\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"groupings\": {\n \"composite\": {\n \"size\": 2000,\n \"sources\": [\n {\n \"groupBy0\": {\n \"terms\": {\n \"field\": \"host.name\"\n }\n }\n }\n ]\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"60s\",\n \"offset\": \"-57511ms\",\n \"extended_bounds\": {\n \"min\": 1765824423511,\n \"max\": 1765824723511\n }\n },\n \"aggregations\": {\n \"cpu_idle\": {\n \"terms\": {\n \"field\": \"state\",\n \"include\": [\n \"idle\",\n \"wait\"\n ]\n },\n \"aggs\": {\n \"avg\": {\n \"avg\": {\n \"field\": \"system.cpu.utilization\"\n }\n }\n }\n },\n \"cpu_idle_total\": {\n \"sum_bucket\": {\n \"buckets_path\": \"cpu_idle.avg\"\n }\n },\n \"cpuV2\": {\n \"bucket_script\": {\n \"buckets_path\": {\n \"cpuIdleTotal\": \"cpu_idle_total\"\n },\n \"script\": \"1 - params.cpuIdleTotal\",\n \"gap_policy\": \"skip\"\n }\n },\n \"__metadata__\": {\n \"top_metrics\": {\n \"size\": 1,\n \"metrics\": [\n {\n \"field\": \"host.name\"\n },\n {\n \"field\": \"host.ip\"\n },\n {\n \"field\": \"host.os.name\"\n },\n {\n \"field\": \"cloud.provider\"\n }\n ],\n \"sort\": {\n \"@timestamp\": \"desc\"\n }\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n }\n }\n}\n```\n- Metrics Explorer\n\n```json\n{\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n null,\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765821298325,\n \"lte\": 1765824898325,\n \"format\": \"epoch_millis\"\n }\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"30s\",\n \"offset\": \"0s\",\n \"extended_bounds\": {\n \"min\": 1765821298325,\n \"max\": 1765824898325\n }\n },\n \"aggregations\": {\n \"metric_0\": {\n \"avg\": {\n \"field\": \"system.cpu.total.norm.pct\"\n }\n },\n \"metric_1\": {\n \"avg\": {\n \"field\": \"kubernetes.pod.cpu.usage.node.pct\"\n }\n },\n \"metric_2\": {\n \"avg\": {\n \"field\": \"docker.cpu.total.pct\"\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n}\n```\n\n---------\n\nCo-authored-by: Nathan L Smith <nathan.smith@elastic.co>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Caue Marcondes <caue.marcondes@elastic.co>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\nCo-authored-by: Coen Warmer <coen.warmer@gmail.com>","sha":"aedfb94b2118c1e925e5678c585ab2093b04ed12"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19","9.2"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/246438","number":246438,"mergeCommit":{"message":"[Infra] Fix legacy Infra search client to respect the frozen tier setting (#246438)\n\n## Summary\n\nBasically what this #245224 does,\nbut focusing only on the Infra plugin changes\n\n`has_data` endpoint will run this when the setting is not set\n\n```json\n{\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {}\n }\n }\n}\n```\n\nand this when the setting is set\n\n```json\nparams {\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n }\n }\n}\n```\n\nOther pages are affected by this change, but are not a source for the\nfrozen tier being hit because they don't run unbounded queries\n\n- Infra Inventory UI\n```json\nparams {\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"term\": {\n \"data_stream.dataset\": \"hostmetricsreceiver.otel\"\n }\n }\n ]\n }\n }\n ]\n }\n },\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765824423511,\n \"lte\": 1765824723511,\n \"format\": \"epoch_millis\"\n }\n }\n },\n {\n \"exists\": {\n \"field\": \"host.name\"\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"groupings\": {\n \"composite\": {\n \"size\": 2000,\n \"sources\": [\n {\n \"groupBy0\": {\n \"terms\": {\n \"field\": \"host.name\"\n }\n }\n }\n ]\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"60s\",\n \"offset\": \"-57511ms\",\n \"extended_bounds\": {\n \"min\": 1765824423511,\n \"max\": 1765824723511\n }\n },\n \"aggregations\": {\n \"cpu_idle\": {\n \"terms\": {\n \"field\": \"state\",\n \"include\": [\n \"idle\",\n \"wait\"\n ]\n },\n \"aggs\": {\n \"avg\": {\n \"avg\": {\n \"field\": \"system.cpu.utilization\"\n }\n }\n }\n },\n \"cpu_idle_total\": {\n \"sum_bucket\": {\n \"buckets_path\": \"cpu_idle.avg\"\n }\n },\n \"cpuV2\": {\n \"bucket_script\": {\n \"buckets_path\": {\n \"cpuIdleTotal\": \"cpu_idle_total\"\n },\n \"script\": \"1 - params.cpuIdleTotal\",\n \"gap_policy\": \"skip\"\n }\n },\n \"__metadata__\": {\n \"top_metrics\": {\n \"size\": 1,\n \"metrics\": [\n {\n \"field\": \"host.name\"\n },\n {\n \"field\": \"host.ip\"\n },\n {\n \"field\": \"host.os.name\"\n },\n {\n \"field\": \"cloud.provider\"\n }\n ],\n \"sort\": {\n \"@timestamp\": \"desc\"\n }\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n }\n }\n}\n```\n- Metrics Explorer\n\n```json\n{\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n null,\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765821298325,\n \"lte\": 1765824898325,\n \"format\": \"epoch_millis\"\n }\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"30s\",\n \"offset\": \"0s\",\n \"extended_bounds\": {\n \"min\": 1765821298325,\n \"max\": 1765824898325\n }\n },\n \"aggregations\": {\n \"metric_0\": {\n \"avg\": {\n \"field\": \"system.cpu.total.norm.pct\"\n }\n },\n \"metric_1\": {\n \"avg\": {\n \"field\": \"kubernetes.pod.cpu.usage.node.pct\"\n }\n },\n \"metric_2\": {\n \"avg\": {\n \"field\": \"docker.cpu.total.pct\"\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n}\n```\n\n---------\n\nCo-authored-by: Nathan L Smith <nathan.smith@elastic.co>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Caue Marcondes <caue.marcondes@elastic.co>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\nCo-authored-by: Coen Warmer <coen.warmer@gmail.com>","sha":"aedfb94b2118c1e925e5678c585ab2093b04ed12"}}]}] BACKPORT-->
…ier setting (#246438) (#246590) # Backport This will backport the following commits from `main` to `8.19`: - [[Infra] Fix legacy Infra search client to respect the frozen tier setting (#246438)](#246438) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Carlos Crespo","email":"crespocarlos@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-12-16T15:25:48Z","message":"[Infra] Fix legacy Infra search client to respect the frozen tier setting (#246438)\n\n## Summary\n\nBasically what this #245224 does,\nbut focusing only on the Infra plugin changes\n\n`has_data` endpoint will run this when the setting is not set\n\n```json\n{\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {}\n }\n }\n}\n```\n\nand this when the setting is set\n\n```json\nparams {\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n }\n }\n}\n```\n\nOther pages are affected by this change, but are not a source for the\nfrozen tier being hit because they don't run unbounded queries\n\n- Infra Inventory UI\n```json\nparams {\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"term\": {\n \"data_stream.dataset\": \"hostmetricsreceiver.otel\"\n }\n }\n ]\n }\n }\n ]\n }\n },\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765824423511,\n \"lte\": 1765824723511,\n \"format\": \"epoch_millis\"\n }\n }\n },\n {\n \"exists\": {\n \"field\": \"host.name\"\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"groupings\": {\n \"composite\": {\n \"size\": 2000,\n \"sources\": [\n {\n \"groupBy0\": {\n \"terms\": {\n \"field\": \"host.name\"\n }\n }\n }\n ]\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"60s\",\n \"offset\": \"-57511ms\",\n \"extended_bounds\": {\n \"min\": 1765824423511,\n \"max\": 1765824723511\n }\n },\n \"aggregations\": {\n \"cpu_idle\": {\n \"terms\": {\n \"field\": \"state\",\n \"include\": [\n \"idle\",\n \"wait\"\n ]\n },\n \"aggs\": {\n \"avg\": {\n \"avg\": {\n \"field\": \"system.cpu.utilization\"\n }\n }\n }\n },\n \"cpu_idle_total\": {\n \"sum_bucket\": {\n \"buckets_path\": \"cpu_idle.avg\"\n }\n },\n \"cpuV2\": {\n \"bucket_script\": {\n \"buckets_path\": {\n \"cpuIdleTotal\": \"cpu_idle_total\"\n },\n \"script\": \"1 - params.cpuIdleTotal\",\n \"gap_policy\": \"skip\"\n }\n },\n \"__metadata__\": {\n \"top_metrics\": {\n \"size\": 1,\n \"metrics\": [\n {\n \"field\": \"host.name\"\n },\n {\n \"field\": \"host.ip\"\n },\n {\n \"field\": \"host.os.name\"\n },\n {\n \"field\": \"cloud.provider\"\n }\n ],\n \"sort\": {\n \"@timestamp\": \"desc\"\n }\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n }\n }\n}\n```\n- Metrics Explorer\n\n```json\n{\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n null,\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765821298325,\n \"lte\": 1765824898325,\n \"format\": \"epoch_millis\"\n }\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"30s\",\n \"offset\": \"0s\",\n \"extended_bounds\": {\n \"min\": 1765821298325,\n \"max\": 1765824898325\n }\n },\n \"aggregations\": {\n \"metric_0\": {\n \"avg\": {\n \"field\": \"system.cpu.total.norm.pct\"\n }\n },\n \"metric_1\": {\n \"avg\": {\n \"field\": \"kubernetes.pod.cpu.usage.node.pct\"\n }\n },\n \"metric_2\": {\n \"avg\": {\n \"field\": \"docker.cpu.total.pct\"\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n}\n```\n\n---------\n\nCo-authored-by: Nathan L Smith <nathan.smith@elastic.co>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Caue Marcondes <caue.marcondes@elastic.co>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\nCo-authored-by: Coen Warmer <coen.warmer@gmail.com>","sha":"aedfb94b2118c1e925e5678c585ab2093b04ed12","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.1.0","v8.19.0","v9.2.0","v9.3.0","ci:beta-faster-pr-build","Team:obs-presentation","v9.1.9"],"title":"[Infra] Fix legacy Infra search client to respect the frozen tier setting","number":246438,"url":"https://github.com/elastic/kibana/pull/246438","mergeCommit":{"message":"[Infra] Fix legacy Infra search client to respect the frozen tier setting (#246438)\n\n## Summary\n\nBasically what this #245224 does,\nbut focusing only on the Infra plugin changes\n\n`has_data` endpoint will run this when the setting is not set\n\n```json\n{\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {}\n }\n }\n}\n```\n\nand this when the setting is set\n\n```json\nparams {\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n }\n }\n}\n```\n\nOther pages are affected by this change, but are not a source for the\nfrozen tier being hit because they don't run unbounded queries\n\n- Infra Inventory UI\n```json\nparams {\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"term\": {\n \"data_stream.dataset\": \"hostmetricsreceiver.otel\"\n }\n }\n ]\n }\n }\n ]\n }\n },\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765824423511,\n \"lte\": 1765824723511,\n \"format\": \"epoch_millis\"\n }\n }\n },\n {\n \"exists\": {\n \"field\": \"host.name\"\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"groupings\": {\n \"composite\": {\n \"size\": 2000,\n \"sources\": [\n {\n \"groupBy0\": {\n \"terms\": {\n \"field\": \"host.name\"\n }\n }\n }\n ]\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"60s\",\n \"offset\": \"-57511ms\",\n \"extended_bounds\": {\n \"min\": 1765824423511,\n \"max\": 1765824723511\n }\n },\n \"aggregations\": {\n \"cpu_idle\": {\n \"terms\": {\n \"field\": \"state\",\n \"include\": [\n \"idle\",\n \"wait\"\n ]\n },\n \"aggs\": {\n \"avg\": {\n \"avg\": {\n \"field\": \"system.cpu.utilization\"\n }\n }\n }\n },\n \"cpu_idle_total\": {\n \"sum_bucket\": {\n \"buckets_path\": \"cpu_idle.avg\"\n }\n },\n \"cpuV2\": {\n \"bucket_script\": {\n \"buckets_path\": {\n \"cpuIdleTotal\": \"cpu_idle_total\"\n },\n \"script\": \"1 - params.cpuIdleTotal\",\n \"gap_policy\": \"skip\"\n }\n },\n \"__metadata__\": {\n \"top_metrics\": {\n \"size\": 1,\n \"metrics\": [\n {\n \"field\": \"host.name\"\n },\n {\n \"field\": \"host.ip\"\n },\n {\n \"field\": \"host.os.name\"\n },\n {\n \"field\": \"cloud.provider\"\n }\n ],\n \"sort\": {\n \"@timestamp\": \"desc\"\n }\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n }\n }\n}\n```\n- Metrics Explorer\n\n```json\n{\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n null,\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765821298325,\n \"lte\": 1765824898325,\n \"format\": \"epoch_millis\"\n }\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"30s\",\n \"offset\": \"0s\",\n \"extended_bounds\": {\n \"min\": 1765821298325,\n \"max\": 1765824898325\n }\n },\n \"aggregations\": {\n \"metric_0\": {\n \"avg\": {\n \"field\": \"system.cpu.total.norm.pct\"\n }\n },\n \"metric_1\": {\n \"avg\": {\n \"field\": \"kubernetes.pod.cpu.usage.node.pct\"\n }\n },\n \"metric_2\": {\n \"avg\": {\n \"field\": \"docker.cpu.total.pct\"\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n}\n```\n\n---------\n\nCo-authored-by: Nathan L Smith <nathan.smith@elastic.co>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Caue Marcondes <caue.marcondes@elastic.co>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\nCo-authored-by: Coen Warmer <coen.warmer@gmail.com>","sha":"aedfb94b2118c1e925e5678c585ab2093b04ed12"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19","9.2"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/246438","number":246438,"mergeCommit":{"message":"[Infra] Fix legacy Infra search client to respect the frozen tier setting (#246438)\n\n## Summary\n\nBasically what this #245224 does,\nbut focusing only on the Infra plugin changes\n\n`has_data` endpoint will run this when the setting is not set\n\n```json\n{\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {}\n }\n }\n}\n```\n\nand this when the setting is set\n\n```json\nparams {\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n }\n }\n}\n```\n\nOther pages are affected by this change, but are not a source for the\nfrozen tier being hit because they don't run unbounded queries\n\n- Infra Inventory UI\n```json\nparams {\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"term\": {\n \"data_stream.dataset\": \"hostmetricsreceiver.otel\"\n }\n }\n ]\n }\n }\n ]\n }\n },\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765824423511,\n \"lte\": 1765824723511,\n \"format\": \"epoch_millis\"\n }\n }\n },\n {\n \"exists\": {\n \"field\": \"host.name\"\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"groupings\": {\n \"composite\": {\n \"size\": 2000,\n \"sources\": [\n {\n \"groupBy0\": {\n \"terms\": {\n \"field\": \"host.name\"\n }\n }\n }\n ]\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"60s\",\n \"offset\": \"-57511ms\",\n \"extended_bounds\": {\n \"min\": 1765824423511,\n \"max\": 1765824723511\n }\n },\n \"aggregations\": {\n \"cpu_idle\": {\n \"terms\": {\n \"field\": \"state\",\n \"include\": [\n \"idle\",\n \"wait\"\n ]\n },\n \"aggs\": {\n \"avg\": {\n \"avg\": {\n \"field\": \"system.cpu.utilization\"\n }\n }\n }\n },\n \"cpu_idle_total\": {\n \"sum_bucket\": {\n \"buckets_path\": \"cpu_idle.avg\"\n }\n },\n \"cpuV2\": {\n \"bucket_script\": {\n \"buckets_path\": {\n \"cpuIdleTotal\": \"cpu_idle_total\"\n },\n \"script\": \"1 - params.cpuIdleTotal\",\n \"gap_policy\": \"skip\"\n }\n },\n \"__metadata__\": {\n \"top_metrics\": {\n \"size\": 1,\n \"metrics\": [\n {\n \"field\": \"host.name\"\n },\n {\n \"field\": \"host.ip\"\n },\n {\n \"field\": \"host.os.name\"\n },\n {\n \"field\": \"cloud.provider\"\n }\n ],\n \"sort\": {\n \"@timestamp\": \"desc\"\n }\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n }\n }\n}\n```\n- Metrics Explorer\n\n```json\n{\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n null,\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765821298325,\n \"lte\": 1765824898325,\n \"format\": \"epoch_millis\"\n }\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"30s\",\n \"offset\": \"0s\",\n \"extended_bounds\": {\n \"min\": 1765821298325,\n \"max\": 1765824898325\n }\n },\n \"aggregations\": {\n \"metric_0\": {\n \"avg\": {\n \"field\": \"system.cpu.total.norm.pct\"\n }\n },\n \"metric_1\": {\n \"avg\": {\n \"field\": \"kubernetes.pod.cpu.usage.node.pct\"\n }\n },\n \"metric_2\": {\n \"avg\": {\n \"field\": \"docker.cpu.total.pct\"\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n}\n```\n\n---------\n\nCo-authored-by: Nathan L Smith <nathan.smith@elastic.co>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Caue Marcondes <caue.marcondes@elastic.co>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\nCo-authored-by: Coen Warmer <coen.warmer@gmail.com>","sha":"aedfb94b2118c1e925e5678c585ab2093b04ed12"}}]}] BACKPORT-->
…er setting (#246438) (#246585) # Backport This will backport the following commits from `main` to `9.1`: - [[Infra] Fix legacy Infra search client to respect the frozen tier setting (#246438)](#246438) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Carlos Crespo","email":"crespocarlos@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-12-16T15:25:48Z","message":"[Infra] Fix legacy Infra search client to respect the frozen tier setting (#246438)\n\n## Summary\n\nBasically what this #245224 does,\nbut focusing only on the Infra plugin changes\n\n`has_data` endpoint will run this when the setting is not set\n\n```json\n{\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {}\n }\n }\n}\n```\n\nand this when the setting is set\n\n```json\nparams {\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n }\n }\n}\n```\n\nOther pages are affected by this change, but are not a source for the\nfrozen tier being hit because they don't run unbounded queries\n\n- Infra Inventory UI\n```json\nparams {\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"term\": {\n \"data_stream.dataset\": \"hostmetricsreceiver.otel\"\n }\n }\n ]\n }\n }\n ]\n }\n },\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765824423511,\n \"lte\": 1765824723511,\n \"format\": \"epoch_millis\"\n }\n }\n },\n {\n \"exists\": {\n \"field\": \"host.name\"\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"groupings\": {\n \"composite\": {\n \"size\": 2000,\n \"sources\": [\n {\n \"groupBy0\": {\n \"terms\": {\n \"field\": \"host.name\"\n }\n }\n }\n ]\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"60s\",\n \"offset\": \"-57511ms\",\n \"extended_bounds\": {\n \"min\": 1765824423511,\n \"max\": 1765824723511\n }\n },\n \"aggregations\": {\n \"cpu_idle\": {\n \"terms\": {\n \"field\": \"state\",\n \"include\": [\n \"idle\",\n \"wait\"\n ]\n },\n \"aggs\": {\n \"avg\": {\n \"avg\": {\n \"field\": \"system.cpu.utilization\"\n }\n }\n }\n },\n \"cpu_idle_total\": {\n \"sum_bucket\": {\n \"buckets_path\": \"cpu_idle.avg\"\n }\n },\n \"cpuV2\": {\n \"bucket_script\": {\n \"buckets_path\": {\n \"cpuIdleTotal\": \"cpu_idle_total\"\n },\n \"script\": \"1 - params.cpuIdleTotal\",\n \"gap_policy\": \"skip\"\n }\n },\n \"__metadata__\": {\n \"top_metrics\": {\n \"size\": 1,\n \"metrics\": [\n {\n \"field\": \"host.name\"\n },\n {\n \"field\": \"host.ip\"\n },\n {\n \"field\": \"host.os.name\"\n },\n {\n \"field\": \"cloud.provider\"\n }\n ],\n \"sort\": {\n \"@timestamp\": \"desc\"\n }\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n }\n }\n}\n```\n- Metrics Explorer\n\n```json\n{\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n null,\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765821298325,\n \"lte\": 1765824898325,\n \"format\": \"epoch_millis\"\n }\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"30s\",\n \"offset\": \"0s\",\n \"extended_bounds\": {\n \"min\": 1765821298325,\n \"max\": 1765824898325\n }\n },\n \"aggregations\": {\n \"metric_0\": {\n \"avg\": {\n \"field\": \"system.cpu.total.norm.pct\"\n }\n },\n \"metric_1\": {\n \"avg\": {\n \"field\": \"kubernetes.pod.cpu.usage.node.pct\"\n }\n },\n \"metric_2\": {\n \"avg\": {\n \"field\": \"docker.cpu.total.pct\"\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n}\n```\n\n---------\n\nCo-authored-by: Nathan L Smith <nathan.smith@elastic.co>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Caue Marcondes <caue.marcondes@elastic.co>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\nCo-authored-by: Coen Warmer <coen.warmer@gmail.com>","sha":"aedfb94b2118c1e925e5678c585ab2093b04ed12","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.1.0","v8.19.0","v9.2.0","v9.3.0","ci:beta-faster-pr-build","Team:obs-presentation","v9.1.9"],"title":"[Infra] Fix legacy Infra search client to respect the frozen tier setting","number":246438,"url":"https://github.com/elastic/kibana/pull/246438","mergeCommit":{"message":"[Infra] Fix legacy Infra search client to respect the frozen tier setting (#246438)\n\n## Summary\n\nBasically what this #245224 does,\nbut focusing only on the Infra plugin changes\n\n`has_data` endpoint will run this when the setting is not set\n\n```json\n{\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {}\n }\n }\n}\n```\n\nand this when the setting is set\n\n```json\nparams {\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n }\n }\n}\n```\n\nOther pages are affected by this change, but are not a source for the\nfrozen tier being hit because they don't run unbounded queries\n\n- Infra Inventory UI\n```json\nparams {\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"term\": {\n \"data_stream.dataset\": \"hostmetricsreceiver.otel\"\n }\n }\n ]\n }\n }\n ]\n }\n },\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765824423511,\n \"lte\": 1765824723511,\n \"format\": \"epoch_millis\"\n }\n }\n },\n {\n \"exists\": {\n \"field\": \"host.name\"\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"groupings\": {\n \"composite\": {\n \"size\": 2000,\n \"sources\": [\n {\n \"groupBy0\": {\n \"terms\": {\n \"field\": \"host.name\"\n }\n }\n }\n ]\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"60s\",\n \"offset\": \"-57511ms\",\n \"extended_bounds\": {\n \"min\": 1765824423511,\n \"max\": 1765824723511\n }\n },\n \"aggregations\": {\n \"cpu_idle\": {\n \"terms\": {\n \"field\": \"state\",\n \"include\": [\n \"idle\",\n \"wait\"\n ]\n },\n \"aggs\": {\n \"avg\": {\n \"avg\": {\n \"field\": \"system.cpu.utilization\"\n }\n }\n }\n },\n \"cpu_idle_total\": {\n \"sum_bucket\": {\n \"buckets_path\": \"cpu_idle.avg\"\n }\n },\n \"cpuV2\": {\n \"bucket_script\": {\n \"buckets_path\": {\n \"cpuIdleTotal\": \"cpu_idle_total\"\n },\n \"script\": \"1 - params.cpuIdleTotal\",\n \"gap_policy\": \"skip\"\n }\n },\n \"__metadata__\": {\n \"top_metrics\": {\n \"size\": 1,\n \"metrics\": [\n {\n \"field\": \"host.name\"\n },\n {\n \"field\": \"host.ip\"\n },\n {\n \"field\": \"host.os.name\"\n },\n {\n \"field\": \"cloud.provider\"\n }\n ],\n \"sort\": {\n \"@timestamp\": \"desc\"\n }\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n }\n }\n}\n```\n- Metrics Explorer\n\n```json\n{\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n null,\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765821298325,\n \"lte\": 1765824898325,\n \"format\": \"epoch_millis\"\n }\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"30s\",\n \"offset\": \"0s\",\n \"extended_bounds\": {\n \"min\": 1765821298325,\n \"max\": 1765824898325\n }\n },\n \"aggregations\": {\n \"metric_0\": {\n \"avg\": {\n \"field\": \"system.cpu.total.norm.pct\"\n }\n },\n \"metric_1\": {\n \"avg\": {\n \"field\": \"kubernetes.pod.cpu.usage.node.pct\"\n }\n },\n \"metric_2\": {\n \"avg\": {\n \"field\": \"docker.cpu.total.pct\"\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n}\n```\n\n---------\n\nCo-authored-by: Nathan L Smith <nathan.smith@elastic.co>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Caue Marcondes <caue.marcondes@elastic.co>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\nCo-authored-by: Coen Warmer <coen.warmer@gmail.com>","sha":"aedfb94b2118c1e925e5678c585ab2093b04ed12"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19","9.2"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/246438","number":246438,"mergeCommit":{"message":"[Infra] Fix legacy Infra search client to respect the frozen tier setting (#246438)\n\n## Summary\n\nBasically what this #245224 does,\nbut focusing only on the Infra plugin changes\n\n`has_data` endpoint will run this when the setting is not set\n\n```json\n{\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {}\n }\n }\n}\n```\n\nand this when the setting is set\n\n```json\nparams {\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"allow_no_indices\": true,\n \"terminate_after\": 1,\n \"ignore_unavailable\": true,\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n }\n }\n}\n```\n\nOther pages are affected by this change, but are not a source for the\nfrozen tier being hit because they don't run unbounded queries\n\n- Infra Inventory UI\n```json\nparams {\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"bool\": {\n \"filter\": [\n {\n \"term\": {\n \"data_stream.dataset\": \"hostmetricsreceiver.otel\"\n }\n }\n ]\n }\n }\n ]\n }\n },\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765824423511,\n \"lte\": 1765824723511,\n \"format\": \"epoch_millis\"\n }\n }\n },\n {\n \"exists\": {\n \"field\": \"host.name\"\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"groupings\": {\n \"composite\": {\n \"size\": 2000,\n \"sources\": [\n {\n \"groupBy0\": {\n \"terms\": {\n \"field\": \"host.name\"\n }\n }\n }\n ]\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"60s\",\n \"offset\": \"-57511ms\",\n \"extended_bounds\": {\n \"min\": 1765824423511,\n \"max\": 1765824723511\n }\n },\n \"aggregations\": {\n \"cpu_idle\": {\n \"terms\": {\n \"field\": \"state\",\n \"include\": [\n \"idle\",\n \"wait\"\n ]\n },\n \"aggs\": {\n \"avg\": {\n \"avg\": {\n \"field\": \"system.cpu.utilization\"\n }\n }\n }\n },\n \"cpu_idle_total\": {\n \"sum_bucket\": {\n \"buckets_path\": \"cpu_idle.avg\"\n }\n },\n \"cpuV2\": {\n \"bucket_script\": {\n \"buckets_path\": {\n \"cpuIdleTotal\": \"cpu_idle_total\"\n },\n \"script\": \"1 - params.cpuIdleTotal\",\n \"gap_policy\": \"skip\"\n }\n },\n \"__metadata__\": {\n \"top_metrics\": {\n \"size\": 1,\n \"metrics\": [\n {\n \"field\": \"host.name\"\n },\n {\n \"field\": \"host.ip\"\n },\n {\n \"field\": \"host.os.name\"\n },\n {\n \"field\": \"cloud.provider\"\n }\n ],\n \"sort\": {\n \"@timestamp\": \"desc\"\n }\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n }\n }\n}\n```\n- Metrics Explorer\n\n```json\n{\n \"allow_no_indices\": true,\n \"ignore_unavailable\": true,\n \"index\": \"remote_cluster:metrics-*,remote_cluster:metricbeat-*\",\n \"body\": {\n \"size\": 0,\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"bool\": {\n \"filter\": [\n null,\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": 1765821298325,\n \"lte\": 1765824898325,\n \"format\": \"epoch_millis\"\n }\n }\n }\n ]\n }\n }\n ],\n \"filter\": [\n {\n \"bool\": {\n \"must_not\": [\n {\n \"terms\": {\n \"_tier\": [\n \"data_frozen\"\n ]\n }\n }\n ]\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"histogram\": {\n \"date_histogram\": {\n \"field\": \"@timestamp\",\n \"fixed_interval\": \"30s\",\n \"offset\": \"0s\",\n \"extended_bounds\": {\n \"min\": 1765821298325,\n \"max\": 1765824898325\n }\n },\n \"aggregations\": {\n \"metric_0\": {\n \"avg\": {\n \"field\": \"system.cpu.total.norm.pct\"\n }\n },\n \"metric_1\": {\n \"avg\": {\n \"field\": \"kubernetes.pod.cpu.usage.node.pct\"\n }\n },\n \"metric_2\": {\n \"avg\": {\n \"field\": \"docker.cpu.total.pct\"\n }\n }\n }\n },\n \"metricsets\": {\n \"terms\": {\n \"field\": \"metricset.name\"\n }\n }\n }\n }\n}\n```\n\n---------\n\nCo-authored-by: Nathan L Smith <nathan.smith@elastic.co>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Caue Marcondes <caue.marcondes@elastic.co>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\nCo-authored-by: Coen Warmer <coen.warmer@gmail.com>","sha":"aedfb94b2118c1e925e5678c585ab2093b04ed12"}}]}] BACKPORT--> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
## Summary An unnecessary `await` was added when calling the `createSearchClient` function in #246438 This PR removes it.
## Summary An unnecessary `await` was added when calling the `createSearchClient` function in elastic#246438 This PR removes it. (cherry picked from commit bb942ae)
## Summary An unnecessary `await` was added when calling the `createSearchClient` function in elastic#246438 This PR removes it. (cherry picked from commit bb942ae)
## Summary An unnecessary `await` was added when calling the `createSearchClient` function in elastic#246438 This PR removes it. (cherry picked from commit bb942ae)
## Summary An unnecessary `await` was added when calling the `createSearchClient` function in elastic#246438 This PR removes it. (cherry picked from commit bb942ae)
## Summary An unnecessary `await` was added when calling the `createSearchClient` function in elastic#246438 This PR removes it.
Summary
Basically what this #245224 does, but focusing only on the Infra plugin changes
has_dataendpoint will run this when the setting is not set{ "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
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
{ "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" } } } } }