Get the cluster health status
- GET /_cat/health
IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.
They are not intended for use by applications. For application consumption, use the cluster health API.
This API is often used to check malfunctioning clusters.
To help you track cluster health alongside log files and alerting systems, the API returns timestamps in two formats:
HH:MM:SS, which is human-readable but includes no date information;
Unix epoch time, which is machine-sortable and includes date information.
The latter format is useful for cluster recoveries that take multiple days.
You can use the cat health API to verify cluster health across multiple nodes.
You also can use the API to track the recovery of a large cluster over a longer period of time.
- Cluster privileges:
monitor
Query Parameters
-
tsboolean · default: true If true, returns
HH:MM:SSand Unix epoch timestamps.-
hNames List of columns to appear in the response. Supports simple wildcards.
-
sNames List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting
:ascor:descas a suffix to the column name.
Response
Response Type: HealthRecord
-
epochStringifiedEpochTimeUnitSeconds -
seconds since 1970-01-01 00:00:00
-
timestampstring TimeOfDay -
time in HH:MM:SS
-
clusterstring -
cluster name
-
statusstring -
health status
-
node.totalstring -
total number of nodes
-
node.datastring -
number of nodes that can store data
-
shardsstring -
total number of shards
-
pristring -
number of primary shards
-
relostring -
number of relocating nodes
-
initstring -
number of initializing nodes
-
unassign.pristring -
number of unassigned primary shards
-
unassignstring -
number of unassigned shards
-
pending_tasksstring -
number of pending tasks
-
max_task_wait_timestring -
wait time of longest task pending
-
active_shards_percentstring -
active number of shards in percent