Module: Elasticsearch::API::Cat::Actions

Included in:
CatClient
Defined in:
lib/elasticsearch/api/namespace/cat.rb,
lib/elasticsearch/api/actions/cat/help.rb,
lib/elasticsearch/api/actions/cat/count.rb,
lib/elasticsearch/api/actions/cat/nodes.rb,
lib/elasticsearch/api/actions/cat/tasks.rb,
lib/elasticsearch/api/actions/cat/health.rb,
lib/elasticsearch/api/actions/cat/master.rb,
lib/elasticsearch/api/actions/cat/shards.rb,
lib/elasticsearch/api/actions/cat/aliases.rb,
lib/elasticsearch/api/actions/cat/indices.rb,
lib/elasticsearch/api/actions/cat/ml_jobs.rb,
lib/elasticsearch/api/actions/cat/plugins.rb,
lib/elasticsearch/api/actions/cat/recovery.rb,
lib/elasticsearch/api/actions/cat/segments.rb,
lib/elasticsearch/api/actions/cat/fielddata.rb,
lib/elasticsearch/api/actions/cat/nodeattrs.rb,
lib/elasticsearch/api/actions/cat/snapshots.rb,
lib/elasticsearch/api/actions/cat/templates.rb,
lib/elasticsearch/api/actions/cat/allocation.rb,
lib/elasticsearch/api/actions/cat/transforms.rb,
lib/elasticsearch/api/actions/cat/thread_pool.rb,
lib/elasticsearch/api/actions/cat/ml_datafeeds.rb,
lib/elasticsearch/api/actions/cat/repositories.rb,
lib/elasticsearch/api/actions/cat/pending_tasks.rb,
lib/elasticsearch/api/actions/cat/ml_trained_models.rb,
lib/elasticsearch/api/actions/cat/component_templates.rb,
lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb

Instance Method Summary collapse

Instance Method Details

#aliases(arguments = {}) ⇒ Object

Get aliases

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :name (List)

    A comma-separated list of alias names to return

  • :format (String)

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

  • :local (Boolean)

    Return local information, do not retrieve the state from master node (default: false)

  • :h (List)

    Comma-separated list of column names to display (options: alias, index, filter, routing.index, routing.search, is_write_index)

  • :help (Boolean)

    Return help information

  • :s (List)

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

  • :v (Boolean)

    Verbose mode. Display column headers

  • :expand_wildcards (List)

    Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all)

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :time (String)

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

  • :headers (Hash)

    Custom HTTP headers

See Also:



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/elasticsearch/api/actions/cat/aliases.rb', line 41

