Returns information about aliases, including associated routing values and filters.
@example Display all aliases in the cluster
puts client.cat.aliases
@example Display indices for the 'year-2013' alias
puts client.cat.aliases name: 'year-2013'
@example Display header names in the output
puts client.cat.aliases v: true
@example Return only the 'alias' and 'index' columns
puts client.cat.aliases h: ['alias', 'index']
@example Return only the 'alias' and 'index' columns, using short names
puts client.cat.aliases h: 'a,i'
@example Return the information as Ruby objects
client.cat.aliases format: 'json'
@option arguments [List] :name A comma-separated list of alias names to return @option arguments [List] :h Comma-separated list of column names to display – see the `help` argument @option arguments [Boolean] :v Display column headers as part of the output @option arguments [String] :format The output format. Options: 'text', 'json'; default: 'text' @option arguments [Boolean] :help Return information about headers @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
(default: false)
@option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
@see www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-aliases.html
# File lib/elasticsearch/api/actions/cat/aliases.rb, line 43 def aliases(arguments={}) valid_params = [ :local, :master_timeout, :h, :help, :v ] name = arguments.delete(:name) method = HTTP_GET path = Utils.__pathify '_cat/aliases', Utils.__listify(name) params = Utils.__validate_and_extract_params arguments, valid_params params[:h] = Utils.__listify(params[:h]) if params[:h] body = nil perform_request(method, path, params, body).body end
Return shard allocation information
@example Display allocation for all nodes in the cluster
puts client.cat.allocation
@example Display allocation for node with name 'node-1'
puts client.cat.allocation node_id: 'node-1'
@example Display header names in the output
puts client.cat.allocation v: true
@example Display only specific columns in the output (see the `help` parameter)
puts client.cat.allocation h: ['node', 'shards', 'disk.percent']
@example Display only specific columns in the output, using the short names
puts client.cat.allocation h: 'n,s,dp'
@example Return the information as Ruby objects
client.cat.allocation format: 'json'
@option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information @option arguments [String] :bytes The unit in which to display byte values (options: b, k, m, g) @option arguments [List] :h Comma-separated list of column names to display – see the `help` argument @option arguments [Boolean] :v Display column headers as part of the output @option arguments [String] :format The output format. Options: 'text', 'json'; default: 'text' @option arguments [Boolean] :help Return information about headers @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
(default: false)
@option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
@see www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-allocation.html
# File lib/elasticsearch/api/actions/cat/allocation.rb, line 44 def allocation(arguments={}) valid_params = [ :bytes, :local, :master_timeout, :h, :help, :v ] node_id = arguments.delete(:node_id) method = HTTP_GET path = Utils.__pathify '_cat/allocation', Utils.__listify(node_id) params = Utils.__validate_and_extract_params arguments, valid_params params[:h] = Utils.__listify(params[:h]) if params[:h] body = nil perform_request(method, path, params, body).body end
Return document counts for the entire cluster or specific indices
@example Display number of documents in the cluster
puts client.cat.count
@example Display number of documents in an index
puts client.cat.count index: 'index-a'
@example Display number of documents in a list of indices
puts client.cat.count index: ['index-a', 'index-b']
@example Display header names in the output
puts client.cat.count v: true
@example Return the information as Ruby objects
client.cat.count format: 'json'
@option arguments [List] :index A comma-separated list of index names to limit the returned information @option arguments [List] :h Comma-separated list of column names to display – see the `help` argument @option arguments [Boolean] :v Display column headers as part of the output @option arguments [String] :format The output format. Options: 'text', 'json'; default: 'text' @option arguments [Boolean] :help Return information about headers @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
(default: false)
@option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
@see www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-count.html
# File lib/elasticsearch/api/actions/cat/count.rb, line 39 def count(arguments={}) valid_params = [ :local, :master_timeout, :h, :help, :v ] index = arguments.delete(:index) method = HTTP_GET path = Utils.__pathify '_cat/count', Utils.__listify(index) params = Utils.__validate_and_extract_params arguments, valid_params params[:h] = Utils.__listify(params[:h]) if params[:h] body = nil perform_request(method, path, params, body).body end
Return information about field data usage across the cluster
@example Return the total size of field data
client.cat.fielddata
@example Return both the total size and size for specific fields
client.cat.fielddata fields: 'title,body'
@option arguments [List] :fields A comma-separated list of fields to include in the output @option arguments [String] :bytes The unit in which to display byte values (options: b, k, m, g) @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
(default: false)
@option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [Boolean] :v Verbose mode. Display column headers
@see www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-fielddata.html
# File lib/elasticsearch/api/actions/cat/fielddata.rb, line 27 def fielddata(arguments={}) valid_params = [ :bytes, :local, :master_timeout, :h, :help, :v, :fields ] fields = arguments.delete(:fields) method = HTTP_GET path = Utils.__pathify "_cat/fielddata", Utils.__listify(fields) params = Utils.__validate_and_extract_params arguments, valid_params body = nil perform_request(method, path, params, body).body end
Display a terse version of the {Elasticsearch::API::Cluster::Actions#health} API output
@example Display cluster health
puts client.cat.health
@example Display header names in the output
puts client.cat.health v: true
@example Return the information as Ruby objects
client.cat.health format: 'json'
@option arguments [Boolean] :ts Whether to display timestamp information @option arguments [List] :h Comma-separated list of column names to display – see the `help` argument @option arguments [Boolean] :v Display column headers as part of the output @option arguments [String] :format The output format. Options: 'text', 'json'; default: 'text' @option arguments [Boolean] :help Return information about headers @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
(default: false)
@option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
@see www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-health.html
# File lib/elasticsearch/api/actions/cat/health.rb, line 31 def health(arguments={}) valid_params = [ :local, :master_timeout, :h, :help, :ts, :v ] method = HTTP_GET path = "_cat/health" params = Utils.__validate_and_extract_params arguments, valid_params params[:h] = Utils.__listify(params[:h]) if params[:h] body = nil perform_request(method, path, params, body).body end
Help information for the Cat API
@option arguments [Boolean] :help Return help information
@see www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html
# File lib/elasticsearch/api/actions/cat/help.rb, line 12 def help(arguments={}) valid_params = [ :help ] method = HTTP_GET path = "_cat" params = Utils.__validate_and_extract_params arguments, valid_params body = nil perform_request(method, path, params, body).body end
Return the most important statistics about indices, across the cluster nodes
Use the `help` parameter to display available statistics.
@example Display information for all indices
puts client.cat.indices
@example Display information for a specific index
puts client.cat.indices index: 'index-a'
@example Display information for indices matching a pattern
puts client.cat.indices index: 'index-*'
@example Display header names in the output
puts client.cat.indices v: true
@example Display only specific columns in the output (see the `help` parameter)
puts client.cat.indices h: ['index', 'docs.count', 'fielddata.memory_size', 'filter_cache.memory_size']
@example Display only specific columns in the output, using the short names
puts client.cat.indices h: 'i,dc,ss,mt', v: true
@example Return the information as Ruby objects
client.cat.indices format: 'json'
@option arguments [List] :index A comma-separated list of index names to limit the returned information @option arguments [String] :bytes The unit in which to display byte values (options: b, k, m, g) @option arguments [Boolean] :pri Limit the returned information on primary shards only (default: false) @option arguments [List] :h Comma-separated list of column names to display – see the `help` argument @option arguments [Boolean] :v Display column headers as part of the output @option arguments [String] :format The output format. Options: 'text', 'json'; default: 'text' @option arguments [Boolean] :help Return information about headers @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
(default: false)
@option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
@see www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-indices.html
# File lib/elasticsearch/api/actions/cat/indices.rb, line 51 def indices(arguments={}) valid_params = [ :bytes, :local, :master_timeout, :h, :help, :pri, :v ] index = arguments.delete(:index) method = HTTP_GET path = Utils.__pathify '_cat/indices', Utils.__listify(index) params = Utils.__validate_and_extract_params arguments, valid_params params[:h] = Utils.__listify(params[:h]) if params[:h] body = nil perform_request(method, path, params, body).body end
Display basic information about the master node
@example
puts client.cat.master
@example Display header names in the output
puts client.cat.master v: true
@example Return the information as Ruby objects
client.cat.master format: 'json'
@option arguments [List] :h Comma-separated list of column names to display – see the `help` argument @option arguments [Boolean] :v Display column headers as part of the output @option arguments [String] :format The output format. Options: 'text', 'json'; default: 'text' @option arguments [Boolean] :help Return information about headers @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
(default: false)
@option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
@see www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-master.html
# File lib/elasticsearch/api/actions/cat/master.rb, line 30 def master(arguments={}) valid_params = [ :local, :master_timeout, :h, :help, :v ] method = HTTP_GET path = "_cat/master" params = Utils.__validate_and_extract_params arguments, valid_params body = nil perform_request(method, path, params, body).body end
Display information about cluster topology and nodes statistics
@example Display basic information about nodes in the cluster (host, node name, memory usage, master, etc.)
puts client.cat.nodes
@example Display header names in the output
puts client.cat.nodes v: true
@example Display only specific columns in the output (see the `help` parameter)
puts client.cat.nodes h: %w(name version jdk disk.avail heap.percent load merges.total_time), v: true
@example Display only specific columns in the output, using the short names
puts client.cat.nodes h: 'n,v,j,d,hp,l,mtt', v: true
@example Return the information as Ruby objects
client.cat.nodes format: 'json'
@option arguments [List] :h Comma-separated list of column names to display – see the `help` argument @option arguments [Boolean] :v Display column headers as part of the output @option arguments [String] :format The output format. Options: 'text', 'json'; default: 'text' @option arguments [Boolean] :help Return information about headers @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
(default: false)
@option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
@see www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-nodes.html
# File lib/elasticsearch/api/actions/cat/nodes.rb, line 38 def nodes(arguments={}) valid_params = [ :local, :master_timeout, :h, :help, :v ] method = HTTP_GET path = "_cat/nodes" params = Utils.__validate_and_extract_params arguments, valid_params params[:h] = Utils.__listify(params[:h]) if params[:h] body = nil perform_request(method, path, params, body).body end
Display the information from the {Cluster::Actions#pending_tasks} API in a tabular format
@example
puts client.cat.pending_tasks
@example Display header names in the output
puts client.cat.pending_tasks v: true
@example Return the information as Ruby objects
client.cat.pending_tasks format: 'json'
@option arguments [List] :h Comma-separated list of column names to display – see the `help` argument @option arguments [Boolean] :v Display column headers as part of the output @option arguments [String] :format The output format. Options: 'text', 'json'; default: 'text' @option arguments [Boolean] :help Return information about headers @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
(default: false)
@option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
@see www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-pending-tasks.html
# File lib/elasticsearch/api/actions/cat/pending_tasks.rb, line 30 def pending_tasks(arguments={}) valid_params = [ :local, :master_timeout, :h, :help, :v ] method = HTTP_GET path = "_cat/pending_tasks" params = Utils.__validate_and_extract_params arguments, valid_params params[:h] = Utils.__listify(params[:h]) if params[:h] body = nil perform_request(method, path, params, body).body end
Display information about the recovery process (allocating shards)
@example Display information for all indices
puts client.cat.recovery
@example Display information for a specific index
puts client.cat.recovery index: 'index-a'
@example Display information for indices matching a pattern
puts client.cat.recovery index: 'index-*'
@example Display header names in the output
puts client.cat.recovery v: true
@example Display only specific columns in the output (see the `help` parameter)
puts client.cat.recovery h: ['node', 'index', 'shard', 'percent']
@example Display only specific columns in the output, using the short names
puts client.cat.recovery h: 'n,i,s,per'
@example Return the information as Ruby objects
client.cat.recovery format: 'json'
@option arguments [List] :index A comma-separated list of index names to limit the returned information @option arguments [String] :bytes The unit in which to display byte values (options: b, k, m, g) @option arguments [List] :h Comma-separated list of column names to display – see the `help` argument @option arguments [Boolean] :v Display column headers as part of the output @option arguments [String] :format The output format. Options: 'text', 'json'; default: 'text' @option arguments [Boolean] :help Return information about headers @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
(default: false)
@option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
@see www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-recovery.html
# File lib/elasticsearch/api/actions/cat/recovery.rb, line 48 def recovery(arguments={}) valid_params = [ :bytes, :local, :master_timeout, :h, :help, :v ] index = arguments.delete(:index) method = HTTP_GET path = Utils.__pathify '_cat/recovery', Utils.__listify(index) params = Utils.__validate_and_extract_params arguments, valid_params params[:h] = Utils.__listify(params[:h]) if params[:h] body = nil perform_request(method, path, params, body).body end
Display information about the segments in the shards of an index
@example Display information for all indices
puts client.cat.segments
@option arguments [List] :index A comma-separated list of index names to limit the returned information @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [Boolean] :v Verbose mode. Display column headers
@see www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-segments.html
# File lib/elasticsearch/api/actions/cat/segments.rb, line 19 def segments(arguments={}) valid_params = [ :h, :help, :v ] method = 'GET' path = "_cat/segments" params = Utils.__validate_and_extract_params arguments, valid_params body = nil perform_request(method, path, params, body).body end
Display shard allocation across nodes
@example Display information for all indices
puts client.cat.shards
@example Display information for a specific index
puts client.cat.shards index: 'index-a'
@example Display information for a list of indices
puts client.cat.shards index: ['index-a', 'index-b']
@example Display header names in the output
puts client.cat.shards v: true
@example Display only specific columns in the output (see the `help` parameter)
puts client.cat.shards h: ['node', 'index', 'shard', 'prirep', 'docs', 'store', 'merges.total']
@example Display only specific columns in the output, using the short names
puts client.cat.shards h: 'n,i,s,p,d,sto,mt'
@example Return the information as Ruby objects
client.cat.shards format: 'json'
@option arguments [List] :index A comma-separated list of index names to limit the returned information @option arguments [String] :bytes The unit in which to display byte values (options: b, k, m, g) @option arguments [List] :h Comma-separated list of column names to display – see the `help` argument @option arguments [Boolean] :v Display column headers as part of the output @option arguments [String] :format The output format. Options: 'text', 'json'; default: 'text' @option arguments [Boolean] :help Return information about headers @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
(default: false)
@option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
@see www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-shards.html
# File lib/elasticsearch/api/actions/cat/shards.rb, line 48 def shards(arguments={}) valid_params = [ :local, :master_timeout, :h, :help, :v ] index = arguments.delete(:index) method = HTTP_GET path = Utils.__pathify '_cat/shards', Utils.__listify(index) params = Utils.__validate_and_extract_params arguments, valid_params params[:h] = Utils.__listify(params[:h]) if params[:h] body = nil perform_request(method, path, params, body).body end
Display thread pool statistics across nodes (use the `help` parameter to display a list of avaialable thread pools)
@example Display information about all thread pools across nodes
puts client.cat.thread_pool
@example Display header names in the output
puts client.cat.thread_pool v: true
@example Display information about the indexing thread pool
puts client.cat.thread_pool h: %w(h ip index.active index.size index.queue index.rejected), v: true
@example Display information about the indexing and search threads, using the short names
puts client.cat.thread_pool h: 'host,ia,is,iq,ir,sa,ss,sq,sr', v: true
@option arguments [Boolean] :full_id Display the complete node ID @option arguments [List] :h Comma-separated list of column names to display – see the `help` argument @option arguments [Boolean] :v Display column headers as part of the output @option arguments [String] :format The output format. Options: 'text', 'json'; default: 'text' @option arguments [Boolean] :help Return information about headers @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
(default: false)
@option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
@see www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-thread-pool.html
# File lib/elasticsearch/api/actions/cat/thread_pool.rb, line 36 def thread_pool(arguments={}) valid_params = [ :full_id, :local, :master_timeout, :h, :help, :v ] method = HTTP_GET path = "_cat/thread_pool" params = Utils.__validate_and_extract_params arguments, valid_params params[:h] = Utils.__listify(params[:h]) if params[:h] body = nil perform_request(method, path, params, body).body end