Module: OpenSearch::API::Nodes::Actions
- Included in:
- NodesClient
- Defined in:
- lib/opensearch/api/namespace/nodes.rb,
lib/opensearch/api/actions/nodes/info.rb,
lib/opensearch/api/actions/nodes/stats.rb,
lib/opensearch/api/actions/nodes/usage.rb,
lib/opensearch/api/actions/nodes/shutdown.rb,
lib/opensearch/api/actions/nodes/hot_threads.rb,
lib/opensearch/api/actions/nodes/params_registry.rb,
lib/opensearch/api/actions/nodes/reload_secure_settings.rb
Defined Under Namespace
Modules: ParamsRegistry
Instance Method Summary collapse
-
#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.
-
#shutdown(arguments = {}) ⇒ Object
Shutdown one or all nodes.
-
#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
#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
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/opensearch/api/actions/nodes/hot_threads.rb', line 48 def hot_threads(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _node_id = arguments.delete(:node_id) method = OpenSearch::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.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/opensearch/api/actions/nodes/info.rb', line 40 def info(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _node_id = arguments.delete(:node_id) _metric = arguments.delete(:metric) method = OpenSearch::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.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/opensearch/api/actions/nodes/reload_secure_settings.rb', line 39 def reload_secure_settings(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _node_id = arguments.delete(:node_id) method = OpenSearch::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(arguments = {}) ⇒ Object
Shutdown one or all nodes
45 46 47 48 49 50 51 52 53 |
# File 'lib/opensearch/api/actions/nodes/shutdown.rb', line 45 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 |
#stats(arguments = {}) ⇒ Object
Returns statistical information about nodes in the cluster.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/opensearch/api/actions/nodes/stats.rb', line 48 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 = OpenSearch::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.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/opensearch/api/actions/nodes/usage.rb', line 39 def usage(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _node_id = arguments.delete(:node_id) _metric = arguments.delete(:metric) method = OpenSearch::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 |