Index Stats

So far, we have been looking at node-centric statistics: How much memory does this node have? How much CPU is being used? How many searches is this node servicing?

Sometimes it is useful to look at statistics from an index-centric perspective: How many search requests is this index receiving? How much time is spent fetching docs in that index?

To do this, select the index (or indices) that you are interested in and execute an Index stats API:

GET my_index/_stats 

GET my_index,another_index/_stats 

GET _all/_stats 

Stats for my_index.

Stats for multiple indices can be requested by separating their names with a comma.

Stats indices can be requested using the special _all index name.

The stats returned will be familar to the node-stats output: search fetch get index bulk segment counts and so forth

Index-centric stats can be useful for identifying or verifying hot indices inside your cluster, or trying to determine why some indices are faster/slower than others.

In practice, however, node-centric statistics tend to be more useful. Entire nodes tend to bottleneck, not individual indices. And because indices are usually spread across multiple nodes, index-centric statistics are usually not very helpful because they aggregate data from different physical machines operating in different environments.

Index-centric stats are a useful tool to keep in your repertoire, but are not usually the first tool to reach for.