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

fix _/node/stats related metrics #439

Merged

Conversation

0x46616c6b
Copy link
Contributor

@0x46616c6b 0x46616c6b commented Jun 15, 2021

Since Elasticsearch 7.13 the node related metrics are broken. It relates to a API change in Elasticsearch which breaks the unmarshling:

level=warn ts=2021-06-15T09:53:13.626727Z caller=nodes.go:1871 msg="failed to fetch and decode node stats" err="json: cannot unmarshal array into Go struct field NodeStatsNodeResponse.Nodes.http of type int"

The HTTP field will only checked for the roles and also only as len(HTTP), so it seems it is not important to have the type here.

Example for http field in the response (Elasticsearch 7.13)

    {
      "id": 299723549,
      "agent": "curl/7.61.1",
      "local_address": "127.0.0.1:9200",
      "remote_address": "127.0.0.1:41480",
      "last_uri": "/",
      "opened_time_millis": 1623753253078,
      "closed_time_millis": 1623753253078,
      "last_request_time_millis": 1623753253078,
      "request_count": 1,
      "request_size_bytes": 0
    },

Related #419

Signed-off-by: Falk Scheerschmidt <[email protected]>
@0x46616c6b 0x46616c6b force-pushed the fix-node-stats-metrics branch from 1bcf19e to 1649533 Compare June 15, 2021 10:52
@sysadmind
Copy link
Contributor

There is a test that is skipped here for 7.13. This will need to be removed as well to ensure that nothing else is broken.

Signed-off-by: Falk Scheerschmidt <[email protected]>
@0x46616c6b 0x46616c6b force-pushed the fix-node-stats-metrics branch from 65bed4d to df0f1d0 Compare June 15, 2021 20:13
@Skunnyk
Copy link

Skunnyk commented Jun 16, 2021

Thank you ! Will this works on ES < 7.13 ?

@0x46616c6b
Copy link
Contributor Author

Thank you ! Will this works on ES < 7.13 ?

Yes, the automated tests and a manual test on a 6.8 cluster works.

@sysadmind sysadmind merged commit a4c1f63 into prometheus-community:master Jun 16, 2021
@adammike
Copy link

@sysadmind is there a ci pipline that automatically deploys this image someplace? or does it have to wait for a release?

@sysadmind
Copy link
Contributor

The available docker images are here: https://quay.io/repository/prometheuscommunity/elasticsearch-exporter?tab=tags
There is a master tag if you like the bleeding edge 😄

@adammike
Copy link

heh, can't get any more broken than it is now.. for 7.13 anyway.

@adammike
Copy link

Deployed the master image for two of our es clusters, works great 👍

@gkulkarni32
Copy link

@sysadmind Wanted to know by when the changes will be available in the exporter image (1.2.1?)

@0x46616c6b 0x46616c6b deleted the fix-node-stats-metrics branch June 23, 2021 14:03
@sysadmind
Copy link
Contributor

v1.2.1 has been released

@gkulkarni32
Copy link

Thank you @sysadmind , will test it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants