Method: OpenSearch::API::Cat::Actions#nodes

Defined in:
lib/opensearch/api/actions/cat/nodes.rb

#nodes(arguments = {}) ⇒ Object

Returns basic statistics about performance of cluster nodes.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :bytes (String)

    The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :full_id (Boolean)

    Return the full node ID instead of the shortened version (default: false)

  • :local (Boolean)

    Calculate the selected nodes using the local cluster state rather than the state from cluster_manager node (default: false) Deprecated

  • :master_timeout (Time) — default: DEPRECATED: use cluster_manager_timeout instead

    Explicit operation timeout for connection to master node

  • :cluster_manager_timeout (Time)

    Explicit operation timeout for connection to cluster_manager node

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :time (String)

    The unit in which to display time values (options: d, h, m, s, ms, micros, nanos)

  • :v (Boolean)

    Verbose mode. Display column headers

  • :include_unloaded_segments (Boolean)

    If set to true segment stats will include stats for segments that are not currently loaded into memory

  • :headers (Hash)

    Custom HTTP headers



48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/opensearch/api/actions/cat/nodes.rb', line 48

def nodes(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  method = OpenSearch::API::HTTP_GET
  path   = '_cat/nodes'
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
  params[:h] = Utils.__listify(params[:h], escape: false) if params[:h]

  body = nil
  perform_request(method, path, params, body, headers).body
end