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

[receiver/elasticsearchreceiver] Add metric versioning checks before emitting on newer metrics #14012

Closed
3 tasks done
JonathanWamsley opened this issue Sep 9, 2022 · 2 comments
Labels
bug Something isn't working priority:p2 Medium receiver/elasticsearch

Comments

@JonathanWamsley
Copy link
Contributor

JonathanWamsley commented Sep 9, 2022

Describe the bug
Elasticsearch supports version 9.7+ but some metrics were introduced at a later version(i.e. 9.10, 9.13). The current implementation has elasticsearch emitting 0 values for these metrics even if they are not supported when ran on 9.7. I proposed 3 pr's:

  • a new method to get the elasticsearch version via curl http://localhost:9200/ which would produce
{
  "name" : "2e86337accef",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "sRnzQpHOQm61US0Hdbz0qg",
  "version" : {
    "number" : "7.17.0",
    "build_flavor" : "default",
    ...
}
  • a version check before emitting elasticsearch.indexing_pressure.memory.limit that was introduced in 7.10, easy view
  • a version check before emitting elasticsearch.node.shards.data_set.size that was introduced in 7.13.0, easy view

This can be validated by showing the integration test 7.9 having 0 metrics values for the above metrics. Then each pr the metric will be removed for 9.7 integration test while still being populating for the 7.16 integration test.

Documentation on available metrics for each elasticsearch version should be added in the README

Steps to reproduce
Running the es collector on 9.7 and getting 0 value metrics for the above metrics when they are not supported.

What did you expect to see?
Running the es collector on 9.7 and getting no metrics for the above metrics.

What did you see instead?
Running the es collector on 9.7 and getting 0 value metrics for the above metrics when they are not supported.

What version did you use?
elasticsearchreceiver v0.59.0

@JonathanWamsley JonathanWamsley added the bug Something isn't working label Sep 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2022

Pinging code owners: @djaglowski @BinaryFissionGames. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@JonathanWamsley
Copy link
Contributor Author

resolved with #14021 and #14104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:p2 Medium receiver/elasticsearch
Projects
None yet
Development

No branches or pull requests

2 participants