Skip to content

[Telemetry] Move indices metadata out of security solution#212875

Merged
szaffarano merged 53 commits intomainfrom
szaffarano/indices-metadata-poc
Aug 15, 2025
Merged

[Telemetry] Move indices metadata out of security solution#212875
szaffarano merged 53 commits intomainfrom
szaffarano/indices-metadata-poc

Conversation

@szaffarano
Copy link
Copy Markdown
Contributor

@szaffarano szaffarano commented Mar 3, 2025

Summary

This PR introduces a new plugin to relocate the indices metadata telemetry feature 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:
    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:
    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

POC to make the indices metadata telemetry feature available for observability
@szaffarano szaffarano changed the title Move indices metadata out of security solution [Telemetry] Move indices metadata out of security solution Mar 3, 2025
@szaffarano szaffarano self-assigned this Mar 3, 2025
@szaffarano szaffarano added Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. ci:project-deploy-observability Create an Observability project labels Mar 3, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2025

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@szaffarano
Copy link
Copy Markdown
Contributor Author

/oblt-deploy

@szaffarano
Copy link
Copy Markdown
Contributor Author

/oblt-deploy

@szaffarano
Copy link
Copy Markdown
Contributor Author

/ci

@szaffarano
Copy link
Copy Markdown
Contributor Author

/ci

@szaffarano
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@graphaelli
Copy link
Copy Markdown
Member

@szaffarano what can we do to get this moving again?

@szaffarano
Copy link
Copy Markdown
Contributor Author

Hi @graphaelli
I'm on vacation until next week.
CC @donaherc

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 4, 2025

🔍 Preview links for changed docs

@szaffarano
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@szaffarano
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@szaffarano szaffarano enabled auto-merge (squash) August 15, 2025 11:31
@szaffarano szaffarano disabled auto-merge August 15, 2025 11:31
@szaffarano szaffarano enabled auto-merge (squash) August 15, 2025 11:31
@szaffarano szaffarano added backport:current-major and removed backport:skip This PR does not require backporting labels Aug 15, 2025
@szaffarano szaffarano merged commit 92acdae into main Aug 15, 2025
16 checks passed
@szaffarano szaffarano deleted the szaffarano/indices-metadata-poc branch August 15, 2025 12:08
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.0, 9.1

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

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled in files

id before after diff
indicesMetadata - 1 +1

ESLint disabled line counts

id before after diff
indicesMetadata - 23 +23

Total ESLint disabled count

id before after diff
indicesMetadata - 24 +24

History

cc @szaffarano

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Aug 15, 2025
…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)
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 Some backports could not be created

Status Branch Result
9.0 Backport failed because of merge conflicts
9.1

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 212875

Questions ?

Please refer to the Backport tool documentation

szaffarano added a commit to szaffarano/kibana that referenced this pull request Aug 15, 2025
…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)

# Conflicts:
#	.github/CODEOWNERS
#	package.json
#	tsconfig.base.json
#	yarn.lock
@szaffarano
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
9.0

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

Questions ?

Please refer to the Backport tool documentation

@graphaelli
Copy link
Copy Markdown
Member

thanks! 🚀 🚀 🚀

