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

Expose index uuid in _stats endpoint #31791

Closed
ruflin opened this issue Jul 4, 2018 · 5 comments · Fixed by #31871
Closed

Expose index uuid in _stats endpoint #31791

ruflin opened this issue Jul 4, 2018 · 5 comments · Fixed by #31871
Assignees
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates >enhancement help wanted adoptme

Comments

@ruflin
Copy link
Member

ruflin commented Jul 4, 2018

To collect metrics about the Elasticsearch indices Metricbeat calls the /_stats endpoint. Inside the object "indices" : { all indices are listed with its names. The data that is missing inside is the index uuid. It can be fetched by calling GET /index-name and then can be found under uuid. Having to make a separate request for each index to fetch the identifier is not an optimal solution.

The uuid is important for the following reasons:

  • The same index name can exist in multiple clusters. Beats can collect data from multiple clusters into a single monitoring cluster.
  • An index can be deleted and a new one created with the same name. In this case only the UUID is different.
  • With cross cluster replication matching indices from 2 different clusters with the same uuid could become even more interesting: Introduce cross-cluster replication #30086

NOTE: The _stats endpoint also currently does not expose the cluster_uuid and we fetch it in a separate call.

@dliappis dliappis added discuss >enhancement :Data Management/Indices APIs APIs to create and manage indices and templates labels Jul 4, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@rjernst rjernst added help wanted adoptme and removed discuss labels Jul 5, 2018
@rjernst
Copy link
Member

rjernst commented Jul 5, 2018

We discussed this in FixItThursday and it sounds reasonable and should be relatively easy to do. I'm marking this as adopt me for anyone to pick up.

@ruflin
Copy link
Member Author

ruflin commented Jul 6, 2018

Thanks, great to hear.

@original-brownbear original-brownbear self-assigned this Jul 6, 2018
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this issue Jul 6, 2018
* Add "uuid" field to each index's section in the `/_stats` response
* closes elastic#31791
@original-brownbear
Copy link
Member

Opened #31871 for this one

original-brownbear added a commit that referenced this issue Jul 17, 2018
* Add "uuid" field to each index's section in the `/_stats` response
* closes #31791
@ruflin
Copy link
Member Author

ruflin commented Jul 17, 2018

@original-brownbear Thanks for making this happen.
@ycombinator FYI

original-brownbear added a commit to original-brownbear/elasticsearch that referenced this issue Jul 17, 2018
* Add "uuid" field to each index's section in the `/_stats` response
* closes elastic#31791
original-brownbear added a commit that referenced this issue Jul 17, 2018
* Add "uuid" field to each index's section in the `/_stats` response
* closes #31791
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this issue Jul 18, 2018
* UUID field was added for elastic#31791 and only went into 6.4 and 7.0
* Fixes elastic#32119
original-brownbear added a commit that referenced this issue Jul 18, 2018
* UUID field was added for #31791 and only went into 6.4 and 7.0
* Fixes #32119
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this issue Jul 18, 2018
* UUID field was added for elastic#31791 and only went into 6.4 and 7.0
* Fixes elastic#32119
original-brownbear added a commit that referenced this issue Jul 18, 2018
* UUID field was added for #31791 and only went into 6.4 and 7.0
* Fixes #32119
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates >enhancement help wanted adoptme
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants