add timeout to node stats#529
Conversation
Signed-off-by: trk-bxn <tobias.koenigs@tonies.com>
Signed-off-by: trk-bxn <tobias.koenigs@tonies.com>
Signed-off-by: trk-bxn <tobias.koenigs@tonies.com>
e43817a to
8f7814b
Compare
sysadmind
left a comment
There was a problem hiding this comment.
It looks like the httpclient passed into collector.NewNodes already has this set on the client side. I think you could pull it from the http.Client.Timeout field so the signature does not need to change. I am also not sure what the benefit is of the http query string parameter. Can you explain how this would benefit users of this exporter?
|
Hi, This are two different timeout option. The http.Client.Timeout stop if the request is to long. But in the background the requested node try to get the metrics from the other nodes. This backend request have a elasticsearch internal timeout of default 30 seconds. If now the http.Client timedout 5 secends the requested noded is not ready to send all node metrics and return then an empty response. This is a problem if you have more nodes. The elasticsearch 7 and opensearch 1 support now to change the default internal timeout for node metrics request and fix the empty response. I defined now to set the elasticsearch internal timeout to the same timeout of the elasticsearch exporter. |
|
this fix this problem in newer elasticsearch version |
|
Hi, |
|
If you're seeing gaps in data, you want to try adjusting the flag |
|
@trk-bxn this PR is out of date and needs a rebase. I'm still not clear how the URL parameter makes a difference. Does elasticsearch do something special with the URL parameter? Can you link to the docs for that? I'm going to close for now but if you have information about how this effects elasticsearch, I would like to reconsider. |
With the elasticsearch version 7 and Opensearch version 1 there is a new timeout parameter implement.
Elasticsearch 6 ignores this timeout parameter and this change have no impact.
Tested with elasticsearch 6.8 and opensearch 1.2
Elasticsearch
https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html#cluster-nodes-stats-api-query-params
Opensearch
https://opendistro.github.io/for-elasticsearch-docs/docs/elasticsearch/rest-api-reference/#nodesinfo
resolve #508