def aliases(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.aliases' }

  defined_params = [:name].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _name = arguments.delete(:name)

  method = Elasticsearch::API::HTTP_GET
  path   = if _name
             "_cat/aliases/#{Utils.__listify(_name)}"
           else
             '_cat/aliases'
           end
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#allocation(arguments = {}) ⇒ Object

Get shard allocation information

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :node_id (List)

    A comma-separated list of node IDs or names to limit the returned information

  • :format (String)

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

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :time (String)

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

  • :local (Boolean)

    Return local information, do not retrieve the state from master node (default: false)

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :h (List)

    Comma-separated list of column names to display (options: shards, shards.undesired, write_load.forecast, disk.indices.forecast, disk.indices, disk.used, disk.avail, disk.total, disk.percent, host, ip, node, node.role)

  • :help (Boolean)

    Return help information

  • :s (List)

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

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers

See Also:



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/elasticsearch/api/actions/cat/allocation.rb', line 41

def allocation(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.allocation' }

  defined_params = [:node_id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _node_id = arguments.delete(:node_id)

  method = Elasticsearch::API::HTTP_GET
  path   = if _node_id
             "_cat/allocation/#{Utils.__listify(_node_id)}"
           else
             '_cat/allocation'
           end
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#component_templates(arguments = {}) ⇒ Object

Get component templates

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :name (String)

    A pattern that returned component template names must match

  • :format (String)

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

  • :local (Boolean)

    Return local information, do not retrieve the state from master node (default: false)

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :h (List)

    Comma-separated list of column names to display (options: name, version, alias_count, mapping_count, settings_count, metadata_count, included_in)

  • :help (Boolean)

    Return help information

  • :s (List)

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

  • :v (Boolean)

    Verbose mode. Display column headers

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :time (String)

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

  • :headers (Hash)

    Custom HTTP headers

See Also:



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/elasticsearch/api/actions/cat/component_templates.rb', line 41

def component_templates(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.component_templates' }

  defined_params = [:name].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _name = arguments.delete(:name)

  method = Elasticsearch::API::HTTP_GET
  path   = if _name
             "_cat/component_templates/#{Utils.__listify(_name)}"
           else
             '_cat/component_templates'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#count(arguments = {}) ⇒ Object

Get a document count

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :index (List)

    A comma-separated list of index names to limit the returned information

  • :format (String)

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

  • :h (List)

    Comma-separated list of column names to display (options: epoch, timestamp, count)

  • :help (Boolean)

    Return help information

  • :s (List)

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

  • :v (Boolean)

    Verbose mode. Display column headers

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :time (String)

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

  • :headers (Hash)

    Custom HTTP headers

See Also:



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/elasticsearch/api/actions/cat/count.rb', line 39

def count(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.count' }

  defined_params = [:index].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  _index = arguments.delete(:index)

  method = Elasticsearch::API::HTTP_GET
  path   = if _index
             "_cat/count/#{Utils.__listify(_index)}"
           else
             '_cat/count'
           end
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#fielddata(arguments = {}) ⇒ Object

Get field data cache information

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :fields (List)

    A comma-separated list of fields to return the fielddata size

  • :format (String)

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

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :h (List)

    Comma-separated list of column names to display (options: id, host, ip, node, field, size)

  • :help (Boolean)

    Return help information

  • :s (List)

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

  • :v (Boolean)

    Verbose mode. Display column headers

  • :time (String)

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

  • :headers (Hash)

    Custom HTTP headers

See Also:



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/elasticsearch/api/actions/cat/fielddata.rb', line 39

def fielddata(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.fielddata' }

  defined_params = [:fields].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _fields = arguments.delete(:fields)

  method = Elasticsearch::API::HTTP_GET
  path   = if _fields
             "_cat/fielddata/#{Utils.__listify(_fields)}"
           else
             '_cat/fielddata'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#health(arguments = {}) ⇒ Object

Get the cluster health status

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :format (String)

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

  • :h (List)

    Comma-separated list of column names to display (options: epoch, timestamp, cluster, status, node.total, node.data, shards, pri, relo, init, unassign, unassign.pri, pending_tasks, max_task_wait_time, active_shards_percent)

  • :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)

  • :ts (Boolean)

    Set to false to disable timestamping

  • :v (Boolean)

    Verbose mode. Display column headers

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :headers (Hash)

    Custom HTTP headers

See Also:



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/elasticsearch/api/actions/cat/health.rb', line 39

def health(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.health' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat/health'
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#help(arguments = {}) ⇒ Object

Get CAT help

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :headers (Hash)

    Custom HTTP headers

See Also:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/elasticsearch/api/actions/cat/help.rb', line 31

def help(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.help' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat'
  params = {}

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#indices(arguments = {}) ⇒ Object

Get index information

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :index (List)

    A comma-separated list of index names to limit the returned information

  • :format (String)

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

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :h (List)

    Comma-separated list of column names to display (options: health, status, index, uuid, pri, rep, docs.count, docs.deleted, creation.date, creation.date.string, store.size, pri.store.size, dataset.size, completion.size, pri.completion.size, fielddata.memory_size, pri.fielddata.memory_size, fielddata.evictions, pri.fielddata.evictions, query_cache.memory_size, pri.query_cache.memory_size, query_cache.evictions, pri.query_cache.evictions, request_cache.memory_size, pri.request_cache.memory_size, request_cache.evictions, pri.request_cache.evictions, request_cache.hit_count, pri.request_cache.hit_count, request_cache.miss_count, pri.request_cache.miss_count, flush.total, pri.flush.total, flush.total_time, pri.flush.total_time, get.current, pri.get.current, get.time, pri.get.time, get.total, pri.get.total, get.exists_time, pri.get.exists_time, get.exists_total, pri.get.exists_total, get.missing_time, pri.get.missing_time, get.missing_total, pri.get.missing_total, indexing.delete_current, pri.indexing.delete_current, indexing.delete_time, pri.indexing.delete_time, indexing.delete_total, pri.indexing.delete_total, indexing.index_current, pri.indexing.index_current, indexing.index_time, pri.indexing.index_time, indexing.index_total, pri.indexing.index_total, indexing.index_failed, pri.indexing.index_failed, indexing.index_failed_due_to_version_conflict, pri.indexing.index_failed_due_to_version_conflict, merges.current, pri.merges.current, merges.current_docs, pri.merges.current_docs, merges.current_size, pri.merges.current_size, merges.total, pri.merges.total, merges.total_docs, pri.merges.total_docs, merges.total_size, pri.merges.total_size, merges.total_time, pri.merges.total_time, refresh.total, pri.refresh.total, refresh.time, pri.refresh.time, refresh.external_total, pri.refresh.external_total, refresh.external_time, pri.refresh.external_time, refresh.listeners, pri.refresh.listeners, search.fetch_current, pri.search.fetch_current, search.fetch_time, pri.search.fetch_time, search.fetch_total, pri.search.fetch_total, search.open_contexts, pri.search.open_contexts, search.query_current, pri.search.query_current, search.query_time, pri.search.query_time, search.query_total, pri.search.query_total, search.scroll_current, pri.search.scroll_current, search.scroll_time, pri.search.scroll_time, search.scroll_total, pri.search.scroll_total, segments.count, pri.segments.count, segments.memory, pri.segments.memory, segments.index_writer_memory, pri.segments.index_writer_memory, segments.version_map_memory, pri.segments.version_map_memory, segments.fixed_bitset_memory, pri.segments.fixed_bitset_memory, warmer.current, pri.warmer.current, warmer.total, pri.warmer.total, warmer.total_time, pri.warmer.total_time, suggest.current, pri.suggest.current, suggest.time, pri.suggest.time, suggest.total, pri.suggest.total, memory.total, pri.memory.total, bulk.total_operations, pri.bulk.total_operations, bulk.total_time, pri.bulk.total_time, bulk.total_size_in_bytes, pri.bulk.total_size_in_bytes, bulk.avg_time, pri.bulk.avg_time, bulk.avg_size_in_bytes, pri.bulk.avg_size_in_bytes, dense_vector.value_count, pri.dense_vector.value_count, sparse_vector.value_count, pri.sparse_vector.value_count)

  • :health (String)

    A health status (“green”, “yellow”, or “red” to filter only indices matching the specified health status (options: green, yellow, red, unknown, unavailable)

  • :help (Boolean)

    Return help information

  • :pri (Boolean)

    Set to true to return stats only for primary shards

  • :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

  • :expand_wildcards (List)

    Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all)

  • :headers (Hash)

    Custom HTTP headers

See Also:



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/elasticsearch/api/actions/cat/indices.rb', line 44

def indices(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.indices' }

  defined_params = [:index].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  _index = arguments.delete(:index)

  method = Elasticsearch::API::HTTP_GET
  path   = if _index
             "_cat/indices/#{Utils.__listify(_index)}"
           else
             '_cat/indices'
           end
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#master(arguments = {}) ⇒ Object

Get master node information

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :format (String)

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

  • :local (Boolean)

    Return local information, do not retrieve the state from master node (default: false)

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :h (List)

    Comma-separated list of column names to display (options: id, host, ip, node)

  • :help (Boolean)

    Return help information

  • :s (List)

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

  • :v (Boolean)

    Verbose mode. Display column headers

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :time (String)

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

  • :headers (Hash)

    Custom HTTP headers

See Also:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/elasticsearch/api/actions/cat/master.rb', line 40

def master(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.master' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat/master'
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#ml_data_frame_analytics(arguments = {}) ⇒ Object

Get data frame analytics jobs

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    The ID of the data frame analytics to fetch

  • :allow_no_match (Boolean)

    Whether to ignore if a wildcard expression matches no configs. (This includes ‘_all` string or when no configs have been specified)

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :format (String)

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

  • :h (List)

    Comma-separated list of column names to display (options: assignment_explanation, create_time, description, dest_index, failure_reason, id, model_memory_limit, node.address, node.ephemeral_id, node.id, node.name, progress, source_index, state, type, version)

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by (options: assignment_explanation, create_time, description, dest_index, failure_reason, id, model_memory_limit, node.address, node.ephemeral_id, node.id, node.name, progress, source_index, state, type, version)

  • :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

  • :headers (Hash)

    Custom HTTP headers

See Also:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb', line 40

def ml_data_frame_analytics(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_data_frame_analytics' }

  defined_params = [:id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _id = arguments.delete(:id)

  method = Elasticsearch::API::HTTP_GET
  path   = if _id
             "_cat/ml/data_frame/analytics/#{Utils.__listify(_id)}"
           else
             '_cat/ml/data_frame/analytics'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#ml_datafeeds(arguments = {}) ⇒ Object

Get datafeeds

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :datafeed_id (String)

    The ID of the datafeeds stats to fetch

  • :allow_no_match (Boolean)

    Whether to ignore if a wildcard expression matches no datafeeds. (This includes ‘_all` string or when no datafeeds have been specified)

  • :format (String)

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

  • :h (List)

    Comma-separated list of column names to display (options: ae, bc, id, na, ne, ni, nn, sba, sc, seah, st, s)

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by (options: ae, bc, id, na, ne, ni, nn, sba, sc, seah, st, s)

  • :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

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :headers (Hash)

    Custom HTTP headers

See Also:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/elasticsearch/api/actions/cat/ml_datafeeds.rb', line 40

def ml_datafeeds(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_datafeeds' }

  defined_params = [:datafeed_id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _datafeed_id = arguments.delete(:datafeed_id)

  method = Elasticsearch::API::HTTP_GET
  path   = if _datafeed_id
             "_cat/ml/datafeeds/#{Utils.__listify(_datafeed_id)}"
           else
             '_cat/ml/datafeeds'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#ml_jobs(arguments = {}) ⇒ Object

Get anomaly detection jobs

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :job_id (String)

    The ID of the jobs stats to fetch

  • :allow_no_match (Boolean)

    Whether to ignore if a wildcard expression matches no jobs. (This includes ‘_all` string or when no jobs have been specified)

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :format (String)

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

  • :h (List)

    Comma-separated list of column names to display (options: assignment_explanation, buckets.count, buckets.time.exp_avg, buckets.time.exp_avg_hour, buckets.time.max, buckets.time.min, buckets.time.total, data.buckets, data.earliest_record, data.empty_buckets, data.input_bytes, data.input_fields, data.input_records, data.invalid_dates, data.last, data.last_empty_bucket, data.last_sparse_bucket, data.latest_record, data.missing_fields, data.out_of_order_timestamps, data.processed_fields, data.processed_records, data.sparse_buckets, forecasts.memory.avg, forecasts.memory.max, forecasts.memory.min, forecasts.memory.total, forecasts.records.avg, forecasts.records.max, forecasts.records.min, forecasts.records.total, forecasts.time.avg, forecasts.time.max, forecasts.time.min, forecasts.time.total, forecasts.total, id, model.bucket_allocation_failures, model.by_fields, model.bytes, model.bytes_exceeded, model.categorization_status, model.categorized_doc_count, model.dead_category_count, model.failed_category_count, model.frequent_category_count, model.log_time, model.memory_limit, model.memory_status, model.over_fields, model.partition_fields, model.rare_category_count, model.timestamp, model.total_category_count, node.address, node.ephemeral_id, node.id, node.name, opened_time, state)

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by (options: assignment_explanation, buckets.count, buckets.time.exp_avg, buckets.time.exp_avg_hour, buckets.time.max, buckets.time.min, buckets.time.total, data.buckets, data.earliest_record, data.empty_buckets, data.input_bytes, data.input_fields, data.input_records, data.invalid_dates, data.last, data.last_empty_bucket, data.last_sparse_bucket, data.latest_record, data.missing_fields, data.out_of_order_timestamps, data.processed_fields, data.processed_records, data.sparse_buckets, forecasts.memory.avg, forecasts.memory.max, forecasts.memory.min, forecasts.memory.total, forecasts.records.avg, forecasts.records.max, forecasts.records.min, forecasts.records.total, forecasts.time.avg, forecasts.time.max, forecasts.time.min, forecasts.time.total, forecasts.total, id, model.bucket_allocation_failures, model.by_fields, model.bytes, model.bytes_exceeded, model.categorization_status, model.categorized_doc_count, model.dead_category_count, model.failed_category_count, model.frequent_category_count, model.log_time, model.memory_limit, model.memory_status, model.over_fields, model.partition_fields, model.rare_category_count, model.timestamp, model.total_category_count, node.address, node.ephemeral_id, node.id, node.name, opened_time, state)

  • :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

  • :headers (Hash)

    Custom HTTP headers

See Also:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/elasticsearch/api/actions/cat/ml_jobs.rb', line 40

def ml_jobs(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_jobs' }

  defined_params = [:job_id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _job_id = arguments.delete(:job_id)

  method = Elasticsearch::API::HTTP_GET
  path   = if _job_id
             "_cat/ml/anomaly_detectors/#{Utils.__listify(_job_id)}"
           else
             '_cat/ml/anomaly_detectors'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#ml_trained_models(arguments = {}) ⇒ Object

Get trained models

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :model_id (String)

    The ID of the trained models stats to fetch

  • :allow_no_match (Boolean)

    Whether to ignore if a wildcard expression matches no trained models. (This includes ‘_all` string or when no trained models have been specified)

  • :from (Integer)

    skips a number of trained models

  • :size (Integer)

    specifies a max number of trained models to get

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :format (String)

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

  • :h (List)

    Comma-separated list of column names to display (options: create_time, created_by, data_frame_analytics_id, description, heap_size, id, ingest.count, ingest.current, ingest.failed, ingest.pipelines, ingest.time, license, operations, version)

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by (options: create_time, created_by, data_frame_analytics_id, description, heap_size, id, ingest.count, ingest.current, ingest.failed, ingest.pipelines, ingest.time, license, operations, version)

  • :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

  • :headers (Hash)

    Custom HTTP headers

See Also:



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/elasticsearch/api/actions/cat/ml_trained_models.rb', line 42

def ml_trained_models(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_trained_models' }

  defined_params = [:model_id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _model_id = arguments.delete(:model_id)

  method = Elasticsearch::API::HTTP_GET
  path   = if _model_id
             "_cat/ml/trained_models/#{Utils.__listify(_model_id)}"
           else
             '_cat/ml/trained_models'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#nodeattrs(arguments = {}) ⇒ Object

Get node attribute information

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :format (String)

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

  • :local (Boolean)

    Return local information, do not retrieve the state from master node (default: false)

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :h (List)

    Comma-separated list of column names to display (options: node, id, pid, host, ip, port, attr, value)

  • :help (Boolean)

    Return help information

  • :s (List)

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

  • :v (Boolean)

    Verbose mode. Display column headers

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :time (String)

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

  • :headers (Hash)

    Custom HTTP headers

See Also:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/elasticsearch/api/actions/cat/nodeattrs.rb', line 40

def nodeattrs(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.nodeattrs' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat/nodeattrs'
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#nodes(arguments = {}) ⇒ Object

Get node information

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, kb, mb, gb, tb, 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)

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :h (List)

    Comma-separated list of column names to display (options: build, completion.size, cpu, disk.avail, disk.total, disk.used, disk.used_percent, fielddata.evictions, fielddata.memory_size, file_desc.current, file_desc.max, file_desc.percent, flush.total, flush.total_time, get.current, get.exists_time, get.exists_total, get.missing_time, get.missing_total, get.time, get.total, heap.current, heap.max, heap.percent, http_address, id, indexing.delete_current, indexing.delete_time, indexing.delete_total, indexing.index_current, indexing.index_failed, indexing.index_failed_due_to_version_conflict, indexing.index_time, indexing.index_total, ip, jdk, load_1m, load_5m, load_15m, available_processors, mappings.total_count, mappings.total_estimated_overhead_in_bytes, master, merges.current, merges.current_docs, merges.current_size, merges.total, merges.total_docs, merges.total_size, merges.total_time, name, node.role, pid, port, query_cache.memory_size, query_cache.evictions, query_cache.hit_count, query_cache.miss_count, ram.current, ram.max, ram.percent, refresh.total, refresh.time, request_cache.memory_size, request_cache.evictions, request_cache.hit_count, request_cache.miss_count, script.compilations, script.cache_evictions, search.fetch_current, search.fetch_time, search.fetch_total, search.open_contexts, search.query_current, search.query_time, search.query_total, search.scroll_current, search.scroll_time, search.scroll_total, segments.count, segments.fixed_bitset_memory, segments.index_writer_memory, segments.memory, segments.version_map_memory, shard_stats.total_count, suggest.current, suggest.time, suggest.total, uptime, version)

  • :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

See Also:



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/elasticsearch/api/actions/cat/nodes.rb', line 41

def nodes(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.nodes' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat/nodes'
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h], escape: false) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#pending_tasks(arguments = {}) ⇒ Object

Get pending task information

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :format (String)

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

  • :local (Boolean)

    Return local information, do not retrieve the state from master node (default: false)

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :h (List)

    Comma-separated list of column names to display (options: insertOrder, timeInQueue, priority, source)

  • :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

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :headers (Hash)

    Custom HTTP headers

See Also:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/elasticsearch/api/actions/cat/pending_tasks.rb', line 40

def pending_tasks(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.pending_tasks' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat/pending_tasks'
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#plugins(arguments = {}) ⇒ Object

Get plugin information

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :format (String)

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

  • :local (Boolean)

    Return local information, do not retrieve the state from master node (default: false)

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :h (List)

    Comma-separated list of column names to display (options: id, name, component, version, description)

  • :help (Boolean)

    Return help information

  • :include_bootstrap (Boolean)

    Include bootstrap plugins in the response

  • :s (List)

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

  • :v (Boolean)

    Verbose mode. Display column headers

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :time (String)

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

  • :headers (Hash)

    Custom HTTP headers

See Also:



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/elasticsearch/api/actions/cat/plugins.rb', line 41

def plugins(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.plugins' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat/plugins'
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#recovery(arguments = {}) ⇒ Object

Get shard recovery information

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :index (List)

    Comma-separated list or wildcard expression of index names to limit the returned information

  • :format (String)

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

  • :active_only (Boolean)

    If ‘true`, the response only includes ongoing shard recoveries

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :detailed (Boolean)

    If ‘true`, the response includes detailed information about shard recoveries

  • :h (List)

    Comma-separated list of column names to display (options: index, shard, start_time, start_time_millis, stop_time, stop_time_millis, time, type, stage, source_host, source_node, target_host, target_node, repository, snapshot, files, files_recovered, files_percent, files_total, bytes, bytes_recovered, bytes_percent, bytes_total, translog_ops, translog_ops_recovered, translog_ops_percent)

  • :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

  • :headers (Hash)

    Custom HTTP headers

See Also:



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/elasticsearch/api/actions/cat/recovery.rb', line 41

def recovery(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.recovery' }

  defined_params = [:index].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  _index = arguments.delete(:index)

  method = Elasticsearch::API::HTTP_GET
  path   = if _index
             "_cat/recovery/#{Utils.__listify(_index)}"
           else
             '_cat/recovery'
           end
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#repositories(arguments = {}) ⇒ Object

Get snapshot repository information

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :format (String)

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

  • :local (Boolean)

    Return local information, do not retrieve the state from master node

  • :master_timeout (Time)

    Explicit operation timeout for connection to master 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

  • :v (Boolean)

    Verbose mode. Display column headers

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :time (String)

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

  • :headers (Hash)

    Custom HTTP headers

See Also:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/elasticsearch/api/actions/cat/repositories.rb', line 40

def repositories(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.repositories' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat/repositories'
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#segments(arguments = {}) ⇒ Object

Get segment information

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :index (List)

    A comma-separated list of index names to limit the returned information

  • :format (String)

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

  • :local (Boolean)

    Return local information, do not retrieve the state from master node (default: false)

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :h (List)

    Comma-separated list of column names to display (options: index, shard, prirep, ip, segment, generation, docs.count, docs.deleted, size, size.memory, committed, searchable, version, compound, id)

  • :help (Boolean)

    Return help information

  • :s (List)

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

  • :v (Boolean)

    Verbose mode. Display column headers

  • :time (String)

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

  • :ignore_unavailable (Boolean)

    Whether specified concrete indices should be ignored when unavailable (missing or closed). Only allowed when providing an index expression.

  • :ignore_throttled (Boolean)

    Whether specified concrete, expanded or aliased indices should be ignored when throttled. Only allowed when providing an index expression.

  • :allow_no_indices (Boolean)

    Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes ‘_all` string or when no indices have been specified). Only allowed when providing an index expression.

  • :expand_wildcards (List)

    Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all)

  • :allow_closed (Boolean)

    If true, allow closed indices to be returned in the response otherwise if false, keep the legacy behaviour of throwing an exception if index pattern matches closed indices

  • :headers (Hash)

    Custom HTTP headers

See Also:



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/elasticsearch/api/actions/cat/segments.rb', line 46

def segments(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.segments' }

  defined_params = [:index].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  _index = arguments.delete(:index)

  method = Elasticsearch::API::HTTP_GET
  path   = if _index
             "_cat/segments/#{Utils.__listify(_index)}"
           else
             '_cat/segments'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#shards(arguments = {}) ⇒ Object

Get shard information

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :index (List)

    A comma-separated list of index names to limit the returned information

  • :format (String)

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

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :h (List)

    Comma-separated list of column names to display (options: completion.size, dataset.size, dense_vector.value_count, docs, fielddata.evictions, fielddata.memory_size, flush.total, flush.total_time, get.current, get.exists_time, get.exists_total, get.missing_time, get.missing_total, get.time, get.total, id, index, indexing.delete_current, indexing.delete_time, indexing.delete_total, indexing.index_current, indexing.index_failed_due_to_version_conflict, indexing.index_failed, indexing.index_time, indexing.index_total, ip, merges.current, merges.current_docs, merges.current_size, merges.total, merges.total_docs, merges.total_size, merges.total_time, node, prirep, query_cache.evictions, query_cache.memory_size, recoverysource.type, refresh.time, refresh.total, search.fetch_current, search.fetch_time, search.fetch_total, search.open_contexts, search.query_current, search.query_time, search.query_total, search.scroll_current, search.scroll_time, search.scroll_total, segments.count, segments.fixed_bitset_memory, segments.index_writer_memory, segments.memory, segments.version_map_memory, seq_no.global_checkpoint, seq_no.local_checkpoint, seq_no.max, shard, dsparse_vector.value_count, state, store, suggest.current, suggest.time, suggest.total, sync_id, unassigned.at, unassigned.details, unassigned.for, unassigned.reason)

  • :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

  • :headers (Hash)

    Custom HTTP headers

See Also:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/elasticsearch/api/actions/cat/shards.rb', line 40

def shards(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.shards' }

  defined_params = [:index].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  _index = arguments.delete(:index)

  method = Elasticsearch::API::HTTP_GET
  path   = if _index
             "_cat/shards/#{Utils.__listify(_index)}"
           else
             '_cat/shards'
           end
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#snapshots(arguments = {}) ⇒ Object

Get snapshot information

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :repository (List)

    Name of repository from which to fetch the snapshot information

  • :format (String)

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

  • :ignore_unavailable (Boolean)

    Set to true to ignore unavailable snapshots

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :h (List)

    Comma-separated list of column names to display (options: id, repository, status, start_epoch, start_time, end_epoch, end_time, duration, indices, successful_shards, failed_shards, total_shards, reason)

  • :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

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :headers (Hash)

    Custom HTTP headers

See Also:



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/elasticsearch/api/actions/cat/snapshots.rb', line 41

def snapshots(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.snapshots' }

  defined_params = [:repository].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _repository = arguments.delete(:repository)

  method = Elasticsearch::API::HTTP_GET
  path   = if _repository
             "_cat/snapshots/#{Utils.__listify(_repository)}"
           else
             '_cat/snapshots'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#tasks(arguments = {}) ⇒ Object

Get task information This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :format (String)

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

  • :nodes (List)

    A comma-separated list of node IDs or names to limit the returned information; use ‘_local` to return information from the node you’re connecting to, leave empty to get information from all nodes

  • :actions (List)

    A comma-separated list of actions that should be returned. Leave empty to return all.

  • :detailed (Boolean)

    Return detailed task information (default: false)

  • :parent_task_id (String)

    Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.

  • :h (List)

    Comma-separated list of column names to display (options: id, action, task_id, parent_task_id, type, start_time, timestamp, running_time_ns, running_time, node_id, ip, port, node, version, x_opaque_id)

  • :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

  • :timeout (Time)

    Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • :wait_for_completion (Boolean)

    If ‘true`, the request blocks until the task has completed.

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :headers (Hash)

    Custom HTTP headers

See Also:



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/elasticsearch/api/actions/cat/tasks.rb', line 48

def tasks(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.tasks' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat/tasks'
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#templates(arguments = {}) ⇒ Object

Get index template information

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :name (String)

    A pattern that returned template names must match

  • :format (String)

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

  • :local (Boolean)

    Return local information, do not retrieve the state from master node (default: false)

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :h (List)

    Comma-separated list of column names to display (options: name, index_patterns, order, version, composed_of)

  • :help (Boolean)

    Return help information

  • :s (List)

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

  • :v (Boolean)

    Verbose mode. Display column headers

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :time (String)

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

  • :headers (Hash)

    Custom HTTP headers

See Also:



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/elasticsearch/api/actions/cat/templates.rb', line 41

def templates(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.templates' }

  defined_params = [:name].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _name = arguments.delete(:name)

  method = Elasticsearch::API::HTTP_GET
  path   = if _name
             "_cat/templates/#{Utils.__listify(_name)}"
           else
             '_cat/templates'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#thread_pool(arguments = {}) ⇒ Object

Get thread pool statistics

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :thread_pool_patterns (List)

    A comma-separated list of regular-expressions to filter the thread pools in the output

  • :format (String)

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

  • :time (String)

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

  • :local (Boolean)

    Return local information, do not retrieve the state from master node (default: false)

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :h (List)

    Comma-separated list of column names to display (options: active, completed, core, ephemeral_id, host, ip, keep_alive, largest, max, name, node_id, node_name, pid, pool_size, port, queue, queue_size, rejected, size, type)

  • :help (Boolean)

    Return help information

  • :s (List)

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

  • :v (Boolean)

    Verbose mode. Display column headers

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :headers (Hash)

    Custom HTTP headers

See Also:



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/elasticsearch/api/actions/cat/thread_pool.rb', line 41

def thread_pool(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.thread_pool' }

  defined_params = [:thread_pool_patterns].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _thread_pool_patterns = arguments.delete(:thread_pool_patterns)

  method = Elasticsearch::API::HTTP_GET
  path   = if _thread_pool_patterns
             "_cat/thread_pool/#{Utils.__listify(_thread_pool_patterns)}"
           else
             '_cat/thread_pool'
           end
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#transforms(arguments = {}) ⇒ Object

Get transform information

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :transform_id (String)

    The id of the transform for which to get stats. ‘_all’ or ‘*’ implies all transforms

  • :from (Integer)

    skips a number of transform configs, defaults to 0

  • :size (Integer)

    specifies a max number of transforms to get, defaults to 100

  • :allow_no_match (Boolean)

    Whether to ignore if a wildcard expression matches no transforms. (This includes ‘_all` string or when no transforms have been specified)

  • :format (String)

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

  • :h (List)

    Comma-separated list of column names to display (options: changes_last_detection_time, checkpoint, checkpoint_duration_time_exp_avg, checkpoint_progress, create_time, delete_time, description, dest_index, documents_deleted, documents_indexed, docs_per_second, documents_processed, frequency, id, index_failure, index_time, index_total, indexed_documents_exp_avg, last_search_time, max_page_search_size, pages_processed, pipeline, processed_documents_exp_avg, processing_time, reason, search_failure, search_time, search_total, source_index, state, transform_type, trigger_count, version)

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by (options: changes_last_detection_time, checkpoint, checkpoint_duration_time_exp_avg, checkpoint_progress, create_time, delete_time, description, dest_index, documents_deleted, documents_indexed, docs_per_second, documents_processed, frequency, id, index_failure, index_time, index_total, indexed_documents_exp_avg, last_search_time, max_page_search_size, pages_processed, pipeline, processed_documents_exp_avg, processing_time, reason, search_failure, search_time, search_total, source_index, state, transform_type, trigger_count, version)

  • :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

  • :bytes (String)

    The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)

  • :headers (Hash)

    Custom HTTP headers

See Also:



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/elasticsearch/api/actions/cat/transforms.rb', line 42

def transforms(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.transforms' }

  defined_params = [:transform_id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _transform_id = arguments.delete(:transform_id)

  method = Elasticsearch::API::HTTP_GET
  path   = if _transform_id
             "_cat/transforms/#{Utils.__listify(_transform_id)}"
           else
             '_cat/transforms'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end