Module: Elasticsearch::API::Nodes::Actions
- Included in:
- NodesClient
- Defined in:
- lib/elasticsearch/api/namespace/nodes.rb,
lib/elasticsearch/api/actions/nodes/info.rb,
lib/elasticsearch/api/actions/nodes/stats.rb,
lib/elasticsearch/api/actions/nodes/usage.rb,
lib/elasticsearch/api/actions/nodes/hot_threads.rb,
lib/elasticsearch/api/actions/nodes/params_registry.rb,
lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb,
lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb,
lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb
Defined Under Namespace
Modules: ParamsRegistry
Instance Method Summary collapse
-
#clear_repositories_metering_archive(arguments = {}) ⇒ Object
Removes the archived repositories metering information present in the cluster.
-
#get_repositories_metering_info(arguments = {}) ⇒ Object
Returns cluster repositories metering information.
-
#hot_threads(arguments = {}) ⇒ Object
Returns information about hot threads on each node in the cluster.
-
#info(arguments = {}) ⇒ Object
Returns information about nodes in the cluster.
-
#reload_secure_settings(arguments = {}) ⇒ Object
Reloads secure settings.
-
#stats(arguments = {}) ⇒ Object
Returns statistical information about nodes in the cluster.
-
#usage(arguments = {}) ⇒ Object
Returns low-level information about REST actions usage on nodes.
Instance Method Details
#clear_repositories_metering_archive(arguments = {}) ⇒ Object
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.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# 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 |
#get_repositories_metering_info(arguments = {}) ⇒ Object
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.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# 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 |
#hot_threads(arguments = {}) ⇒ Object
Returns information about hot threads on each node in the cluster.
*Deprecation notice*: The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons Deprecated since version 7.0.0
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/elasticsearch/api/actions/nodes/hot_threads.rb', line 41 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 |
#info(arguments = {}) ⇒ Object
Returns information about nodes in the cluster.
32 33 34 35 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/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 |
#reload_secure_settings(arguments = {}) ⇒ Object
Reloads secure settings.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# 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 |
#stats(arguments = {}) ⇒ Object
Returns statistical information about nodes in the cluster.
40 41 42 43 44 45 46 47 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/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 |
#usage(arguments = {}) ⇒ Object
Returns low-level information about REST actions usage on nodes.
31 32 33 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/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 |