Loading...

List and sort Elasticsearch Indices

:heavy_exclamation_mark: This post is older than a year. Consider some information might not be accurate anymore. :heavy_exclamation_mark:

Just did this weekend the migration of several Elasticsearch Clusters from v2.4.3 to v5.1.1. The catalog API for indices has new features. You can sort the columns.

See below the example for count of primary shards (output shortened).

[vinh@localhost ~]$ curl "localhost:9200/_cat/indices?v&s=pri:desc"
health status index                           uuid                   pri rep docs.count docs.deleted store.size pri.store.size
green  open   fo-dev-2017.01.09               lhf2liV8Spej8wH-CfTlUw   5   1   10800448            0      9.5gb          4.7gb
green  open   elk-etu-2017.01.10              d9xtBETKQ0OkKHqye3wXXQ   5   1         48            0    342.5kb          180kb
green  open   tandem-2017.01                  -X1gUa_YTju8FCHyA3xtrw   2   1     444368            0    140.4mb         70.2mb
green  open   fo-log-2016                     W-KA23jCTGO5-_fLGc4Qmw   2   1      47187            0       95mb         47.5mb
green  open   .watcher-history-2-2016.11.22   Z5gq1NEqSQaBJ99LPPlbfA   1   1          2            0     19.7kb          9.8kb
green  open   fo-etu-2017.01.07               IDNa1g17QY2ZR9-oKbzt_g   1   1    2751560            0      1.2gb        644.6mb
green  open   fo-dev-2017.01.10               sBiZBcmQQfqbWAUO1mC3UA   1   1    3780704            0      2.3gb          1.2gb
green  open   fo-itu-2017.01                  Ot9BuOjZQvemz_Z-45sbuA   1   1   15325866            0     14.6gb          7.3gb
Please remember the terms for blog comments.