module Elasticsearch::API::Nodes::Actions
Public Instance Methods
Source
# File lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb, line 38 def clear_repositories_metering_archive(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.clear_repositories_metering_archive' } defined_params = [:node_id, :max_archive_version].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id] unless arguments[:max_archive_version] raise ArgumentError, "Required argument 'max_archive_version' missing" end arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _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 = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Clear the archived repositories metering. Clear the archived repositories metering information 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 [String, Array] :node_id Comma-separated list of node IDs or names used to limit returned information. (Required) @option arguments [Integer] :max_archive_version Specifies the maximum archive_version
to be cleared from the archive. (Required) @option arguments [Hash] :headers Custom HTTP headers
Source
# File lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb, line 39 def get_repositories_metering_info(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.get_repositories_metering_info' } defined_params = [:node_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _node_id = arguments.delete(:node_id) method = Elasticsearch::API::HTTP_GET path = "_nodes/#{Utils.listify(_node_id)}/_repositories_metering" params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Get cluster repositories metering. Get repositories metering information for a cluster. This API
exposes monotonically non-decreasing counters and it is expected that clients would durably store the information needed to compute aggregations over a period of time. Additionally, the information exposed by this API
is volatile, meaning that it will not be present after node restarts. 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 [String, Array] :node_id Comma-separated list of node IDs or names used to limit returned information. (Required) @option arguments [Hash] :headers Custom HTTP headers
Source
# File lib/elasticsearch/api/actions/nodes/hot_threads.rb, line 43 def hot_threads(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.hot_threads' } defined_params = [:node_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _node_id = arguments.delete(:node_id) method = Elasticsearch::API::HTTP_GET path = if _node_id "_nodes/#{Utils.listify(_node_id)}/hot_threads" else '_nodes/hot_threads' end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Get the hot threads for nodes. Get a breakdown of the hot threads on each selected node in the cluster. The output is plain text with a breakdown of the top hot threads for each node.
@option arguments [String, Array] :node_id List of node IDs or names used to limit returned information. @option arguments [Boolean] :ignore_idle_threads If true, known idle threads (e.g. waiting in a socket select, or to get
a task from an empty queue) are filtered out. Server default: true.
@option arguments [Time] :interval The interval to do the second sampling of threads. Server default: 500ms. @option arguments [Integer] :snapshots Number of samples of thread stacktrace. Server default: 10. @option arguments [Integer] :threads Specifies the number of hot threads to provide information for. Server default: 3. @option arguments [Time] :timeout Period to wait for a response. If no response is received
before the timeout expires, the request fails and returns an error. Server default: 30s.
@option arguments [String] :type The type to sample. Server default: cpu. @option arguments [String] :sort The sort order for ‘cpu’ type (default: total) @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-nodes-hot-threads
Source
# File lib/elasticsearch/api/actions/nodes/info.rb, line 36 def info(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.info' } defined_params = [:node_id, :metric].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _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.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Get node information. By default, the API
returns all attributes and core settings for cluster nodes.
@option arguments [String, Array] :node_id Comma-separated list of node IDs or names used to limit returned information. @option arguments [String, Array<String>] :metric Limits the information returned to the specific metrics. Supports a comma-separated list, such as http,ingest. @option arguments [Boolean] :flat_settings If true, returns settings in flat format. @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-nodes-info
Source
# File lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb, line 41 def reload_secure_settings(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.reload_secure_settings' } defined_params = [:node_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _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.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Reload the keystore on nodes in the cluster. Secure settings are stored in an on-disk keystore. Certain of these settings are reloadable. That is, you can change them on disk and reload them without restarting any nodes in the cluster. When you have updated reloadable secure settings in your keystore, you can use this API
to reload those settings on each node. When the Elasticsearch
keystore is password protected and not simply obfuscated, you must provide the password for the keystore when you reload the secure settings. Reloading the settings for the whole cluster assumes that the keystores for all nodes are protected with the same password; this method is allowed only when inter-node communications are encrypted. Alternatively, you can reload the secure settings on each node by locally accessing the API
and passing the node-specific Elasticsearch
keystore password.
@option arguments [String, Array] :node_id The names of particular nodes in the cluster to target. @option arguments [Time] :timeout Period to wait for a response.
If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
@option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body request body
@see www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-nodes-reload-secure-settings
Source
# File lib/elasticsearch/api/actions/nodes/stats.rb, line 45 def stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.stats' } defined_params = [:node_id, :metric, :index_metric].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _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.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Get node statistics. Get statistics for nodes in a cluster. By default, all stats are returned. You can limit the returned information by using metrics.
@option arguments [String, Array] :node_id Comma-separated list of node IDs or names used to limit returned information. @option arguments [String, Array<String>] :metric Limit the information returned to the specified metrics @option arguments [String, Array<String>] :index_metric Limit the information returned for indices metric to the specific index metrics. It can be used only if indices (or all) metric is specified. @option arguments [String, Array<String>] :completion_fields Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics. @option arguments [String, Array<String>] :fielddata_fields Comma-separated list or wildcard expressions of fields to include in fielddata statistics. @option arguments [String, Array<String>] :fields Comma-separated list or wildcard expressions of fields to include in the statistics. @option arguments [Boolean] :groups Comma-separated list of search groups to include in the search statistics. @option arguments [Boolean] :include_segment_file_sizes If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). @option arguments [String] :level Indicates whether statistics are aggregated at the cluster, index, or shard level. @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. @option arguments [Array<String>] :types A comma-separated list of document types for the indexing index metric. @option arguments [Boolean] :include_unloaded_segments If true
, the response includes information from segments that are not loaded into memory. @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-nodes-stats
Source
# File lib/elasticsearch/api/actions/nodes/usage.rb, line 36 def usage(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.usage' } defined_params = [:node_id, :metric].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _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.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Get feature usage information.
@option arguments [String, Array] :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 [String, Array<String>] :metric Limits the information returned to the specific metrics.
A comma-separated list of the following options: +_all+, +rest_actions+.
@option arguments [Time] :timeout Period to wait for a response.
If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
@option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-nodes-usage