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

[Stack Monitoring] Fix displaying ES version for external collection #131194

Merged
merged 8 commits into from
May 16, 2022

Conversation

miltonhultgren
Copy link
Contributor

@miltonhultgren miltonhultgren commented Apr 28, 2022

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 for cluster_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 reports version as a simple integer.

The response from /_cluster/stats reports the version under both indices and nodes, both as lists.

The response from / reports it under version.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.

@miltonhultgren miltonhultgren added release_note:fix Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services Feature:Stack Monitoring v8.3.0 labels Apr 28, 2022
@miltonhultgren miltonhultgren requested a review from a team as a code owner April 28, 2022 19:43
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

@weltenwort weltenwort requested review from weltenwort and removed request for weltenwort April 29, 2022 09:05
@neptunian
Copy link
Contributor

neptunian commented Apr 29, 2022

I'm thinking we should open an issue in Beats for the ES module and figure out why elasticsearch.cluster.stats.state.version isn't being populated, if elasticsearch.version is being populated correctly, and confirm which field we ought to be using. We'll probably need some help from the ES team.

I think we'd also need to update fetchClusterStats which is where the actual query lives for getClustersSummary.

I think this is fine for now, though... better than what we currently have.

@miltonhultgren
Copy link
Contributor Author

@elasticmachine merge upstream

@miltonhultgren
Copy link
Contributor Author

Opened elastic/beats#31481 to follow up on the Metricbeat module bug

@miltonhultgren
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@miltonhultgren miltonhultgren merged commit aefb58d into elastic:main May 16, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Stack Monitoring release_note:fix Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Stack Monitoring] Elasticsearch version displays incorrect version
7 participants