Method: Elasticsearch::API::Cat::Actions#thread_pool
- Defined in:
- lib/elasticsearch/api/actions/cat/thread_pool.rb
#thread_pool(arguments = {}) ⇒ Object
Get thread pool statistics. Get thread pool statistics for each node in a cluster. Returned information includes all built-in thread pools and custom thread pools. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/elasticsearch/api/actions/cat/thread_pool.rb', line 70 def thread_pool(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.thread_pool' } defined_params = [:thread_pool_patterns].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 _thread_pool_patterns = arguments.delete(:thread_pool_patterns) method = Elasticsearch::API::HTTP_GET path = if _thread_pool_patterns "_cat/thread_pool/#{Utils.listify(_thread_pool_patterns)}" else '_cat/thread_pool' end params = Utils.process_params(arguments) params[:h] = Utils.listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |