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