Skip to content

Commit 24f5e9e

Browse files
committed
[API] Update missed node API endpoints
1 parent 4bb3bd1 commit 24f5e9e

File tree

3 files changed

+44
-32
lines changed

3 files changed

+44
-32
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ module Actions
3030
#
3131
# client.nodes.hot_threads threads: 10
3232
#
33-
# @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information;
34-
# use `_local` to return information from the node you're connecting to,
35-
# leave empty to get information from all nodes
33+
# @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
3634
# @option arguments [Time] :interval The interval for the second sampling of threads
3735
# @option arguments [Number] :snapshots Number of samples of thread stacktrace (default: 10)
3836
# @option arguments [Number] :threads Specify the number of threads to provide information for (default: 3)
37+
# @option arguments [Boolean] :ignore_idle_threads Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
3938
# @option arguments [String] :type The type to sample (default: cpu) (options: cpu, wait, block)
4039
# @option arguments [Time] :timeout Explicit operation timeout
4140
#
@@ -60,6 +59,7 @@ def hot_threads(arguments={})
6059
:interval,
6160
:snapshots,
6261
:threads,
62+
:ignore_idle_threads,
6363
:type,
6464
:timeout ].freeze)
6565
end

elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -30,32 +30,17 @@ module Actions
3030
#
3131
# client.nodes.stats metric: 'indices', index_metric: 'fielddata', fields: '*', human: true
3232
#
33-
# @option arguments [List] :metric Limit the information returned to the specified metrics
34-
# (options: _all, breaker, fs, http, indices, jvm, network,
35-
# os, process, thread_pool, transport)
36-
# @option arguments [List] :index_metric Limit the information returned for the `indices` metric
37-
# to the specified index metrics. Used only when
38-
# `indices` or `all` metric is specified.
39-
# (options: _all, completion, docs, fielddata, filter_cache, flush, get,
40-
# id_cache, indexing, merge, percolate, refresh, search, segments, store,
41-
# warmer)
42-
# @option arguments [List] :node_id A comma-separated list of node IDs or names to limit
43-
# the returned information; use `_local` to return information
44-
# from the node you're connecting to, leave empty to get information
45-
# from all nodes
46-
# @option arguments [List] :completion_fields A comma-separated list of fields for `fielddata` and `suggest`
47-
# index metrics (supports wildcards)
48-
# @option arguments [List] :fielddata_fields A comma-separated list of fields for `fielddata` index metric
49-
# (supports wildcards)
50-
# @option arguments [List] :fields A comma-separated list of fields for `fielddata` and `completion` index
51-
# metrics (supports wildcards)
52-
# @option arguments [Boolean] :include_segment_file_sizes Whether to report the aggregated disk usage of each one of the Lucene index files. Only applies if segment stats are requested. (default: false)
33+
# @option arguments [List] :metric Limit the information returned to the specified metrics (options: _all,breaker,fs,http,indices,jvm,os,process,thread_pool,transport,discovery)
34+
# @option arguments [List] :index_metric Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. (options: _all,completion,docs,fielddata,query_cache,flush,get,indexing,merge,request_cache,refresh,search,segments,store,warmer,suggest)
35+
# @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
36+
# @option arguments [List] :completion_fields A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
37+
# @option arguments [List] :fielddata_fields A comma-separated list of fields for `fielddata` index metric (supports wildcards)
38+
# @option arguments [List] :fields A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
5339
# @option arguments [Boolean] :groups A comma-separated list of search groups for `search` index metric
54-
# @option arguments [Boolean] :human Whether to return time and byte values in human-readable format
55-
# @option arguments [String] :level Specify the level for aggregating indices stats
56-
# (options: node, indices, shards)
40+
# @option arguments [String] :level Return indices stats aggregated at index, node or shard level (options: indices, node, shards)
5741
# @option arguments [List] :types A comma-separated list of document types for the `indexing` index metric
5842
# @option arguments [Time] :timeout Explicit operation timeout
43+
# @option arguments [Boolean] :include_segment_file_sizes Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)
5944
#
6045
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html
6146
#
@@ -84,18 +69,14 @@ def stats(arguments={})
8469
#
8570
# @since 6.1.1
8671
ParamsRegistry.register(:stats, [
87-
:metric,
88-
:index_metric,
89-
:node_id,
9072
:completion_fields,
9173
:fielddata_fields,
9274
:fields,
93-
:include_segment_file_sizes,
9475
:groups,
95-
:human,
9676
:level,
9777
:types,
98-
:timeout ].freeze)
78+
:timeout,
79+
:include_segment_file_sizes ].freeze)
9980
end
10081
end
10182
end
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module Elasticsearch
2+
module API
3+
module Nodes
4+
module Actions
5+
6+
# The cluster nodes usage API allows to retrieve information on the usage of features for each node.
7+
#
8+
# @option arguments [List] :metric Limit the information returned to the specified metrics (options: _all,rest_actions)
9+
# @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
10+
# @option arguments [Time] :timeout Explicit operation timeout
11+
#
12+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-usage.html
13+
#
14+
def usage(arguments={})
15+
method = Elasticsearch::API::HTTP_GET
16+
path = "_nodes/usage"
17+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
18+
body = nil
19+
20+
perform_request(method, path, params, body).body
21+
end
22+
23+
# Register this action with its valid params when the module is loaded.
24+
#
25+
# @since 6.2.0
26+
ParamsRegistry.register(:usage, [
27+
:timeout ].freeze)
28+
end
29+
end
30+
end
31+
end

0 commit comments

Comments
 (0)