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
Search::Elasticsearch::Client::0_90::Direct::Cluster(3) User Contributed Perl Documentation Search::Elasticsearch::Client::0_90::Direct::Cluster(3)

Search::Elasticsearch::Client::0_90::Direct::Cluster - A client for running cluster-level requests

version 5.02

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.

    $response = $e->cluster->health( %qs_params )

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/0.90/cluster-health.html> for more information.

    $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/0.90/cluster-pending.html> for more information.

    $response = $e->cluster->node_info(
        node_id => $node_id | \@node_ids       # optional
    );

The "node_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.

Query string parameters: "all", "clear", "http", "jvm", "network", "os", "plugin", "process", "settings", "thread_pool", "timeout", "transport"

See the node_info docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/cluster-nodes-info.html> for more information.

    $response = $e->cluster->node_stats(
        node_id => $node_id | \@node_ids       # optional
    );

The "node_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 "node_id" parameter. The indices_stats information can also be retrieved on a per-node basis with the "node_stats()" method:

    $response = $e->cluster->node_stats(
        node_id => 'node_1',
        indices => 1,
        metric  => 'docs'
    );

Query string parameters: "all", "clear", "fields", "fs", "http", "indices", "jvm", "network", "os", "process", "thread_pool", "transport"

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

    $response = $e->cluster->hot_threads(
        node_id => $node_id | \@node_ids       # optional
    )

The "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: "interval", "snapshots", "threads", "type"

See the hot_threads docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/cluster-nodes-hot-threads.html> for more information.

    $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.

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

    $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 }
        }
    );

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

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

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

Query string parameters: "filter_blocks", "filter_index_templates", "filter_indices", "filter_metadata", "filter_nodes", "filter_routing_table", "local", "master_timeout"

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

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

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", "filter_metadata"

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

    $e->cluster->shutdown(
        node_id => $node_id | \@node_ids    # optional
    );

The "shutdown()" method is used to shutdown one or more nodes, or the whole cluster.

Query string parameters: "delay", "exit"

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

Clinton Gormley <drtech@cpan.org>

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

This is free software, licensed under:

  The Apache License, Version 2.0, January 2004
2017-04-02 perl v5.32.1

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

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