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

Get cluster UUID from Info API call #8592

Conversation

ycombinator
Copy link
Contributor

Starting from 6.5.0, Elasticsearch will return the cluster_uuid as part of the GET _cluster/stats API response. However, the Elasticsearch metricbeat module has been in existence since 6.3.0 so it must fetch the cluster UUID from the GET / Elasticsearch API.

This PR makes it so the GET / API is always called and the cluster UUID from it is used. This is obviously not ideal in terms of API calls, but it's the simplest fix (for now, until we can figure out a nicer way to deal with version differences).

@ycombinator ycombinator added review Metricbeat Metricbeat needs_backport PR is waiting to be backported to other branches. v7.0.0-alpha1 monitoring v6.5.0 labels Oct 5, 2018
@ycombinator ycombinator requested a review from ruflin October 5, 2018 18:43
@ycombinator ycombinator merged commit ccfc8d7 into elastic:master Oct 14, 2018
@ycombinator ycombinator deleted the metricbeat-elasticsearch-cluster-stats-cluster-id branch October 14, 2018 05:49
@ycombinator ycombinator removed the needs_backport PR is waiting to be backported to other branches. label Oct 14, 2018
ycombinator added a commit that referenced this pull request Oct 16, 2018
Starting from 6.5.0, Elasticsearch [will return](elastic/elasticsearch#32206) the `cluster_uuid` as part of the `GET _cluster/stats` API response. However, the Elasticsearch metricbeat module has been in existence since 6.3.0 so it must fetch the cluster UUID from the `GET /` Elasticsearch API.

This PR makes it so the `GET /` API is always called and the cluster UUID from it is used. This is obviously not ideal in terms of API calls, but it's the simplest fix (for now, until we can figure out a nicer way to deal with version differences).

(cherry picked from commit ccfc8d7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants