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/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/thread_pool.rb,
lib/elasticsearch/api/actions/cat/repositories.rb,
lib/elasticsearch/api/actions/cat/pending_tasks.rb,
lib/elasticsearch/api/actions/cat/params_registry.rb
Defined Under Namespace
Modules: ParamsRegistry
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.
-
#nodeattrs(arguments = {}) ⇒ Object
Display custom node attributes.
-
#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.
-
#plugins(arguments = {}) ⇒ Object
Return information about installed plugins.
-
#recovery(arguments = {}) ⇒ Object
Display information about the recovery process (allocating shards).
-
#repositories(arguments = {}) ⇒ Object
Shows all repositories registered in a cluster.
-
#segments(arguments = {}) ⇒ Object
Display information about the segments in the shards of an index.
-
#shards(arguments = {}) ⇒ Object
Display shard allocation across nodes.
-
#snapshots(arguments = {}) ⇒ Object
Shows all snapshots that belong to a specific repository.
-
#tasks(arguments = {}) ⇒ Object
Return currently running tasks.
-
#templates(arguments = {}) ⇒ Object
Returns information about existing templates.
-
#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.
52 53 54 55 56 57 58 59 60 |
# File 'lib/elasticsearch/api/actions/cat/aliases.rb', line 52 def aliases(arguments={}) name = arguments.delete(:name) method = HTTP_GET path = Utils.__pathify '_cat/aliases', Utils.__listify(name) params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) 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
49 50 51 52 53 54 55 56 57 |
# File 'lib/elasticsearch/api/actions/cat/allocation.rb', line 49 def allocation(arguments={}) 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, ParamsRegistry.get(__method__) 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
44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/elasticsearch/api/actions/cat/count.rb', line 44 def count(arguments={}) index = arguments.delete(:index) method = HTTP_GET path = Utils.__pathify '_cat/count', Utils.__listify(index) params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) 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
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/elasticsearch/api/actions/cat/fielddata.rb', line 32 def fielddata(arguments={}) fields = arguments.delete(:fields) method = HTTP_GET path = Utils.__pathify "_cat/fielddata", Utils.__listify(fields) params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) 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
36 37 38 39 40 41 42 43 44 |
# File 'lib/elasticsearch/api/actions/cat/health.rb', line 36 def health(arguments={}) method = HTTP_GET path = "_cat/health" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) 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
16 17 18 19 20 21 22 23 |
# File 'lib/elasticsearch/api/actions/cat/help.rb', line 16 def help(arguments={}) method = HTTP_GET path = "_cat" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) 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.
58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/elasticsearch/api/actions/cat/indices.rb', line 58 def indices(arguments={}) index = arguments.delete(:index) method = HTTP_GET path = Utils.__pathify '_cat/indices', Utils.__listify(index) params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) 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
35 36 37 38 39 40 41 42 |
# File 'lib/elasticsearch/api/actions/cat/master.rb', line 35 def master(arguments={}) method = HTTP_GET path = "_cat/master" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body).body end |
#nodeattrs(arguments = {}) ⇒ Object
Display custom node attributes
21 22 23 24 25 26 27 28 |
# File 'lib/elasticsearch/api/actions/cat/nodeattrs.rb', line 21 def nodeattrs(arguments={}) method = 'GET' path = "_cat/nodeattrs" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body).body end |
#nodes(arguments = {}) ⇒ Object
Display information about cluster topology and nodes statistics
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/elasticsearch/api/actions/cat/nodes.rb', line 44 def nodes(arguments={}) method = HTTP_GET path = "_cat/nodes" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) params[:h] = Utils.__listify(params[:h], :escape => false) if params[:h] body = nil perform_request(method, path, params, body).body end |
#pending_tasks(arguments = {}) ⇒ Object
Display the information from the Elasticsearch::API::Cluster::Actions#pending_tasks API in a tabular format
35 36 37 38 39 40 41 42 43 |
# File 'lib/elasticsearch/api/actions/cat/pending_tasks.rb', line 35 def pending_tasks(arguments={}) method = HTTP_GET path = "_cat/pending_tasks" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) params[:h] = Utils.__listify(params[:h]) if params[:h] body = nil perform_request(method, path, params, body).body end |
#plugins(arguments = {}) ⇒ Object
Return information about installed plugins
22 23 24 25 26 27 28 29 |
# File 'lib/elasticsearch/api/actions/cat/plugins.rb', line 22 def plugins(arguments={}) method = 'GET' path = "_cat/plugins" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body).body end |
#recovery(arguments = {}) ⇒ Object
Display information about the recovery process (allocating shards)
53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/elasticsearch/api/actions/cat/recovery.rb', line 53 def recovery(arguments={}) index = arguments.delete(:index) method = HTTP_GET path = Utils.__pathify '_cat/recovery', Utils.__listify(index) params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) params[:h] = Utils.__listify(params[:h]) if params[:h] body = nil perform_request(method, path, params, body).body end |
#repositories(arguments = {}) ⇒ Object
Shows all repositories registered in a cluster
28 29 30 31 32 33 34 35 |
# File 'lib/elasticsearch/api/actions/cat/repositories.rb', line 28 def repositories(arguments={}) method = HTTP_GET path = "_cat/repositories" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body).body end |
#segments(arguments = {}) ⇒ Object
Display information about the segments in the shards of an index
25 26 27 28 29 30 31 32 |
# File 'lib/elasticsearch/api/actions/cat/segments.rb', line 25 def segments(arguments={}) method = 'GET' path = "_cat/segments" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body).body end |
#shards(arguments = {}) ⇒ Object
Display shard allocation across nodes
57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/elasticsearch/api/actions/cat/shards.rb', line 57 def shards(arguments={}) index = arguments.delete(:index) method = HTTP_GET path = Utils.__pathify '_cat/shards', Utils.__listify(index) params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) params[:h] = Utils.__listify(params[:h]) if params[:h] body = nil perform_request(method, path, params, body).body end |
#snapshots(arguments = {}) ⇒ Object
Shows all snapshots that belong to a specific repository
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/elasticsearch/api/actions/cat/snapshots.rb', line 28 def snapshots(arguments={}) repository = arguments.delete(:repository) method = HTTP_GET path = Utils.__pathify "_cat/snapshots", Utils.__escape(repository) params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body).body end |
#tasks(arguments = {}) ⇒ Object
Return currently running tasks
25 26 27 28 29 30 31 32 |
# File 'lib/elasticsearch/api/actions/cat/tasks.rb', line 25 def tasks(arguments={}) method = 'GET' path = "_cat/tasks" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body).body end |
#templates(arguments = {}) ⇒ Object
Returns information about existing templates
23 24 25 26 27 28 29 30 |
# File 'lib/elasticsearch/api/actions/cat/templates.rb', line 23 def templates(arguments={}) method = HTTP_GET path = "_cat/templates" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) 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)
45 46 47 48 49 50 51 52 53 |
# File 'lib/elasticsearch/api/actions/cat/thread_pool.rb', line 45 def thread_pool(arguments={}) method = HTTP_GET path = "_cat/thread_pool" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) params[:h] = Utils.__listify(params[:h]) if params[:h] body = nil perform_request(method, path, params, body).body end |