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
-
#aliases(arguments = {}) ⇒ Object
Shows information about currently configured aliases to indices including filter and routing infos.
-
#allocation(arguments = {}) ⇒ Object
Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using.
-
#component_templates(arguments = {}) ⇒ Object
Returns information about existing component_templates templates.
-
#count(arguments = {}) ⇒ Object
Provides quick access to the document count of the entire cluster, or individual indices.
-
#fielddata(arguments = {}) ⇒ Object
Shows how much heap memory is currently being used by fielddata on every data node in the cluster.
-
#health(arguments = {}) ⇒ Object
Returns a concise representation of the cluster health.
-
#help(arguments = {}) ⇒ Object
Returns help for the Cat APIs.
-
#indices(arguments = {}) ⇒ Object
Returns information about indices: number of primaries and replicas, document counts, disk size, …
-
#master(arguments = {}) ⇒ Object
Returns information about the master node.
-
#ml_data_frame_analytics(arguments = {}) ⇒ Object
Gets configuration and usage information about data frame analytics jobs.
-
#ml_datafeeds(arguments = {}) ⇒ Object
Gets configuration and usage information about datafeeds.
-
#ml_jobs(arguments = {}) ⇒ Object
Gets configuration and usage information about anomaly detection jobs.
-
#ml_trained_models(arguments = {}) ⇒ Object
Gets configuration and usage information about inference trained models.
-
#nodeattrs(arguments = {}) ⇒ Object
Returns information about custom node attributes.
-
#nodes(arguments = {}) ⇒ Object
Returns basic statistics about performance of cluster nodes.
-
#pending_tasks(arguments = {}) ⇒ Object
Returns a concise representation of the cluster pending tasks.
-
#plugins(arguments = {}) ⇒ Object
Returns information about installed plugins across nodes node.
-
#recovery(arguments = {}) ⇒ Object
Returns information about index shard recoveries, both on-going completed.
-
#repositories(arguments = {}) ⇒ Object
Returns information about snapshot repositories registered in the cluster.
-
#segments(arguments = {}) ⇒ Object
Provides low-level information about the segments in the shards of an index.
-
#shards(arguments = {}) ⇒ Object
Provides a detailed view of shard allocation on nodes.
-
#snapshots(arguments = {}) ⇒ Object
Returns all snapshots in a specific repository.
-
#tasks(arguments = {}) ⇒ Object
Returns information about the tasks currently executing on one or more nodes in the cluster.
-
#templates(arguments = {}) ⇒ Object
Returns information about existing templates.
-
#thread_pool(arguments = {}) ⇒ Object
Returns cluster-wide thread pool statistics per node.
-
#transforms(arguments = {}) ⇒ Object
Gets configuration and usage information about transforms.
Instance Method Details
#aliases(arguments = {}) ⇒ Object
Shows information about currently configured aliases to indices including filter and routing infos.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/elasticsearch/api/actions/cat/aliases.rb', line 36 def aliases(arguments = {}) 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) ) end |
#allocation(arguments = {}) ⇒ Object
Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/elasticsearch/api/actions/cat/allocation.rb', line 37 def allocation(arguments = {}) 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) ) end |
#component_templates(arguments = {}) ⇒ Object
Returns information about existing component_templates templates.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/elasticsearch/api/actions/cat/component_templates.rb', line 36 def component_templates(arguments = {}) 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) ) end |
#count(arguments = {}) ⇒ Object
Provides quick access to the document count of the entire cluster, or individual indices.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/elasticsearch/api/actions/cat/count.rb', line 34 def count(arguments = {}) 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) ) end |
#fielddata(arguments = {}) ⇒ Object
Shows how much heap memory is currently being used by fielddata on every data node in the cluster.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/elasticsearch/api/actions/cat/fielddata.rb', line 35 def fielddata(arguments = {}) 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) ) end |
#health(arguments = {}) ⇒ Object
Returns a concise representation of the cluster health.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/elasticsearch/api/actions/cat/health.rb', line 35 def health(arguments = {}) 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) ) end |
#help(arguments = {}) ⇒ Object
Returns help for the Cat APIs.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/elasticsearch/api/actions/cat/help.rb', line 30 def help(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil method = Elasticsearch::API::HTTP_GET path = "_cat" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers) ) end |
#indices(arguments = {}) ⇒ Object
Returns information about indices: number of primaries and replicas, document counts, disk size, …
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/elasticsearch/api/actions/cat/indices.rb', line 41 def indices(arguments = {}) 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) ) end |
#master(arguments = {}) ⇒ Object
Returns information about the master node.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/elasticsearch/api/actions/cat/master.rb', line 35 def master(arguments = {}) 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) ) end |
#ml_data_frame_analytics(arguments = {}) ⇒ Object
Gets configuration and usage information about data frame analytics jobs.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb', line 37 def ml_data_frame_analytics(arguments = {}) 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) ) end |
#ml_datafeeds(arguments = {}) ⇒ Object
Gets configuration and usage information about datafeeds.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/elasticsearch/api/actions/cat/ml_datafeeds.rb', line 36 def ml_datafeeds(arguments = {}) 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) ) end |
#ml_jobs(arguments = {}) ⇒ Object
Gets configuration and usage information about anomaly detection jobs.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/elasticsearch/api/actions/cat/ml_jobs.rb', line 37 def ml_jobs(arguments = {}) 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) ) end |
#ml_trained_models(arguments = {}) ⇒ Object
Gets configuration and usage information about inference trained models.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/elasticsearch/api/actions/cat/ml_trained_models.rb', line 39 def ml_trained_models(arguments = {}) 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) ) end |
#nodeattrs(arguments = {}) ⇒ Object
Returns information about custom node attributes.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/elasticsearch/api/actions/cat/nodeattrs.rb', line 35 def nodeattrs(arguments = {}) 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) ) end |
#nodes(arguments = {}) ⇒ Object
Returns basic statistics about performance of cluster nodes.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/elasticsearch/api/actions/cat/nodes.rb', line 38 def nodes(arguments = {}) 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) ) end |
#pending_tasks(arguments = {}) ⇒ Object
Returns a concise representation of the cluster pending tasks.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/elasticsearch/api/actions/cat/pending_tasks.rb', line 36 def pending_tasks(arguments = {}) 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) ) end |
#plugins(arguments = {}) ⇒ Object
Returns information about installed plugins across nodes node.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/elasticsearch/api/actions/cat/plugins.rb', line 36 def plugins(arguments = {}) 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) ) end |
#recovery(arguments = {}) ⇒ Object
Returns information about index shard recoveries, both on-going completed.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/elasticsearch/api/actions/cat/recovery.rb', line 38 def recovery(arguments = {}) 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) ) end |
#repositories(arguments = {}) ⇒ Object
Returns information about snapshot repositories registered in the cluster.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/elasticsearch/api/actions/cat/repositories.rb', line 35 def repositories(arguments = {}) 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) ) end |
#segments(arguments = {}) ⇒ Object
Provides low-level information about the segments in the shards of an index.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/elasticsearch/api/actions/cat/segments.rb', line 35 def segments(arguments = {}) 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) ) end |
#shards(arguments = {}) ⇒ Object
Provides a detailed view of shard allocation on nodes.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/elasticsearch/api/actions/cat/shards.rb', line 37 def shards(arguments = {}) 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) ) end |
#snapshots(arguments = {}) ⇒ Object
Returns all snapshots in a specific repository.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/elasticsearch/api/actions/cat/snapshots.rb', line 37 def snapshots(arguments = {}) 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) ) end |
#tasks(arguments = {}) ⇒ Object
Returns information about the tasks currently executing on one or more nodes in the cluster. 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.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/elasticsearch/api/actions/cat/tasks.rb', line 42 def tasks(arguments = {}) 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) ) end |
#templates(arguments = {}) ⇒ Object
Returns information about existing templates.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/elasticsearch/api/actions/cat/templates.rb', line 36 def templates(arguments = {}) 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) ) end |
#thread_pool(arguments = {}) ⇒ Object
Returns cluster-wide thread pool statistics per node. By default the active, queue and rejected statistics are returned for all thread pools.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/elasticsearch/api/actions/cat/thread_pool.rb', line 38 def thread_pool(arguments = {}) 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) ) end |
#transforms(arguments = {}) ⇒ Object
Gets configuration and usage information about transforms.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/elasticsearch/api/actions/cat/transforms.rb', line 38 def transforms(arguments = {}) 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) ) end |