简体   繁体   中英

How to sort kibana indices by descending size?

I tried this first: GET _cat/indices which gave me all of my indices.

I added GET _cat/indices?v to get the column names so I would be able to sort by column name like this GET _cat/indices?v&s=store.size

Now, I just want to swap the sort order.

ElasticSearch guide had no information regarding this.

You can use the suffix :desc like this to get there:

http://localhost:9200/_cat/indices/?s=store.size:desc

health status index                    uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open   tmdb                     DVLEul7bT4yGyiq34h4nCQ   1   1      27760            0    119.8mb        119.8mb
green  open   .kibana_2                6WJ3UFpOSj2O8zi-iLuw6w   1   0         10            0     35.3kb         35.3kb
green  open   .kibana_task_manager_1   WSwYXmMOSpyQOQ8ZIRniwg   1   0          2            0     31.6kb         31.6kb
green  open   .tasks                   _SsI5VWNSwO5Yfps3K12Qg   1   0          1            0      6.3kb          6.3kb
green  open   .kibana_1                MukHGTHfTkKS1HcYodfNqA   1   0          1            0        4kb            4kb
yellow open   my_index                 7FgIWDJOSQesKbJI-HKRoA   1   1          1            0      3.8kb          3.8kb
green  open   .ltrstore                -Xh6WnJYSsWIoPGP8fhgGw   1   0          0            0       283b           283b
green  open   .apm-agent-configuration 6FUF8T5oTDGcLBqcU7ymJg   1   0          0            0       283b           283b

This ability is mildly-buried/described-briefly in this section of the docs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM