-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Stack Monitoring] Fix displaying ES version for external collection #131194
[Stack Monitoring] Fix displaying ES version for external collection #131194
Conversation
Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI) |
x-pack/plugins/monitoring/server/lib/cluster/get_clusters_summary.ts
Outdated
Show resolved
Hide resolved
I'm thinking we should open an issue in Beats for the ES module and figure out why I think we'd also need to update fetchClusterStats which is where the actual query lives for I think this is fine for now, though... better than what we currently have. |
@elasticmachine merge upstream |
Opened elastic/beats#31481 to follow up on the Metricbeat module bug |
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
fixes #126741
When using external collection, we were trying to read the Elasticsearch version from
elasticsearch.version
.However, according to the module docs the right field is
elasticsearch.cluster.stats.state.version
(which is aliased forcluster_state.version
).But, it seems the Metricbeat module does not actually populate this field, and it might be because the ES APIs aren't so clear about it.
elasticsearch.version
is populated from the results of/_cluster/state
which reportsversion
as a simple integer.The response from
/_cluster/stats
reports the version under bothindices
andnodes
, both as lists.The response from
/
reports it underversion.number
but with the build type included (8.3.0-SNAPSHOT).The version shows up in a few places but not as clearly as the old internal collection documents.
As a side question, what is the version of a distributed system? A lot of the version fields in the new API response are arrays since it might be the state during a rollover to contain multiple versions.
In this PR, I'm resorting to using the first item in
elasticsearch.cluster.stats.nodes.versions
as the version to display in the overview.