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/shutdown.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
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
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# 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 |
#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 |
#shutdown(arguments = {}) ⇒ Object
Shutdown one or all nodes
36 37 38 39 40 41 42 43 44 |
# 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 |
#stats(arguments = {}) ⇒ Object
Returns statistical information about nodes in the cluster.
39 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 |
# File 'lib/elasticsearch/api/actions/nodes/stats.rb', line 39 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 |