Skip to content

[9.1] [Telemetry] Move indices metadata out of security solution (#212875)#231939

Merged
kibanamachine merged 1 commit intoelastic:9.1from
kibanamachine:backport/9.1/pr-212875
Aug 15, 2025
Merged

[9.1] [Telemetry] Move indices metadata out of security solution (#212875)#231939
kibanamachine merged 1 commit intoelastic:9.1from
kibanamachine:backport/9.1/pr-212875

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.1:

Questions ?

Please refer to the Backport tool documentation

…12875)

## Summary

This PR introduces a new plugin to relocate the [indices metadata
telemetry feature](elastic#194004) out of
the `security_solution` plugin, making it available across all cluster
setups, not just security clusters.

### Key Changes

- **Plugin Location:**  `x-pack/platform/plugins/private`.
- **Scheduled Task:** Core logic runs as a periodic Kibana task
(currently runs frequently for testing; intended to run daily) to
collect indices and ILM information.
- **EBT:** Collected data is published as EBT documents. Defined events
include:
  * `DATA_STREAM_EVENT`
  * `INDEX_STATS_EVENTS`
  * `ILM_STATS_EVENTS`
  * `ILM_POLICY_EVENTS`
    See `server/lib/ebt/events.ts` for details.
- **Internal Configuration Schema:** Allows tuning query behavior:
  ```ts
  export const IndicesMetadataConfigurationSchema = schema.object({
    indices_threshold: schema.number(),
    datastreams_threshold: schema.number(),
    index_query_size: schema.number(),
    ilm_stats_query_size: schema.number(),
    ilm_policy_query_size: schema.number(),
  });
  ```
Default values are zero, meaning no queries run unless explicitly
configured.
- **Remote Configuration via CDN:** Implements the same manifest
mechanism used by `security_solution`:
* A signed config manifest (zip with `manifest.json` + `manifest.sig`)
is downloaded via CDN.
  * An `rxjs` timer polls for updates.
  * Once verified, new config values are applied dynamically.
- **Plugin-Level Settings:** Supports configuring the CDN URL and public
key to verify signatures:
  ```ts
  const pluginConfigSchema = schema.object({
    cdnUrl: schema.maybe(schema.string()),
    publicKey: schema.maybe(schema.string()),
  });
  ```

As a reference, below are stats for the last 90 days for the current
implementation inside `security-solution`

| event_type | max_doc_size_bytes | avg_doc_size_bytes |

|--------------------------------|--------------------|--------------------------|
| telemetry_index_settings_event | 2,235,887 | 25,286.12 |
| telemetry_ilm_policy_event | 577,148 | 3,390.25 |
| telemetry_ilm_stats_event | 2,731,533 | 19,607.14 |
| telemetry_index_templates_event| 5,788,583 | 36,688.70 |
| telemetry_index_stats_event | 3,829,341 | 55,705.83 |
| telemetry_data_stream_event | 6,885,418 | 17,581.92 |

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 92acdae)
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Preview links for changed docs

@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

cc @szaffarano

@kibanamachine kibanamachine merged commit 5d4fa82 into elastic:9.1 Aug 15, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants