Debian Codegraph @

lib/Search/Elasticsearch/Client/8_0/Direct/Nodes.pm

raw
1 # Licensed to Elasticsearch B.V. under one or more contributor
2 # license agreements. See the NOTICE file distributed with
3 # this work for additional information regarding copyright
4 # ownership. Elasticsearch B.V. licenses this file to you under
5 # the Apache License, Version 2.0 (the "License"); you may
6 # not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing,
12 # software distributed under the License is distributed on an
13 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 # KIND, either express or implied. See the License for the
15 # specific language governing permissions and limitations
16 # under the License.
17
18 package Search::Elasticsearch::Client::8_0::Direct::Nodes;
19 $Search::Elasticsearch::Client::8_0::Direct::Nodes::VERSION = '8.12';
20 use Moo;
21 with 'Search::Elasticsearch::Client::8_0::Role::API';
22 with 'Search::Elasticsearch::Role::Client::Direct';
23 __PACKAGE__->_install_api('nodes');
24
25 1;
26
27 =pod
28
29 =encoding UTF-8
30
31 =head1 NAME
32
33 Search::Elasticsearch::Client::8_0::Direct::Nodes - A client for running node-level requests
34
35 =head1 VERSION
36
37 version 8.12
38
39 =head1 DESCRIPTION
40
41 This module provides methods to make node-level requests, such as
42 retrieving node info and stats.
43
44 It does L<Search::Elasticsearch::Role::Client::Direct>.
45
46 =head1 METHODS
47
48 =head2 C<info()>
49
50 $response = $e->nodes->info(
51 node_id => $node_id | \@node_ids # optional
52 metric => $metric | \@metrics # optional
53 );
54
55 The C<info()> method returns static information about the nodes in the
56 cluster, such as the configured maximum number of file handles, the maximum
57 configured heap size or the threadpool settings.
58
59 Allowed metrics are:
60 C<http>,
61 C<jvm>,
62 C<network>,
63 C<os>,
64 C<plugin>,
65 C<process>,
66 C<settings>,
67 C<thread_pool>,
68 C<timeout>,
69 C<transport>
70
71 Query string parameters:
72 C<error_trace>,
73 C<flat_settings>,
74 C<human>
75
76 See the L<node_info docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html>
77 for more information.
78
79 =head2 C<stats()>
80
81 $response = $e->nodes->stats(
82 node_id => $node_id | \@node_ids # optional
83 metric => $metric | \@metrics # optional
84 index_metric => $ind_metric | \@ind_metrics # optional
85 );
86
87 The C<stats()> method returns statistics about the nodes in the
88 cluster, such as the number of currently open file handles, the current
89 heap memory usage or the current number of threads in use.
90
91 Stats can be returned for all nodes, or limited to particular nodes
92 with the C<node_id> parameter. By default all metrics are returned, but
93 these can be limited to those specified in the C<metric> parameter.
94
95 Allowed metrics are:
96 C<_all>,
97 C<breaker>,
98 C<fs>,
99 C<http>,
100 C<include_segment_file_sizes>,
101 C<indices>,
102 C<jvm>,
103 C<network>,
104 C<os>,
105 C<process>,
106 C<thread_pool>,
107 C<timeout>,
108 C<transport>
109
110 If the C<indices> metric (or C<_all>) is specified, then
111 L<indices_stats|Search::Elasticsearch::Client::8_0::Direct::Indices/indices_stats()>
112 information is returned on a per-node basis. Which indices stats are
113 returned can be controlled with the C<index_metric> parameter:
114
115 $response = $e->nodes->stats(
116 node_id => 'node_1',
117 metric => ['indices','fs']
118 index_metric => ['docs','fielddata']
119 );
120
121 Allowed index metrics are:
122 C<_all>,
123 C<completion>
124 C<docs>,
125 C<fielddata>,
126 C<filter_cache>,
127 C<flush>,
128 C<get>,
129 C<id_cache>,
130 C<indexing>,
131 C<merge>,
132 C<percolate>,
133 C<query_cache>,
134 C<refresh>,
135 C<search>,
136 C<segments>,
137 C<store>,
138 C<warmer>
139
140 Query string parameters:
141 C<completion_fields>,
142 C<error_trace>,
143 C<fielddata_fields>,
144 C<fields>,
145 C<groups>,
146 C<human>,
147 C<level>,
148 C<types>
149
150 See the L<stats docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html>
151 for more information.
152
153 =head2 C<hot_threads()>
154
155 $response = $e->nodes->hot_threads(
156 node_id => $node_id | \@node_ids # optional
157 )
158
159 The C<hot_threads()> method is a useful tool for diagnosing busy nodes. It
160 takes a snapshot of which threads are consuming the most CPU.
161
162 Query string parameters:
163 C<error_trace>,
164 C<human>,
165 C<ignore_idle_threads>,
166 C<interval>,
167 C<snapshots>,
168 C<threads>,
169 C<timeout>,
170 C<type>
171
172 See the L<hot_threads docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-hot-threads.html>
173 for more information.
174
175 =head2 C<reload_secure_settings()>
176
177 $response = $e->nodes->reload_secure_settings(
178 node_id => $node_id | \@node_ids # optional
179 );
180
181 The C<reload_secure_settings()> API will reload the reloadable settings stored in the keystore
182 on each node.
183
184 Query string parameters:
185 C<error_trace>,
186 C<filter_path>,
187 C<human>,
188 C<timeout>
189
190 See the L<reload-secure-settings docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/secure-settings.html>
191 for more information.
192
193 =head2 C<usage()>
194
195 $response = $e->nodes->usage(
196 node_id => $node_id | \@node_ids # optional
197 metric => $metric | \@metrics # optional
198 )
199
200 The C<usage()> API retrieve sinformation on the usage of features for each node.
201
202 Query string parameters:
203 C<error_trace>,
204 C<human>,
205 C<timeout>
206
207 See the L<nodes_usage docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-usage.html>
208 for more information.
209
210 =head1 AUTHOR
211
212 Enrico Zimuel <[email protected]>
213
214 =head1 COPYRIGHT AND LICENSE
215
216 This software is Copyright (c) 2024 by Elasticsearch BV.
217
218 This is free software, licensed under:
219
220 The Apache License, Version 2.0, January 2004
221
222 =cut
223
224 __END__
225
226 # ABSTRACT: A client for running node-level requests
227