How to calculate cluster storage utilization

Hello all,

I have a cluster with a few nodes running druid 0.9.2 (version to be updated soon). When I look a the coordinator web console, I see a calculation about the cluster storage utilization that goes as in the following example:
353 GB free

9 nodes, 116 GB each

1.04 TB total

690 GB (66.2%) used

As a rule of thumb I usually launch a new historical node when the storage utilization is around 80-85% which means that if I could calculate programmatically that value, I’d be able to automate the launch of new nodes as needed. However, after looking at the API exposed by the coordinator node ( I haven’t seen an easy way to do that (loadstatus and loadqueue endpoints look promising, but not exactly what I’m looking for).

Ideally, I should be able to at least write a script that gets that value from the API and add that value to a monitoring solution that can raise an alarm with the value goes over a threshold. Could you let me know what would be the right way to do that?

Best regards,

Fwiw - everything the console does goes through the APIs, so if you are curious, you can open up a web inspector and see what it’s doing. In this case it’s using /druid/coordinator/v1/servers?simple, which seems to have escaped documentation. If you are interested in contributing, it would be great to see a patch adding it to the docs, or at least an issue that it’s missing (

Thanks Gian, this is exactly what I needed.


Best regards,