module Elasticsearch::API::Nodes::Actions
Public Instance Methods
Removes the archived repositories metering information present 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.
@option arguments [List] :node_id Comma-separated list of node IDs or names used to limit returned information. @option arguments [Long] :max_archive_version Specifies the maximum archive_version to be cleared from the archive. @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.15/clear-repositories-metering-archive-api.html
# File lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb, line 34 def clear_repositories_metering_archive(arguments = {}) raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id] raise ArgumentError, "Required argument 'max_archive_version' missing" unless arguments[:max_archive_version] headers = arguments.delete(:headers) || {} arguments = arguments.clone _node_id = arguments.delete(:node_id) _max_archive_version = arguments.delete(:max_archive_version) method = Elasticsearch::API::HTTP_DELETE path = "_nodes/#{Utils.__listify(_node_id)}/_repositories_metering/#{Utils.__listify(_max_archive_version)}" params = {} body = nil perform_request(method, path, params, body, headers).body end
Returns cluster repositories metering 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.
@option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information. @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.15/get-repositories-metering-api.html
# File lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb, line 33 def get_repositories_metering_info(arguments = {}) raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _node_id = arguments.delete(:node_id) method = Elasticsearch::API::HTTP_GET path = "_nodes/#{Utils.__listify(_node_id)}/_repositories_metering" params = {} body = nil perform_request(method, path, params, body, headers).body end
Returns information about hot threads on each node in the cluster.
@option arguments [List] :node_id 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 @option arguments [Time] :interval The interval for the second sampling of threads @option arguments [Number] :snapshots Number of samples of thread stacktrace (default: 10) @option arguments [Number] :threads Specify the number of threads to provide information for (default: 3) @option arguments [Boolean] :ignore_idle_threads Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true) @option arguments [String] :type The type to sample (default: cpu) (options: cpu, wait, block) @option arguments [Time] :timeout Explicit operation timeout @option arguments [Hash] :headers Custom HTTP headers
*Deprecation notice*: The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons Deprecated since version 7.0.0
@see www.elastic.co/guide/en/elasticsearch/reference/7.15/cluster-nodes-hot-threads.html
# File lib/elasticsearch/api/actions/nodes/hot_threads.rb, line 40 def hot_threads(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _node_id = arguments.delete(:node_id) method = Elasticsearch::API::HTTP_GET path = if _node_id "_cluster/nodes/#{Utils.__listify(_node_id)}/hot_threads" else "_cluster/nodes/hot_threads" end params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Returns information about nodes in the cluster.
@option arguments [List] :node_id 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 @option arguments [List] :metric A comma-separated list of metrics you wish returned. Leave empty to return all. (options: settings, os, process, jvm, thread_pool, transport, http, plugins, ingest) @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) @option arguments [Time] :timeout Explicit operation timeout @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.15/cluster-nodes-info.html
# File lib/elasticsearch/api/actions/nodes/info.rb, line 32 def info(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _node_id = arguments.delete(:node_id) _metric = arguments.delete(:metric) method = Elasticsearch::API::HTTP_GET path = if _node_id && _metric "_nodes/#{Utils.__listify(_node_id)}/#{Utils.__listify(_metric)}" elsif _node_id "_nodes/#{Utils.__listify(_node_id)}" elsif _metric "_nodes/#{Utils.__listify(_metric)}" else "_nodes" end params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Reloads secure settings.
@option arguments [List] :node_id A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. @option arguments [Time] :timeout Explicit operation timeout @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body An object containing the password for the elasticsearch keystore
@see www.elastic.co/guide/en/elasticsearch/reference/7.15/secure-settings.html#reloadable-secure-settings
# File lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb, line 31 def reload_secure_settings(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _node_id = arguments.delete(:node_id) method = Elasticsearch::API::HTTP_POST path = if _node_id "_nodes/#{Utils.__listify(_node_id)}/reload_secure_settings" else "_nodes/reload_secure_settings" end params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Shutdown
one or all nodes
@example Shut down node named Bloke
client.nodes.shutdown node_id: 'Bloke'
@option arguments [List] :node_id A comma-separated list of node IDs or names to perform the operation on; use
`_local` to shutdown the node you're connected to, leave empty to shutdown all nodes
@option arguments [Time] :delay Set the delay for the operation (default: 1s) @option arguments [Boolean] :exit Exit the JVM as well (default: true)
@see elasticsearch.org/guide/reference/api/admin-cluster-nodes-shutdown/
# File lib/elasticsearch/api/actions/nodes/shutdown.rb, line 36 def shutdown(arguments = {}) method = HTTP_POST path = Utils.__pathify '_cluster/nodes', Utils.__listify(arguments[:node_id]), '_shutdown' params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body).body end
Returns statistical information about nodes in the cluster.
@option arguments [List] :node_id 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 @option arguments [List] :metric Limit the information returned to the specified metrics (options: _all, breaker, fs, http, indices, jvm, os, process, thread_pool, transport, discovery, indexing_pressure) @option arguments [List] :index_metric Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. (options: _all, completion, docs, fielddata, query_cache, flush, get, indexing, merge, request_cache, refresh, search, segments, store, warmer, suggest, shards) @option arguments [List] :completion_fields A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) @option arguments [List] :fielddata_fields A comma-separated list of fields for `fielddata` index metric (supports wildcards) @option arguments [List] :fields A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) @option arguments [Boolean] :groups A comma-separated list of search groups for `search` index metric @option arguments [String] :level Return indices stats aggregated at index, node or shard level (options: indices, node, shards) @option arguments [List] :types A comma-separated list of document types for the `indexing` index metric @option arguments [Time] :timeout Explicit operation timeout @option arguments [Boolean] :include_segment_file_sizes Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) @option arguments [Boolean] :include_unloaded_segments If set to true segment stats will include stats for segments that are not currently loaded into memory @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.15/cluster-nodes-stats.html
# File lib/elasticsearch/api/actions/nodes/stats.rb, line 40 def stats(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _node_id = arguments.delete(:node_id) _metric = arguments.delete(:metric) _index_metric = arguments.delete(:index_metric) method = Elasticsearch::API::HTTP_GET path = if _node_id && _metric && _index_metric "_nodes/#{Utils.__listify(_node_id)}/stats/#{Utils.__listify(_metric)}/#{Utils.__listify(_index_metric)}" elsif _metric && _index_metric "_nodes/stats/#{Utils.__listify(_metric)}/#{Utils.__listify(_index_metric)}" elsif _node_id && _metric "_nodes/#{Utils.__listify(_node_id)}/stats/#{Utils.__listify(_metric)}" elsif _node_id "_nodes/#{Utils.__listify(_node_id)}/stats" elsif _metric "_nodes/stats/#{Utils.__listify(_metric)}" else "_nodes/stats" end params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Returns low-level information about REST actions usage on nodes.
@option arguments [List] :node_id 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 @option arguments [List] :metric Limit the information returned to the specified metrics (options: _all, rest_actions) @option arguments [Time] :timeout Explicit operation timeout @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.15/cluster-nodes-usage.html
# File lib/elasticsearch/api/actions/nodes/usage.rb, line 31 def usage(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _node_id = arguments.delete(:node_id) _metric = arguments.delete(:metric) method = Elasticsearch::API::HTTP_GET path = if _node_id && _metric "_nodes/#{Utils.__listify(_node_id)}/usage/#{Utils.__listify(_metric)}" elsif _node_id "_nodes/#{Utils.__listify(_node_id)}/usage" elsif _metric "_nodes/usage/#{Utils.__listify(_metric)}" else "_nodes/usage" end params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end