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
Defined Under Namespace
Modules: ParamsRegistry
Instance Method Summary collapse
-
#hot_threads(arguments = {}) ⇒ Object
Returns information about the hottest threads in the cluster or on a specific node as a String.
-
#info(arguments = {}) ⇒ Object
Returns information about nodes in the cluster (cluster settings, JVM version, etc).
-
#reload_secure_settings(arguments = {}) ⇒ Object
Re-read the local node’s encrypted keystore.
-
#stats(arguments = {}) ⇒ Object
Returns statistical information about nodes in the cluster.
-
#usage(arguments = {}) ⇒ Object
The cluster nodes usage API allows to retrieve information on the usage of features for each node.
Instance Method Details
#hot_threads(arguments = {}) ⇒ Object
Returns information about the hottest threads in the cluster or on a specific node as a String.
The information is returned as text, and allows you to understand what are currently the most taxing operations happening in the cluster, for debugging or monitoring purposes.
26 27 28 29 30 31 32 33 34 |
# File 'lib/elasticsearch/api/actions/nodes/hot_threads.rb', line 26 def hot_threads(arguments={}) method = HTTP_GET path = Utils.__pathify '_nodes', Utils.__listify(arguments[:node_id]), 'hot_threads' params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body).body end |
#info(arguments = {}) ⇒ Object
Returns information about nodes in the cluster (cluster settings, JVM version, etc).
Use the ‘all` option to return all available settings, or limit the information returned to a specific type (eg. `http`).
Use the ‘node_id` option to limit information to specific node(s).
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/elasticsearch/api/actions/nodes/info.rb', line 32 def info(arguments={}) arguments = arguments.clone metric = arguments.delete(:metric) method = HTTP_GET if metric parts = metric else parts = Utils.__extract_parts arguments, ParamsRegistry.get(:info_parts) end path = Utils.__pathify '_nodes', Utils.__listify(arguments[:node_id]), Utils.__listify(parts) params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(:info_params) body = nil perform_request(method, path, params, body).body end |
#reload_secure_settings(arguments = {}) ⇒ Object
Re-read the local node’s encrypted keystore. Specifically, it will prompt the keystore decryption and reading across the cluster.
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb', line 22 def reload_secure_settings(arguments={}) valid_params = [ :timeout ] method = HTTP_POST path = Utils.__pathify '_nodes', Utils.__listify(arguments[:node_id]), 'reload_secure_settings' params = Utils.__validate_and_extract_params arguments, valid_params body = nil perform_request(method, path, params, body).body end |
#stats(arguments = {}) ⇒ Object
Returns statistical information about nodes in the cluster.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/elasticsearch/api/actions/nodes/stats.rb', line 30 def stats(arguments={}) arguments = arguments.clone node_id = arguments.delete(:node_id) path = Utils.__pathify '_nodes', Utils.__listify(node_id), 'stats', Utils.__listify(arguments.delete(:metric)), Utils.__listify(arguments.delete(:index_metric)) params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) [:completion_fields, :fielddata_fields, :fields, :groups, :types].each do |key| params[key] = Utils.__listify(params[key]) if params[key] end body = nil perform_request(HTTP_GET, path, params, body).body end |
#usage(arguments = {}) ⇒ Object
The cluster nodes usage API allows to retrieve information on the usage of features for each node.
14 15 16 17 18 19 20 21 |
# File 'lib/elasticsearch/api/actions/nodes/usage.rb', line 14 def usage(arguments={}) method = Elasticsearch::API::HTTP_GET path = "_nodes/usage" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body).body end |