Class Cluster
The Cluster class
Info:
- Author: Dhaval Kapil
Methods
Cluster:health (params) | Function to get information health of the cluster |
Cluster:state (params) | Function to get a comprehensive state information of the whole cluster |
Cluster:stats (params) | Function to retrieve statistics from a cluster wide perspective |
Cluster:getSettings (params) | Function to retrieve the settings of a cluster |
Cluster:putSettings (params) | Function to put the settings of a cluster |
Cluster:reroute (params) | Function to execute cluster reroute allocation commands |
Cluster:pendingTasks (params) | Function to get the list of pending tasks |
Methods
- Cluster:health (params)
-
Function to get information health of the cluster
Parameters:
- params
The health Parameters
Returns:
-
table Error or the data received from the elasticsearch server
Usage:
params["index"] = (string) Limit the information returned to a specific index ["level"] = (enum) Specify the level of detail for returned information ["local"] = (boolean) Return local information, do not retrieve the state from master node (default: false) ["master_timeout"] = (time) Explicit operation timeout for connection to master node ["timeout"] = (time) Explicit operation timeout ["wait_for_active_shards"] = (number) Wait until the specified number of shards is active ["wait_for_nodes"] = (number) Wait until the specified number of nodes is available ["wait_for_relocating_shards"] = (number) Wait until the specified number of relocating shards is finished ["wait_for_status"] = (enum) Wait until cluster is in a specific state
- params
- Cluster:state (params)
-
Function to get a comprehensive state information of the whole cluster
Parameters:
- params
The state Parameters
Returns:
-
table Error or the data received from the elasticsearch server
Usage:
params["filter_blocks"] = (boolean) Do not return information about blocks ["filter_index_templates"] = (boolean) Do not return information about index templates ["filter_indices"] = (list) Limit returned metadata information to specific indices ["filter_metadata"] = (boolean) Do not return information about indices metadata ["filter_nodes"] = (boolean) Do not return information about nodes ["filter_routing_table"] = (boolean) Do not return information about shard allocation ('routing_table' and 'routing_nodes') ["local"] = (boolean) Return local information, do not retrieve the state from master node (default: false) ["master_timeout"] = (time) Specify timeout for connection to master
- params
- Cluster:stats (params)
-
Function to retrieve statistics from a cluster wide perspective
Parameters:
- params
The stats Parameters
Returns:
-
table Error or the data received from the elasticsearch server
Usage:
params["flat_settings"] = (boolean) Return settings in flat format (default: false) ["human"] = (boolean) Whether to return time and byte values in human-readable format.
- params
- Cluster:getSettings (params)
-
Function to retrieve the settings of a cluster
Parameters:
- params
The getSettings Parameters
Returns:
-
table Error or the data received from the elasticsearch server
- params
- Cluster:putSettings (params)
-
Function to put the settings of a cluster
Parameters:
- params
The putSettings Parameters
Returns:
-
table Error or the data received from the elasticsearch server
- params
- Cluster:reroute (params)
-
Function to execute cluster reroute allocation commands
Parameters:
- params
The reroute Parameters
Returns:
-
table Error or the data received from the elasticsearch server
Usage:
params["dry_run"] = (boolean) Simulate the operation only and return the resulting state ["filter_metadata"] = (boolean) Don"t return cluster state metadata (default: false) ["body"] = (boolean) Don"t return cluster state metadata (default: false) ["explain"] = (boolean) Return an explanation of why the commands can or cannot be executed
- params
- Cluster:pendingTasks (params)
-
Function to get the list of pending tasks
Parameters:
- params
The pendingTasks Parameters
Returns:
-
table Error or the data received from the elasticsearch server
Usage:
params["local"] = (bool) Return local information, do not retrieve the state from master node (default: false) ["master_timeout"] = (time) Specify timeout for connection to master
- params