Hello all,
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
{
"total": "3.4tb",
"total_in_bytes": 3838908841984,
"free": "1.7tb",
"free_in_bytes": 1878063632384,
"available": "1.7tb",
"available_in_bytes": 1878063632384
}
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 959727210496
This means that ES API total_in_bytes corresponds to 4 x SSD result with df.
SSD: 959727210496
20 x SSD: 19194544209920
total_in_bytes: 3838908841984
total_in_bytes/SSD: 4
I have default replica and sharding settings, so 5 shards and 1 replica.
How do you guys do it?
Cheers,
AB