Skip to content

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

@lmi-bxn

Description

@lmi-bxn

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]"
        }
      }
    ]
  },
  [..]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions