I'm trying to improve my Elasticsearch monitoring and would need to be able to reliably query the total free disk space (that is available for Elasticsearch) of the cluster.
In Kibana > Monitoring I see
Using the Elasticsearch
/_cluster/stats API endpoint I see
$ curl -s -XGET 'http://es_server:9200/_cluster/stats?human&pretty' | jq .nodes.fs
Which shows about 50% free...
I have 20 ES nodes running on 4 machines. On each machine there is one 894GB SSD drive for each ES node. (On each machine there is one more 894GB drive for OS, etc. which I hope to disregard in my calculations...)
This means ES has 20x894GB ~ 17,5 TB of total disk space it can use which does not match up with anything I see from Kibana monitoring or the API.
df -b 1 for one of the SSD drives shows
This means that ES API
total_in_bytes corresponds to 4 x SSD result with
20 x SSD: 19194544209920
I have default replica and sharding settings, so 5 shards and 1 replica.
How do you guys do it?