.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Search::Elasticsearch::Client::7_0::Direct::Cluster 3pm" .TH Search::Elasticsearch::Client::7_0::Direct::Cluster 3pm "2022-08-01" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Search::Elasticsearch::Client::7_0::Direct::Cluster \- A client for running cluster\-level requests .SH "VERSION" .IX Header "VERSION" version 7.717 .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module provides methods to make cluster-level requests, such as getting and setting cluster-level settings, manually rerouting shards, and retrieving for monitoring purposes. .PP It does Search::Elasticsearch::Role::Client::Direct. .SH "METHODS" .IX Header "METHODS" .ie n .SS """health()""" .el .SS "\f(CWhealth()\fP" .IX Subsection "health()" .Vb 3 \& $response = $e\->cluster\->health( \& index => \*(Aqindex\*(Aq | \e@indices # optional \& ); .Ve .PP The \f(CW\*(C`health()\*(C'\fR method is used to retrieve information about the cluster health, returning \f(CW\*(C`red\*(C'\fR, \f(CW\*(C`yellow\*(C'\fR or \f(CW\*(C`green\*(C'\fR to indicate the state of the cluster, indices or shards. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR, \f(CW\*(C`level\*(C'\fR, \f(CW\*(C`local\*(C'\fR, \f(CW\*(C`master_timeout\*(C'\fR, \f(CW\*(C`timeout\*(C'\fR, \f(CW\*(C`wait_for_active_shards\*(C'\fR, \f(CW\*(C`wait_for_events\*(C'\fR, \f(CW\*(C`wait_for_no_initializing_shards\*(C'\fR, \f(CW\*(C`wait_for_no_relocating_shards\*(C'\fR, \f(CW\*(C`wait_for_nodes\*(C'\fR, \f(CW\*(C`wait_for_status\*(C'\fR .PP See the cluster health docs for more information. .ie n .SS """stats()""" .el .SS "\f(CWstats()\fP" .IX Subsection "stats()" .Vb 3 \& $response = $e\->cluster\->stats( \& node_id => \*(Aqnode\*(Aq | \e@nodes # optional \& ); .Ve .PP Returns high-level cluster stats, optionally limited to the listed nodes. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`flat_settings\*(C'\fR, \f(CW\*(C`human\*(C'\fR, \f(CW\*(C`timeout\*(C'\fR .PP See the cluster stats docs for more information. .ie n .SS """get_settings()""" .el .SS "\f(CWget_settings()\fP" .IX Subsection "get_settings()" .Vb 1 \& $response = $e\->cluster\->get_settings() .Ve .PP The \f(CW\*(C`get_settings()\*(C'\fR method is used to retrieve cluster-wide settings that have been set with the \*(L"\fBput_settings()\fR\*(R" method. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`flat_settings\*(C'\fR, \f(CW\*(C`human\*(C'\fR, \f(CW\*(C`include_defaults\*(C'\fR, \f(CW\*(C`master_timeout\*(C'\fR, \f(CW\*(C`timeout\*(C'\fR .PP See the cluster settings docs for more information. .ie n .SS """put_settings()""" .el .SS "\f(CWput_settings()\fP" .IX Subsection "put_settings()" .Vb 1 \& $response = $e\->cluster\->put_settings( %settings ); .Ve .PP The \f(CW\*(C`put_settings()\*(C'\fR method is used to set cluster-wide settings, either transiently (which don't survive restarts) or permanently (which do survive restarts). .PP For instance: .PP .Vb 5 \& $response = $e\->cluster\->put_settings( \& body => { \& transient => { "discovery.zen.minimum_master_nodes" => 6 } \& } \& ); .Ve .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`flat_settings\*(C'\fR, \f(CW\*(C`human\*(C'\fR .PP See the cluster settings docs for more information. .ie n .SS """state()""" .el .SS "\f(CWstate()\fP" .IX Subsection "state()" .Vb 4 \& $response = $e\->cluster\->state( \& metric => $metric | \e@metrics # optional \& index => $index | \e@indices # optional \& ); .Ve .PP The \f(CW\*(C`state()\*(C'\fR method returns the current cluster state from the master node, or from the responding node if \f(CW\*(C`local\*(C'\fR is set to \f(CW\*(C`true\*(C'\fR. .PP It returns all metrics by default, but these can be limited to any of: \f(CW\*(C`_all\*(C'\fR, \f(CW\*(C`blocks\*(C'\fR, \f(CW\*(C`metadata\*(C'\fR, \f(CW\*(C`nodes\*(C'\fR, \f(CW\*(C`routing_table\*(C'\fR .PP Metrics for indices can be limited to particular indices with the \f(CW\*(C`index\*(C'\fR parameter. .PP Query string parameters: \f(CW\*(C`allow_no_indices\*(C'\fR, \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`expand_wildcards\*(C'\fR, \f(CW\*(C`flat_settings\*(C'\fR, \f(CW\*(C`human\*(C'\fR, \f(CW\*(C`ignore_unavailable\*(C'\fR, \f(CW\*(C`local\*(C'\fR, \f(CW\*(C`master_timeout\*(C'\fR, \f(CW\*(C`wait_for_metadata_version\*(C'\fR, \f(CW\*(C`wait_for_timeout\*(C'\fR .PP See the cluster state docs for more information. .ie n .SS """allocation_explain()""" .el .SS "\f(CWallocation_explain()\fP" .IX Subsection "allocation_explain()" .Vb 3 \& $response = $e\->cluster\->allocation_explain( \& body => { ... shard selectors ...} # optional \& ); .Ve .PP Returns information about why a shard is allocated or unallocated or why. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR, \f(CW\*(C`include_disk_info\*(C'\fR, \f(CW\*(C`include_yes_decisions\*(C'\fR .PP See the cluster allocation explain docs for more information. .ie n .SS """pending_tasks()""" .el .SS "\f(CWpending_tasks()\fP" .IX Subsection "pending_tasks()" .Vb 1 \& $response = $e\->cluster\->pending_tasks(); .Ve .PP Returns a list of cluster-level tasks still pending on the master node. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR, \f(CW\*(C`local\*(C'\fR, \f(CW\*(C`master_timeout\*(C'\fR .PP See the pending tasks docs for more information. .ie n .SS """reroute()""" .el .SS "\f(CWreroute()\fP" .IX Subsection "reroute()" .Vb 3 \& $e\->cluster\->reroute( \& body => { commands } \& ); .Ve .PP The \f(CW\*(C`reroute()\*(C'\fR method is used to manually reallocate shards from one node to another. The \f(CW\*(C`body\*(C'\fR should contain the \f(CW\*(C`commands\*(C'\fR indicating which changes should be made. For instance: .PP .Vb 10 \& $e\->cluster\->reroute( \& body => { \& commands => [ \& { move => { \& index => \*(Aqtest\*(Aq, \& shard => 0, \& from_node => \*(Aqnode_1\*(Aq, \& to_node => \*(Aqnode_2 \& }}, \& { allocate => { \& index => \*(Aqtest\*(Aq, \& shard => 1, \& node => \*(Aqnode_3\*(Aq \& }} \& ] \& } \& ); .Ve .PP Query string parameters: \f(CW\*(C`dry_run\*(C'\fR, \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`explain\*(C'\fR, \f(CW\*(C`human\*(C'\fR, \f(CW\*(C`master_timeout\*(C'\fR, \f(CW\*(C`metric\*(C'\fR, \f(CW\*(C`retry_failed\*(C'\fR, \f(CW\*(C`timeout\*(C'\fR .PP See the reroute docs for more information. .ie n .SS """remote_info()""" .el .SS "\f(CWremote_info()\fP" .IX Subsection "remote_info()" .Vb 1 \& $response = $e\->cluster\->remote_info(); .Ve .PP The \f(CW\*(C`remote_info()\*(C'\fR \s-1API\s0 retrieves all of the configured remote cluster information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .PP See the remote_info docs for more information. .SH "AUTHOR" .IX Header "AUTHOR" Enrico Zimuel .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is Copyright (c) 2022 by Elasticsearch \s-1BV.\s0 .PP This is free software, licensed under: .PP .Vb 1 \& The Apache License, Version 2.0, January 2004 .Ve