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 (http://druid.io/docs/0.9.2/design/coordinator.html) 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,
Javier

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 (https://github.com/druid-io/druid/issues/new).

Thanks Gian, this is exactly what I needed.

Issue: https://github.com/druid-io/druid/issues/5391
PR: https://github.com/druid-io/druid/pull/5392

Best regards,
Javier