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

Indexing stats total include replicas #106821

Open
andreidan opened this issue Mar 27, 2024 · 1 comment
Open

Indexing stats total include replicas #106821

andreidan opened this issue Mar 27, 2024 · 1 comment
Labels
>bug :Data Management/Stats Statistics tracking and retrieval APIs Team:Data Management Meta label for data/management team

Comments

@andreidan
Copy link
Contributor

Elasticsearch Version

8.14

Installed Plugins

No response

Java Version

bundled

OS Version

Darwin

Problem Description

Issuing a GET {index_name}/_stats/indexing request returns the primaries
result and the total result.
Some of the total metrics (like write_load) are averages and the values are being
misleading as they take into account the replicas values.
The indexing metrics in particular are mostly interesting off the primary shards.

This proposes we ignore replica indexing metrics in the total categore to avoid
outputs where an index with one primary and one replica reports some total metrics
as lower than the individual primary shard:

"indices": {
    ".ds-traces-apm-default-2024.03.26-000300": {
      "uuid": "o8gTCw_rQrmceYLSdJV_Pg",
      "health": "green",
      "status": "open",
      "primaries": {
        "indexing": {
          "index_total": 28735924,
          "index_time_in_millis": 4342901,
          "index_current": 1,
          "index_failed": 0,
          "delete_total": 0,
          "delete_time_in_millis": 0,
          "delete_current": 0,
          "noop_update_total": 0,
          "is_throttled": false,
          "throttle_time_in_millis": 0,
          "write_load": 1.7805114664625246
        }
      },
      "total": {
        "indexing": {
          "index_total": 28735924,
          "index_time_in_millis": 4342901,
          "index_current": 1,
          "index_failed": 0,
          "delete_total": 0,
          "delete_time_in_millis": 0,
          "delete_current": 0,
          "noop_update_total": 0,
          "is_throttled": false,
          "throttle_time_in_millis": 0,
          "write_load": 0.8903026091483134
        }
      }
    }

Steps to Reproduce

Create index/data stream
Ingest data
GET {index_name}/_stats/indexing

Logs (if relevant)

No response

@andreidan andreidan added >bug :Data Management/Stats Statistics tracking and retrieval APIs labels Mar 27, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Mar 27, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/Stats Statistics tracking and retrieval APIs Team:Data Management Meta label for data/management team
Projects
None yet
Development

No branches or pull requests

2 participants