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/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/recovery.rb,
lib/elasticsearch/api/actions/cat/fielddata.rb,
lib/elasticsearch/api/actions/cat/allocation.rb,
lib/elasticsearch/api/actions/cat/thread_pool.rb,
lib/elasticsearch/api/actions/cat/pending_tasks.rb
Instance Method Summary collapse
-
#aliases(arguments = {}) ⇒ Object
Returns information about aliases, including associated routing values and filters.
-
#allocation(arguments = {}) ⇒ Object
Return shard allocation information.
-
#count(arguments = {}) ⇒ Object
Return document counts for the entire cluster or specific indices.
-
#fielddata(arguments = {}) ⇒ Object
Return information about field data usage across the cluster.
-
#health(arguments = {}) ⇒ Object
Display a terse version of the Elasticsearch::API::Cluster::Actions#health API output.
-
#help(arguments = {}) ⇒ Object
Help information for the Cat API.
-
#indices(arguments = {}) ⇒ Object
Return the most important statistics about indices, across the cluster nodes.
-
#master(arguments = {}) ⇒ Object
Display basic information about the master node.
-
#nodes(arguments = {}) ⇒ Object
Display information about cluster topology and nodes statistics.
-
#pending_tasks(arguments = {}) ⇒ Object
Display the information from the Elasticsearch::API::Cluster::Actions#pending_tasks API in a tabular format.
-
#recovery(arguments = {}) ⇒ Object
Display information about the recovery process (allocating shards).
-
#shards(arguments = {}) ⇒ Object
Display shard allocation across nodes.
-
#thread_pool(arguments = {}) ⇒ Object
Display thread pool statistics across nodes (use the ‘help` parameter to display a list of avaialable thread pools).
Instance Method Details
#aliases(arguments = {}) ⇒ Object
Returns information about aliases, including associated routing values and filters.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# 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 = '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 |
#allocation(arguments = {}) ⇒ Object
Return shard allocation information
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/allocation.rb', line 44 def allocation(arguments={}) valid_params = [ :bytes, :local, :master_timeout, :h, :help, :v ] node_id = arguments.delete(:node_id) method = '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 |
#count(arguments = {}) ⇒ Object
Return document counts for the entire cluster or specific indices
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# 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 = '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 |
#fielddata(arguments = {}) ⇒ Object
Return information about field data usage across the cluster
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# 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 = '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 |
#health(arguments = {}) ⇒ Object
Display a terse version of the Elasticsearch::API::Cluster::Actions#health API output
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/elasticsearch/api/actions/cat/health.rb', line 31 def health(arguments={}) valid_params = [ :local, :master_timeout, :h, :help, :ts, :v ] method = '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(arguments = {}) ⇒ Object
Help information for the Cat API
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/elasticsearch/api/actions/cat/help.rb', line 12 def help(arguments={}) valid_params = [ :help ] method = 'GET' path = "_cat" params = Utils.__validate_and_extract_params arguments, valid_params body = nil perform_request(method, path, params, body).body end |
#indices(arguments = {}) ⇒ Object
Return the most important statistics about indices, across the cluster nodes
Use the ‘help` parameter to display available statistics.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# 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 = '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 |
#master(arguments = {}) ⇒ Object
Display basic information about the master node
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/elasticsearch/api/actions/cat/master.rb', line 30 def master(arguments={}) valid_params = [ :local, :master_timeout, :h, :help, :v ] method = 'GET' path = "_cat/master" params = Utils.__validate_and_extract_params arguments, valid_params body = nil perform_request(method, path, params, body).body end |
#nodes(arguments = {}) ⇒ Object
Display information about cluster topology and nodes statistics
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/elasticsearch/api/actions/cat/nodes.rb', line 38 def nodes(arguments={}) valid_params = [ :local, :master_timeout, :h, :help, :v ] method = '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 |
#pending_tasks(arguments = {}) ⇒ Object
Display the information from the Elasticsearch::API::Cluster::Actions#pending_tasks API in a tabular format
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/elasticsearch/api/actions/cat/pending_tasks.rb', line 30 def pending_tasks(arguments={}) valid_params = [ :local, :master_timeout, :h, :help, :v ] method = '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 |
#recovery(arguments = {}) ⇒ Object
Display information about the recovery process (allocating shards)
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# 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 = '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 |
#shards(arguments = {}) ⇒ Object
Display shard allocation across nodes
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/shards.rb', line 48 def shards(arguments={}) valid_params = [ :local, :master_timeout, :h, :help, :v ] index = arguments.delete(:index) method = '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 |
#thread_pool(arguments = {}) ⇒ Object
Display thread pool statistics across nodes (use the ‘help` parameter to display a list of avaialable thread pools)
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# 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 = '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 |