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

Suggestion for timeout method on ES 7+ and opensearch #508

Open
lmi-bxn opened this issue Dec 6, 2021 · 0 comments · May be fixed by #529
Open

Suggestion for timeout method on ES 7+ and opensearch #508

lmi-bxn opened this issue Dec 6, 2021 · 0 comments · May be fixed by #529

Comments

@lmi-bxn
Copy link

lmi-bxn commented Dec 6, 2021

There is a timeout parameter in Elasticsearch and OpenSearch which could be used in the following lines:

if c.all {
u.Path = path.Join(u.Path, "/_nodes/stats")
} else {
u.Path = path.Join(u.Path, "_nodes", c.node, "stats")
}
to have a timeout for the Nodes info API (e.g. _nodes/stats).

This change would give the possibility to have a subset of the data for the request, missing only the response from specific parts.

e.g.

GET /_nodes/stats?timeout=5s
---
{
  "_nodes" : {
    "total" : ##,
    "successful" : ##,
    "failed" : 1,
    "failures" : [
      {
        "type" : "failed_node_exception",
        "reason" : "Failed node [xXXxxxxxxXXxxxXxxX]",
        "node_id" : "xXXxXxXxxXXxXXxxxXxx",
        "caused_by" : {
          "type" : "receive_timeout_transport_exception",
          "reason" : "[xxxx.xxx.xxx][1.2.3.4:9300][cluster:monitor/nodes/stats[n]] request_id [5409341] timed out after [5003ms]"
        }
      }
    ]
  },
  [..]
}
@trk-bxn trk-bxn linked a pull request Feb 8, 2022 that will close this issue
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 a pull request may close this issue.

1 participant