kibanamachine added a commit that referenced this pull request Aug 15, 2025
…2875) (#231939)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Telemetry] Move indices metadata out of security solution
(#212875)](#212875)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Sebastián
Zaffarano","email":"sebastian.zaffarano@elastic.co"},"sourceCommit":{"committedDate":"2025-08-15T12:08:22Z","message":"[Telemetry]
Move indices metadata out of security solution (#212875)\n\n##
Summary\n\nThis PR introduces a new plugin to relocate the [indices
metadata\ntelemetry
feature](#194004) out of\nthe
`security_solution` plugin, making it available across all
cluster\nsetups, not just security clusters.\n\n### Key Changes\n\n-
**Plugin Location:** `x-pack/platform/plugins/private`.\n- **Scheduled
Task:** Core logic runs as a periodic Kibana task\n(currently runs
frequently for testing; intended to run daily) to\ncollect indices and
ILM information.\n- **EBT:** Collected data is published as EBT
documents. Defined events\ninclude:\n * `DATA_STREAM_EVENT`\n *
`INDEX_STATS_EVENTS`\n * `ILM_STATS_EVENTS`\n * `ILM_POLICY_EVENTS`\n
See `server/lib/ebt/events.ts` for details.\n- **Internal Configuration
Schema:** Allows tuning query behavior:\n ```ts\n export const
IndicesMetadataConfigurationSchema = schema.object({\n
indices_threshold: schema.number(),\n datastreams_threshold:
schema.number(),\n index_query_size: schema.number(),\n
ilm_stats_query_size: schema.number(),\n ilm_policy_query_size:
schema.number(),\n });\n ```\nDefault values are zero, meaning no
queries run unless explicitly\nconfigured.\n- **Remote Configuration via
CDN:** Implements the same manifest\nmechanism used by
`security_solution`:\n* A signed config manifest (zip with
`manifest.json` + `manifest.sig`)\nis downloaded via CDN.\n * An `rxjs`
timer polls for updates.\n * Once verified, new config values are
applied dynamically.\n- **Plugin-Level Settings:** Supports configuring
the CDN URL and public\nkey to verify signatures:\n ```ts\n const
pluginConfigSchema = schema.object({\n cdnUrl:
schema.maybe(schema.string()),\n publicKey:
schema.maybe(schema.string()),\n });\n ```\n\nAs a reference, below are
stats for the last 90 days for the current\nimplementation inside
`security-solution`\n\n| event_type | max_doc_size_bytes |
avg_doc_size_bytes
|\n\n|--------------------------------|--------------------|--------------------------|\n|
telemetry_index_settings_event | 2,235,887 | 25,286.12 |\n|
telemetry_ilm_policy_event | 577,148 | 3,390.25 |\n|
telemetry_ilm_stats_event | 2,731,533 | 19,607.14 |\n|
telemetry_index_templates_event| 5,788,583 | 36,688.70 |\n|
telemetry_index_stats_event | 3,829,341 | 55,705.83 |\n|
telemetry_data_stream_event | 6,885,418 | 17,581.92
|\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"92acdae34279a8c96b856a742fe440f0f81dae2b","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:
SecuritySolution","backport:current-major","v9.2.0"],"title":"[Telemetry]
Move indices metadata out of security
solution","number":212875,"url":"https://github.com/elastic/kibana/pull/212875","mergeCommit":{"message":"[Telemetry]
Move indices metadata out of security solution (#212875)\n\n##
Summary\n\nThis PR introduces a new plugin to relocate the [indices
metadata\ntelemetry
feature](#194004) out of\nthe
`security_solution` plugin, making it available across all
cluster\nsetups, not just security clusters.\n\n### Key Changes\n\n-
**Plugin Location:** `x-pack/platform/plugins/private`.\n- **Scheduled
Task:** Core logic runs as a periodic Kibana task\n(currently runs
frequently for testing; intended to run daily) to\ncollect indices and
ILM information.\n- **EBT:** Collected data is published as EBT
documents. Defined events\ninclude:\n * `DATA_STREAM_EVENT`\n *
`INDEX_STATS_EVENTS`\n * `ILM_STATS_EVENTS`\n * `ILM_POLICY_EVENTS`\n
See `server/lib/ebt/events.ts` for details.\n- **Internal Configuration
Schema:** Allows tuning query behavior:\n ```ts\n export const
IndicesMetadataConfigurationSchema = schema.object({\n
indices_threshold: schema.number(),\n datastreams_threshold:
schema.number(),\n index_query_size: schema.number(),\n
ilm_stats_query_size: schema.number(),\n ilm_policy_query_size:
schema.number(),\n });\n ```\nDefault values are zero, meaning no
queries run unless explicitly\nconfigured.\n- **Remote Configuration via
CDN:** Implements the same manifest\nmechanism used by
`security_solution`:\n* A signed config manifest (zip with
`manifest.json` + `manifest.sig`)\nis downloaded via CDN.\n * An `rxjs`
timer polls for updates.\n * Once verified, new config values are
applied dynamically.\n- **Plugin-Level Settings:** Supports configuring
the CDN URL and public\nkey to verify signatures:\n ```ts\n const
pluginConfigSchema = schema.object({\n cdnUrl:
schema.maybe(schema.string()),\n publicKey:
schema.maybe(schema.string()),\n });\n ```\n\nAs a reference, below are
stats for the last 90 days for the current\nimplementation inside
`security-solution`\n\n| event_type | max_doc_size_bytes |
avg_doc_size_bytes
|\n\n|--------------------------------|--------------------|--------------------------|\n|
telemetry_index_settings_event | 2,235,887 | 25,286.12 |\n|
telemetry_ilm_policy_event | 577,148 | 3,390.25 |\n|
telemetry_ilm_stats_event | 2,731,533 | 19,607.14 |\n|
telemetry_index_templates_event| 5,788,583 | 36,688.70 |\n|
telemetry_index_stats_event | 3,829,341 | 55,705.83 |\n|
telemetry_data_stream_event | 6,885,418 | 17,581.92
|\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"92acdae34279a8c96b856a742fe440f0f81dae2b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212875","number":212875,"mergeCommit":{"message":"[Telemetry]
Move indices metadata out of security solution (#212875)\n\n##
Summary\n\nThis PR introduces a new plugin to relocate the [indices
metadata\ntelemetry
feature](#194004) out of\nthe
`security_solution` plugin, making it available across all
cluster\nsetups, not just security clusters.\n\n### Key Changes\n\n-
**Plugin Location:** `x-pack/platform/plugins/private`.\n- **Scheduled
Task:** Core logic runs as a periodic Kibana task\n(currently runs
frequently for testing; intended to run daily) to\ncollect indices and
ILM information.\n- **EBT:** Collected data is published as EBT
documents. Defined events\ninclude:\n * `DATA_STREAM_EVENT`\n *
`INDEX_STATS_EVENTS`\n * `ILM_STATS_EVENTS`\n * `ILM_POLICY_EVENTS`\n
See `server/lib/ebt/events.ts` for details.\n- **Internal Configuration
Schema:** Allows tuning query behavior:\n ```ts\n export const
IndicesMetadataConfigurationSchema = schema.object({\n
indices_threshold: schema.number(),\n datastreams_threshold:
schema.number(),\n index_query_size: schema.number(),\n
ilm_stats_query_size: schema.number(),\n ilm_policy_query_size:
schema.number(),\n });\n ```\nDefault values are zero, meaning no
queries run unless explicitly\nconfigured.\n- **Remote Configuration via
CDN:** Implements the same manifest\nmechanism used by
`security_solution`:\n* A signed config manifest (zip with
`manifest.json` + `manifest.sig`)\nis downloaded via CDN.\n * An `rxjs`
timer polls for updates.\n * Once verified, new config values are
applied dynamically.\n- **Plugin-Level Settings:** Supports configuring
the CDN URL and public\nkey to verify signatures:\n ```ts\n const
pluginConfigSchema = schema.object({\n cdnUrl:
schema.maybe(schema.string()),\n publicKey:
schema.maybe(schema.string()),\n });\n ```\n\nAs a reference, below are
stats for the last 90 days for the current\nimplementation inside
`security-solution`\n\n| event_type | max_doc_size_bytes |
avg_doc_size_bytes
|\n\n|--------------------------------|--------------------|--------------------------|\n|
telemetry_index_settings_event | 2,235,887 | 25,286.12 |\n|
telemetry_ilm_policy_event | 577,148 | 3,390.25 |\n|
telemetry_ilm_stats_event | 2,731,533 | 19,607.14 |\n|
telemetry_index_templates_event| 5,788,583 | 36,688.70 |\n|
telemetry_index_stats_event | 3,829,341 | 55,705.83 |\n|
telemetry_data_stream_event | 6,885,418 | 17,581.92
|\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"92acdae34279a8c96b856a742fe440f0f81dae2b"}}]}]
BACKPORT-->

Co-authored-by: Sebastián Zaffarano <sebastian.zaffarano@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
szaffarano added a commit that referenced this pull request Aug 15, 2025
…2875) (#231941)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Telemetry] Move indices metadata out of security solution
(#212875)](#212875)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Sebastián
Zaffarano","email":"sebastian.zaffarano@elastic.co"},"sourceCommit":{"committedDate":"2025-08-15T12:08:22Z","message":"[Telemetry]
Move indices metadata out of security solution (#212875)\n\n##
Summary\n\nThis PR introduces a new plugin to relocate the [indices
metadata\ntelemetry
feature](#194004) out of\nthe
`security_solution` plugin, making it available across all
cluster\nsetups, not just security clusters.\n\n### Key Changes\n\n-
**Plugin Location:** `x-pack/platform/plugins/private`.\n- **Scheduled
Task:** Core logic runs as a periodic Kibana task\n(currently runs
frequently for testing; intended to run daily) to\ncollect indices and
ILM information.\n- **EBT:** Collected data is published as EBT
documents. Defined events\ninclude:\n * `DATA_STREAM_EVENT`\n *
`INDEX_STATS_EVENTS`\n * `ILM_STATS_EVENTS`\n * `ILM_POLICY_EVENTS`\n
See `server/lib/ebt/events.ts` for details.\n- **Internal Configuration
Schema:** Allows tuning query behavior:\n ```ts\n export const
IndicesMetadataConfigurationSchema = schema.object({\n
indices_threshold: schema.number(),\n datastreams_threshold:
schema.number(),\n index_query_size: schema.number(),\n
ilm_stats_query_size: schema.number(),\n ilm_policy_query_size:
schema.number(),\n });\n ```\nDefault values are zero, meaning no
queries run unless explicitly\nconfigured.\n- **Remote Configuration via
CDN:** Implements the same manifest\nmechanism used by
`security_solution`:\n* A signed config manifest (zip with
`manifest.json` + `manifest.sig`)\nis downloaded via CDN.\n * An `rxjs`
timer polls for updates.\n * Once verified, new config values are
applied dynamically.\n- **Plugin-Level Settings:** Supports configuring
the CDN URL and public\nkey to verify signatures:\n ```ts\n const
pluginConfigSchema = schema.object({\n cdnUrl:
schema.maybe(schema.string()),\n publicKey:
schema.maybe(schema.string()),\n });\n ```\n\nAs a reference, below are
stats for the last 90 days for the current\nimplementation inside
`security-solution`\n\n| event_type | max_doc_size_bytes |
avg_doc_size_bytes
|\n\n|--------------------------------|--------------------|--------------------------|\n|
telemetry_index_settings_event | 2,235,887 | 25,286.12 |\n|
telemetry_ilm_policy_event | 577,148 | 3,390.25 |\n|
telemetry_ilm_stats_event | 2,731,533 | 19,607.14 |\n|
telemetry_index_templates_event| 5,788,583 | 36,688.70 |\n|
telemetry_index_stats_event | 3,829,341 | 55,705.83 |\n|
telemetry_data_stream_event | 6,885,418 | 17,581.92
|\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"92acdae34279a8c96b856a742fe440f0f81dae2b","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:
SecuritySolution","backport:current-major","v9.2.0"],"title":"[Telemetry]
Move indices metadata out of security
solution","number":212875,"url":"https://github.com/elastic/kibana/pull/212875","mergeCommit":{"message":"[Telemetry]
Move indices metadata out of security solution (#212875)\n\n##
Summary\n\nThis PR introduces a new plugin to relocate the [indices
metadata\ntelemetry
feature](#194004) out of\nthe
`security_solution` plugin, making it available across all
cluster\nsetups, not just security clusters.\n\n### Key Changes\n\n-
**Plugin Location:** `x-pack/platform/plugins/private`.\n- **Scheduled
Task:** Core logic runs as a periodic Kibana task\n(currently runs
frequently for testing; intended to run daily) to\ncollect indices and
ILM information.\n- **EBT:** Collected data is published as EBT
documents. Defined events\ninclude:\n * `DATA_STREAM_EVENT`\n *
`INDEX_STATS_EVENTS`\n * `ILM_STATS_EVENTS`\n * `ILM_POLICY_EVENTS`\n
See `server/lib/ebt/events.ts` for details.\n- **Internal Configuration
Schema:** Allows tuning query behavior:\n ```ts\n export const
IndicesMetadataConfigurationSchema = schema.object({\n
indices_threshold: schema.number(),\n datastreams_threshold:
schema.number(),\n index_query_size: schema.number(),\n
ilm_stats_query_size: schema.number(),\n ilm_policy_query_size:
schema.number(),\n });\n ```\nDefault values are zero, meaning no
queries run unless explicitly\nconfigured.\n- **Remote Configuration via
CDN:** Implements the same manifest\nmechanism used by
`security_solution`:\n* A signed config manifest (zip with
`manifest.json` + `manifest.sig`)\nis downloaded via CDN.\n * An `rxjs`
timer polls for updates.\n * Once verified, new config values are
applied dynamically.\n- **Plugin-Level Settings:** Supports configuring
the CDN URL and public\nkey to verify signatures:\n ```ts\n const
pluginConfigSchema = schema.object({\n cdnUrl:
schema.maybe(schema.string()),\n publicKey:
schema.maybe(schema.string()),\n });\n ```\n\nAs a reference, below are
stats for the last 90 days for the current\nimplementation inside
`security-solution`\n\n| event_type | max_doc_size_bytes |
avg_doc_size_bytes
|\n\n|--------------------------------|--------------------|--------------------------|\n|
telemetry_index_settings_event | 2,235,887 | 25,286.12 |\n|
telemetry_ilm_policy_event | 577,148 | 3,390.25 |\n|
telemetry_ilm_stats_event | 2,731,533 | 19,607.14 |\n|
telemetry_index_templates_event| 5,788,583 | 36,688.70 |\n|
telemetry_index_stats_event | 3,829,341 | 55,705.83 |\n|
telemetry_data_stream_event | 6,885,418 | 17,581.92
|\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"92acdae34279a8c96b856a742fe440f0f81dae2b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212875","number":212875,"mergeCommit":{"message":"[Telemetry]
Move indices metadata out of security solution (#212875)\n\n##
Summary\n\nThis PR introduces a new plugin to relocate the [indices
metadata\ntelemetry
feature](#194004) out of\nthe
`security_solution` plugin, making it available across all
cluster\nsetups, not just security clusters.\n\n### Key Changes\n\n-
**Plugin Location:** `x-pack/platform/plugins/private`.\n- **Scheduled
Task:** Core logic runs as a periodic Kibana task\n(currently runs
frequently for testing; intended to run daily) to\ncollect indices and
ILM information.\n- **EBT:** Collected data is published as EBT
documents. Defined events\ninclude:\n * `DATA_STREAM_EVENT`\n *
`INDEX_STATS_EVENTS`\n * `ILM_STATS_EVENTS`\n * `ILM_POLICY_EVENTS`\n
See `server/lib/ebt/events.ts` for details.\n- **Internal Configuration
Schema:** Allows tuning query behavior:\n ```ts\n export const
IndicesMetadataConfigurationSchema = schema.object({\n
indices_threshold: schema.number(),\n datastreams_threshold:
schema.number(),\n index_query_size: schema.number(),\n
ilm_stats_query_size: schema.number(),\n ilm_policy_query_size:
schema.number(),\n });\n ```\nDefault values are zero, meaning no
queries run unless explicitly\nconfigured.\n- **Remote Configuration via
CDN:** Implements the same manifest\nmechanism used by
`security_solution`:\n* A signed config manifest (zip with
`manifest.json` + `manifest.sig`)\nis downloaded via CDN.\n * An `rxjs`
timer polls for updates.\n * Once verified, new config values are
applied dynamically.\n- **Plugin-Level Settings:** Supports configuring
the CDN URL and public\nkey to verify signatures:\n ```ts\n const
pluginConfigSchema = schema.object({\n cdnUrl:
schema.maybe(schema.string()),\n publicKey:
schema.maybe(schema.string()),\n });\n ```\n\nAs a reference, below are
stats for the last 90 days for the current\nimplementation inside
`security-solution`\n\n| event_type | max_doc_size_bytes |
avg_doc_size_bytes
|\n\n|--------------------------------|--------------------|--------------------------|\n|
telemetry_index_settings_event | 2,235,887 | 25,286.12 |\n|
telemetry_ilm_policy_event | 577,148 | 3,390.25 |\n|
telemetry_ilm_stats_event | 2,731,533 | 19,607.14 |\n|
telemetry_index_templates_event| 5,788,583 | 36,688.70 |\n|
telemetry_index_stats_event | 3,829,341 | 55,705.83 |\n|
telemetry_data_stream_event | 6,885,418 | 17,581.92
|\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"92acdae34279a8c96b856a742fe440f0f81dae2b"}},{"url":"https://github.com/elastic/kibana/pull/231939","number":231939,"branch":"9.1","state":"OPEN"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
…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>
qn895 pushed a commit to qn895/kibana that referenced this pull request Aug 26, 2025
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v9.0.6 v9.1.3 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants