Aniket Pant
Aniket Pant

Reputation: 69

What is the best approach for calculating index size

I have 11 different index and each index have 60 indices

index_name

  1. log-wlb-application
  2. log-wlb-sysmon
  3. log-wlb-wmiactivity
  4. log-wlb-security
  5. log-wlb-system
  6. log-wlb-powershell
  7. log-pb-dns
  8. log-pb-flow
  9. log-pb-http
  10. log-pb-icmp
  11. log-pb-tls

for example for one index i have these indices.

log-wlb-application-2020.11.24 . . . . log-wlb-application-2021.01.24

I have to calulate average index size of each index because it takes so much time to calculate Is it good approach to calulate average index size on weekly bases because on monthly bases it is time-consuming.

Upvotes: 0

Views: 446

Answers (1)

Amit
Amit

Reputation: 32376

I am not sure why you think it takes so much time to calculate the index size, you can simply use the _cat/indecs?v API and even can filter by your index prefix like if you want to know all the indices and size of indices starting with log-wlb-application , you can use the _cat/indices/log-wlb-application*?v which will print you all the indices starting with log-wlb-application and their size as explained in my previous answer to your this SO question.

Above _cat/indices API is super fast and you can call it programatically and automate the calculating the size of all your indices on a daily basis.

Upvotes: 2

Related Questions