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/reload_secure_settings.rb,
lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb,
lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb
Instance Method Summary collapse
-
#clear_repositories_metering_archive(arguments = {}) ⇒ Object
Clear the archived repositories metering This functionality is Experimental and may be changed or removed completely in a future release.
-
#get_repositories_metering_info(arguments = {}) ⇒ Object
Get cluster repositories metering This functionality is Experimental and may be changed or removed completely in a future release.
-
#hot_threads(arguments = {}) ⇒ Object
Get the hot threads for nodes.
-
#info(arguments = {}) ⇒ Object
Get node information.
-
#reload_secure_settings(arguments = {}) ⇒ Object
Reload the keystore on nodes in the cluster.
-
#stats(arguments = {}) ⇒ Object
Get node statistics.
-
#usage(arguments = {}) ⇒ Object
Get feature usage information.
Instance Method Details
#clear_repositories_metering_archive(arguments = {}) ⇒ Object
Clear the archived repositories metering 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.
37 38 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 |
# File 'lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb', line 37 def clear_repositories_metering_archive(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.clear_repositories_metering_archive' } defined_params = %i[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] raise ArgumentError, "Required argument 'max_archive_version' missing" unless arguments[:max_archive_version] 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 |
#get_repositories_metering_info(arguments = {}) ⇒ Object
Get cluster repositories metering 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.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb', line 36 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 |
#hot_threads(arguments = {}) ⇒ Object
Get the hot threads for 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 63 64 65 |
# File 'lib/elasticsearch/api/actions/nodes/hot_threads.rb', line 39 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 |
#info(arguments = {}) ⇒ Object
Get node information
35 36 37 38 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 |
# File 'lib/elasticsearch/api/actions/nodes/info.rb', line 35 def info(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.info' } defined_params = %i[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 |
#reload_secure_settings(arguments = {}) ⇒ Object
Reload the keystore on nodes in the cluster
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb', line 34 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 |
#stats(arguments = {}) ⇒ Object
Get node statistics
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 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/elasticsearch/api/actions/nodes/stats.rb', line 43 def stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.stats' } defined_params = %i[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 |
#usage(arguments = {}) ⇒ Object
Get feature usage information
34 35 36 37 38 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 |
# File 'lib/elasticsearch/api/actions/nodes/usage.rb', line 34 def usage(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.usage' } defined_params = %i[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 |