Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index stats enhancement: creation date and tier_preference #116339

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

3kt
Copy link

@3kt 3kt commented Nov 6, 2024

What

This adds two additional fields to the index stats API call response:

  • creation_date
  • tier_preference

Both information are transparently pushed from the IndexMetadata class, otherwise natively displayed in the index settings.

A stats call against an index would give such a response:

[...]
  "indices": {
    "foobar": {
      "uuid": "H3BofqE4QWqk21PZk314pg",
      "health": "yellow",
      "status": "open",
      "tier_preference": [
        "data_content"
      ],
      "creation_date": 1730912491278,
      "primaries": {
        "docs": {
          "count": 1,
          "deleted": 0,
          "total_size_in_bytes": 5208
        },
[...]

Why

In their current state, the index stats are hard to consume for users, as most exposed stats are increasing counters. Giving contextual information such as when the index was created or what data tier it currently lives in allows users to answer questions like:

  • What is my relative usage (query time, storage, index time, etc...) for one data tier compared to another?
  • Within a given data tier, what index is the most used?
  • What is my relative usage, as function of the index age?

@elasticsearchmachine elasticsearchmachine added v9.0.0 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-contributor Pull request authored by a developer outside the Elasticsearch team v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants