Skip to content

Conversation

@crespocarlos
Copy link
Contributor

@crespocarlos crespocarlos commented Dec 15, 2025

Summary

Basically what this #245224 does, but focusing only on the Infra plugin changes

has_data endpoint 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

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
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
{
  "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"
        }
      }
    }
  }
}

@crespocarlos crespocarlos force-pushed the infra-respect-observability-searchExcludedDataTier-setting branch from f4d98e4 to af997f2 Compare December 15, 2025 18:57
* 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.
*/
Copy link
Contributor Author

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

@crespocarlos crespocarlos added release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels v9.1.0 v8.19.0 v9.2.0 v9.3.0 Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation v9.1.9 labels Dec 15, 2025
@crespocarlos
Copy link
Contributor Author

/ci

@crespocarlos
Copy link
Contributor Author

@elasticmachine merge upstream

@CoenWarmer CoenWarmer requested a review from smith December 16, 2025 10:30
@crespocarlos
Copy link
Contributor Author

@elasticmachine merge upstream

@crespocarlos crespocarlos added the ci:beta-faster-pr-build Uses an alternative PR build pipeline with speed optimizations label Dec 16, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-presentation-team (Team:obs-presentation)

Copy link
Contributor

@TFCMarques TFCMarques left a 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';
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with a68f68f

Copy link
Contributor

@miloszmarcinkowski miloszmarcinkowski left a 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.

Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #127 / serverless observability UI - Cases and Rules Serverless Observability Cases Cases list row actions Severity to medium

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
logsShared 350 351 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
infra 52.3KB 52.5KB +195.0B
logsShared 90.8KB 91.0KB +219.0B
total +414.0B

History

Copy link
Member

@weltenwort weltenwort left a 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
Copy link
Member

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?

Copy link
Contributor

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);
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

@weltenwort weltenwort Dec 16, 2025

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

@crespocarlos crespocarlos Dec 16, 2025

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

@crespocarlos crespocarlos merged commit aedfb94 into elastic:main Dec 16, 2025
13 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1, 9.2

https://github.com/elastic/kibana/actions/runs/20273236068

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts
9.1 Backport failed because of merge conflicts
9.2 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 246438

Questions ?

Please refer to the Backport tool documentation

crespocarlos added a commit to crespocarlos/kibana that referenced this pull request Dec 16, 2025
…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
crespocarlos added a commit to crespocarlos/kibana that referenced this pull request Dec 16, 2025
…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
crespocarlos added a commit to crespocarlos/kibana that referenced this pull request Dec 16, 2025
…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
@crespocarlos
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
9.2
9.1
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

crespocarlos added a commit that referenced this pull request Dec 16, 2025
…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-->
crespocarlos added a commit that referenced this pull request Dec 16, 2025
…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-->
crespocarlos added a commit that referenced this pull request Dec 16, 2025
…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>
crespocarlos added a commit that referenced this pull request Dec 19, 2025
## Summary

An unnecessary `await` was added when calling the `createSearchClient`
function in #246438

This PR removes it.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 19, 2025
## Summary

An unnecessary `await` was added when calling the `createSearchClient`
function in elastic#246438

This PR removes it.

(cherry picked from commit bb942ae)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 19, 2025
## Summary

An unnecessary `await` was added when calling the `createSearchClient`
function in elastic#246438

This PR removes it.

(cherry picked from commit bb942ae)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 19, 2025
## Summary

An unnecessary `await` was added when calling the `createSearchClient`
function in elastic#246438

This PR removes it.

(cherry picked from commit bb942ae)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 19, 2025
## Summary

An unnecessary `await` was added when calling the `createSearchClient`
function in elastic#246438

This PR removes it.

(cherry picked from commit bb942ae)
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 6, 2026
## Summary

An unnecessary `await` was added when calling the `createSearchClient`
function in elastic#246438

This PR removes it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels ci:beta-faster-pr-build Uses an alternative PR build pipeline with speed optimizations release_note:skip Skip the PR/issue when compiling release notes Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation v8.19.0 v8.19.9 v9.1.0 v9.1.9 v9.2.0 v9.2.3 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants