GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SEARCH::ELASTICSEARCH::CLIENT::1_0::DIRECT::CLUSTER (3)

.ds Aq ’

NAME

Search::Elasticsearch::Client::1_0::Direct::Cluster - A client for running cluster-level requests

CONTENTS

VERSION

version 2.00

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.

It does Search::Elasticsearch::Role::Client::Direct.

METHODS

CWhealth()



    $response = $e->cluster->health(
        index   => index | \@indices  # optional
    );



The health() method is used to retrieve information about the cluster health, returning red, yellow or green to indicate the state of the cluster, indices or shards.

Query string parameters:
level,
local,
master_timeout,
timeout,
wait_for_active_shards,
wait_for_nodes,
wait_for_relocating_shards,
wait_for_status

See the cluster health docs <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html> for more information.

CWstats()



    $response = $e->cluster->stats(
        node_id => node | \@nodes     # optional
    );



Returns high-level cluster stats, optionally limited to the listed nodes.

Query string parameters:
flat_settings,
human

See the cluster stats docs <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html> for more information.

CWget_settings()



    $response = $e->cluster->get_settings()



The get_settings() method is used to retrieve cluster-wide settings that have been set with the put_settings() method.

Query string parameters:
flat_settings,
master_timeout,
timeout

See the cluster settings docs <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html> for more information.

CWput_settings()



    $response = $e->cluster->put_settings( %settings );



The put_settings() method is used to set cluster-wide settings, either transiently (which don’t survive restarts) or permanently (which do survive restarts).

For instance:



    $response = $e->cluster->put_settings(
        body => {
            transient => { "discovery.zen.minimum_master_nodes" => 5 }
        }
    );



Query string parameters:
flat_settings

See the cluster settings docs <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html>
for more information.

CWstate()



    $response = $e->cluster->state(
        metric => $metric | \@metrics   # optional
        index  => $index  | \@indices   # optional
    );



The state() method returns the current cluster state from the master node, or from the responding node if local is set to true.

It returns all metrics by default, but these can be limited to any of:
_all,
blocks,
metadata,
nodes,
routing_table

Metrics for indices can be limited to particular indices with the index parameter.

Query string parameters:
allow_no_indices,
expand_wildcards,
flat_settings,
ignore_unavailable,
local,
master_timeout

See the cluster state docs <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html> for more information.

CWpending_tasks()



    $response = $e->cluster->pending_tasks();



Returns a list of cluster-level tasks still pending on the master node.

Query string parameters:
local,
master_timeout

See the pending tasks docs <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-pending.html> for more information.

CWreroute()



    $e->cluster->reroute(
        body => { commands }
    );



The reroute() method is used to manually reallocate shards from one node to another. The body should contain the commands indicating which changes should be made. For instance:



    $e->cluster->reroute(
        body => {
            commands => [
                { move => {
                    index     => test,
                    shard     => 0,
                    from_node => node_1,
                    to_node   => node_2
                }},
                { allocate => {
                    index     => test,
                    shard     => 1,
                    node      => node_3
                }}
            ]
        }
    );



Query string parameters:
dry_run,
explain,
master_timeout,
metric,
timeout

See the reroute docs <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html> for more information.

AUTHOR

Clinton Gormley <drtech@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2015 by Elasticsearch BV.

This is free software, licensed under:



  The Apache License, Version 2.0, January 2004



Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 SEARCH::ELASTICSEARCH::CLIENT::1_0::DIRECT::CLUSTER (3) 2015-10-28

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.