1Search::Elasticsearch::UCsleSireeanCrtoc:nh:t:6r:_iE0bl:ua:tsDetidircePsceetra:lr:cCDhlo:uc:suCtmleeirne(tn3at)t:i:o6n_0::Direct::Cluster(3)
2
3
4

NAME

6       Search::Elasticsearch::Client::6_0::Direct::Cluster - A client for
7       running cluster-level requests
8

VERSION

10       version 6.00
11

DESCRIPTION

13       This module provides methods to make cluster-level requests, such as
14       getting and setting cluster-level settings, manually rerouting shards,
15       and retrieving for monitoring purposes.
16
17       It does Search::Elasticsearch::Role::Client::Direct.
18

METHODS

20   "health()"
21           $response = $e->cluster->health(
22               index   => 'index' | \@indices  # optional
23           );
24
25       The "health()" method is used to retrieve information about the cluster
26       health, returning "red", "yellow" or "green" to indicate the state of
27       the cluster, indices or shards.
28
29       Query string parameters:
30           "error_trace",
31           "human",
32           "level",
33           "local",
34           "master_timeout",
35           "timeout",
36           "wait_for_active_shards",
37           "wait_for_events",
38           "wait_for_no_relocating_shards",
39           "wait_for_nodes",
40           "wait_for_status"
41
42       See the cluster health docs
43       <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-
44       health.html> for more information.
45
46   "stats()"
47           $response = $e->cluster->stats(
48               node_id => 'node' | \@nodes     # optional
49           );
50
51       Returns high-level cluster stats, optionally limited to the listed
52       nodes.
53
54       Query string parameters:
55           "error_trace",
56           "flat_settings",
57           "human",
58           "timeout"
59
60       See the cluster stats docs
61       <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-
62       stats.html> for more information.
63
64   "get_settings()"
65           $response = $e->cluster->get_settings()
66
67       The "get_settings()" method is used to retrieve cluster-wide settings
68       that have been set with the "put_settings()" method.
69
70       Query string parameters:
71           "error_trace",
72           "flat_settings",
73           "human",
74           "include_defaults",
75           "master_timeout",
76           "timeout"
77
78       See the cluster settings docs
79       <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-
80       update-settings.html> for more information.
81
82   "put_settings()"
83           $response = $e->cluster->put_settings( %settings );
84
85       The "put_settings()" method is used to set cluster-wide settings,
86       either transiently (which don't survive restarts) or permanently (which
87       do survive restarts).
88
89       For instance:
90
91           $response = $e->cluster->put_settings(
92               body => {
93                   transient => { "discovery.zen.minimum_master_nodes" => 6 }
94               }
95           );
96
97       Query string parameters:
98           "error_trace",
99           "flat_settings",
100           "human"
101
102       See the cluster settings docs
103       <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-
104       update-settings.html>
105        for more information.
106
107   "state()"
108           $response = $e->cluster->state(
109               metric => $metric | \@metrics   # optional
110               index  => $index  | \@indices   # optional
111           );
112
113       The "state()" method returns the current cluster state from the master
114       node, or from the responding node if "local" is set to "true".
115
116       It returns all metrics by default, but these can be limited to any of:
117           "_all",
118           "blocks",
119           "metadata",
120           "nodes",
121           "routing_table"
122
123       Metrics for indices can be limited to particular indices with the
124       "index" parameter.
125
126       Query string parameters:
127           "allow_no_indices",
128           "error_trace",
129           "expand_wildcards",
130           "flat_settings",
131           "human",
132           "ignore_unavailable",
133           "local",
134           "master_timeout"
135
136       See the cluster state docs
137       <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-
138       state.html> for more information.
139
140   "allocation_explain()"
141           $response = $e->cluster->allocation_explain(
142               body => { ... shard selectors ...}  # optional
143           );
144
145       Returns information about why a shard is allocated or unallocated or
146       why.
147
148       Query string parameters:
149           "error_trace",
150           "human",
151           "include_disk_info",
152           "include_yes_decisions"
153
154       See the cluster allocation explain docs
155       <https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-
156       allocation-explain.html> for more information.
157
158   "pending_tasks()"
159           $response = $e->cluster->pending_tasks();
160
161       Returns a list of cluster-level tasks still pending on the master node.
162
163       Query string parameters:
164           "error_trace",
165           "human",
166           "local",
167           "master_timeout"
168
169       See the pending tasks docs
170       <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-
171       pending.html> for more information.
172
173   "reroute()"
174           $e->cluster->reroute(
175               body => { commands }
176           );
177
178       The "reroute()" method is used to manually reallocate shards from one
179       node to another.  The "body" should contain the "commands" indicating
180       which changes should be made. For instance:
181
182           $e->cluster->reroute(
183               body => {
184                   commands => [
185                       { move => {
186                           index     => 'test',
187                           shard     => 0,
188                           from_node => 'node_1',
189                           to_node   => 'node_2
190                       }},
191                       { allocate => {
192                           index     => 'test',
193                           shard     => 1,
194                           node      => 'node_3'
195                       }}
196                   ]
197               }
198           );
199
200       Query string parameters:
201           "dry_run",
202           "error_trace",
203           "explain",
204           "human",
205           "master_timeout",
206           "metric",
207           "retry_failed",
208           "timeout"
209
210       See the reroute docs
211       <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-
212       reroute.html> for more information.
213
214   "remote_info()"
215           $response = $e->cluster->remote_info();
216
217       The "remote_info()" API retrieves all of the configured remote cluster
218       information.
219
220       Query string parameters:
221           "error_trace",
222           "human"
223
224       See the remote_info docs
225       <https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-
226       remote-info.html> for more information.
227

AUTHOR

229       Clinton Gormley <drtech@cpan.org>
230
232       This software is Copyright (c) 2017 by Elasticsearch BV.
233
234       This is free software, licensed under:
235
236         The Apache License, Version 2.0, January 2004
237
238
239
240perl v5.30.0            Search::El2a0s1t9i-c0s7e-a2r6ch::Client::6_0::Direct::Cluster(3)
Impressum