Get the cluster health status
- GET /_cat/health
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.
Required authorization
- Cluster privileges monitor
Query parameters
-
honeOf -
A comma-separated list of columns names to display. It supports simple wildcards.
Supported values include:
epoch(ort,time): The number of seconds since 1970-01-01 00:00:00.timestamp(orts,hms,hhmmss): The time in HH:MM:SS format.cluster(orcl): The cluster name.status(orst): The health status.node.total(ornt,nodeTotal): The total number of nodes that can store data.node.data(ornd,nodeData): The number of nodes that can store data.shards(ort,sh,shards.total,shardsTotal): The total number of shards.pri(orp,shards.primary,shardsPrimary): The number of primary shards.relo(orr,shards.relocating,shardsRelocating): The number of relocating nodes.init(ori,shards.initializing,shardsInitializing): The number of initializing nodes.unassign(oru,shards.unassigned,shardsUnassigned): The number of unassigned shards.unassign.pri(orup,shards.unassigned.primary,shardsUnassignedPrimary): The number of unassigned primary shards.pending_tasks(orpt,pendingTasks): The number of pending tasks.max_task_wait_time(ormtwt,maxTaskWaitTime): The wait time of the longest pending task.active_shards_percent(orasp,activeShardsPercent): The percentage of active shards.
-
Values:
epochttimetimestamptshmshhmmssclusterclstatusstnode.totalntnodeTotalnode.datandnodeDatashardsshshards.totalshardsTotalpripshards.primaryshardsPrimaryrelorshards.relocatingshardsRelocatinginitishards.initializingshardsInitializingunassignushards.unassignedshardsUnassignedunassign.priupshards.unassigned.primaryshardsUnassignedPrimarypending_tasksptpendingTasksmax_task_wait_timemtwtmaxTaskWaitTimeactive_shards_percentaspactiveShardsPercent -
soneOf -
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. -
formatstring · default: text -
Specifies the format to return the columnar data in, can be set to
text,json,cbor,yaml, orsmile. -
helpboolean · default: false -
When set to
truewill output available columns. This option can't be combined with any other query string option. -
bytes -
Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance
1kbmeans 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such askb,mb, orgb, chosen such that the numeric value of the column is as small as possible whilst still being at least1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down. -
Values:
bkbmbgbtbpb -
time -
Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as
ms,s,morh, chosen such that the numeric value of the column is as small as possible whilst still being at least1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down. -
Values:
nanosmicrosmssmhd