Debian Codegraph @

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

raw
1 package Search::Elasticsearch::Client::2_0::Direct::Nodes;
2 $Search::Elasticsearch::Client::2_0::Direct::Nodes::VERSION = '6.81';
3 use Moo;
4 with 'Search::Elasticsearch::Client::2_0::Role::API';
5 with 'Search::Elasticsearch::Role::Client::Direct';
6 __PACKAGE__->_install_api('nodes');
7
8 1;
9
10 =pod
11
12 =encoding UTF-8
13
14 =head1 NAME
15
16 Search::Elasticsearch::Client::2_0::Direct::Nodes - A client for running node-level requests
17
18 =head1 VERSION
19
20 version 6.81
21
22 =head1 DESCRIPTION
23
24 This module provides methods to make node-level requests, such as
25 retrieving node info and stats.
26
27 It does L<Search::Elasticsearch::Role::Client::Direct>.
28
29 =head1 METHODS
30
31 =head2 C<info()>
32
33 $response = $e->nodes->info(
34 node_id => $node_id | \@node_ids # optional
35 metric => $metric | \@metrics # optional
36 );
37
38 The C<info()> method returns static information about the nodes in the
39 cluster, such as the configured maximum number of file handles, the maximum
40 configured heap size or the threadpool settings.
41
42 Allowed metrics are:
43 C<http>,
44 C<jvm>,
45 C<network>,
46 C<os>,
47 C<plugin>,
48 C<process>,
49 C<settings>,
50 C<thread_pool>,
51 C<timeout>,
52 C<transport>
53
54 Query string parameters:
55 C<flat_settings>,
56 C<human>
57
58 See the L<node_info docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html>
59 for more information.
60
61 =head2 C<stats()>
62
63 $response = $e->nodes->stats(
64 node_id => $node_id | \@node_ids # optional
65 metric => $metric | \@metrics # optional
66 index_metric => $ind_metric | \@ind_metrics # optional
67 );
68
69 The C<stats()> method returns statistics about the nodes in the
70 cluster, such as the number of currently open file handles, the current
71 heap memory usage or the current number of threads in use.
72
73 Stats can be returned for all nodes, or limited to particular nodes
74 with the C<node_id> parameter. By default all metrics are returned, but
75 these can be limited to those specified in the C<metric> parameter.
76
77 Allowed metrics are:
78 C<_all>,
79 C<breaker>,
80 C<fs>,
81 C<http>,
82 C<indices>,
83 C<jvm>,
84 C<network>,
85 C<os>,
86 C<process>,
87 C<thread_pool>,
88 C<timeout>,
89 C<transport>
90
91 If the C<indices> metric (or C<_all>) is specified, then
92 L<indices_stats|Search::Elasticsearch::Client::2_0::Direct::Indices/indices_stats()>
93 information is returned on a per-node basis. Which indices stats are
94 returned can be controlled with the C<index_metric> parameter:
95
96 $response = $e->cluster->node_stats(
97 node_id => 'node_1',
98 metric => ['indices','fs']
99 index_metric => ['docs','fielddata']
100 );
101
102 Allowed index metrics are:
103 C<_all>,
104 C<completion>
105 C<docs>,
106 C<fielddata>,
107 C<filter_cache>,
108 C<flush>,
109 C<get>,
110 C<id_cache>,
111 C<indexing>,
112 C<merge>,
113 C<percolate>,
114 C<query_cache>,
115 C<refresh>,
116 C<search>,
117 C<segments>,
118 C<store>,
119 C<warmer>
120
121 Query string parameters:
122 C<completion_fields>,
123 C<fielddata_fields>,
124 C<fields>,
125 C<groups>,
126 C<human>,
127 C<level>,
128 C<types>
129
130 See the L<node_stats docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html>
131 for more information.
132
133 =head2 C<hot_threads()>
134
135 $response = $e->nodes->hot_threads(
136 node_id => $node_id | \@node_ids # optional
137 )
138
139 The C<hot_threads()> method is a useful tool for diagnosing busy nodes. It
140 takes a snapshot of which threads are consuming the most CPU.
141
142 Query string parameters:
143 C<ignore_idle_threads>,
144 C<interval>,
145 C<snapshots>,
146 C<threads>,
147 C<timeout>,
148 C<type>
149
150 See the L<hot_threads docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-hot-threads.html>
151 for more information.
152
153 =head1 AUTHOR
154
155 Enrico Zimuel <[email protected]>
156
157 =head1 COPYRIGHT AND LICENSE
158
159 This software is Copyright (c) 2020 by Elasticsearch BV.
160
161 This is free software, licensed under:
162
163 The Apache License, Version 2.0, January 2004
164
165 =cut
166
167 __END__
168
169 # ABSTRACT: A client for running node-level requests
170