CAT Commands Flashcards
What are CAT commands
CAT stands for Compact and Aligned Text. The CAT API provides information about the cluster in a human-readable format
Health of cluster
GET _cat/health?v
Cluster Nodes
GET _cat/nodes?v
Cluster Indices, Shards
GET _cat/indices?v
GET _cat/shards?v
Count
GET _cat/count?v
GET _cat/count/my_index?v
Count of documents in cluster or index
Segments
Provides details about index segments, such as the number of segments per index, memory used, and file sizes.
GET _cat/segments?v
Parameters
The v parameter in the examples above includes headers in the output.
The h parameter allows you to specify specific columns to display, e.g., ?h=index,shards,docs.count.
The s parameter allows sorting by a specified column, e.g., ?s=shards.
Repositories
Lists the snapshot repositories configured in the cluster.
GET _cat/repositories?v