...
Storage is one of the key resources in a Kafka cluster. Administrators typically monitor the disk usage of each log directory via metrics to enable them to properly manage the storage attached to brokers. In order to build advanced tooling and automation, it would be useful to also be able to retrieve disk capacity and usable space directly via the Kafka API. That would allow to easily validate whether disk operations (like a resize), or topic deletion (log deletion only happen after a short delay) have completed.
Public Interfaces
We already have the DescribeLogDirs API that returns logdirs and details about the replicas they contain.
Public Interfaces
To expose logdirs total and usable space, this KIP proposes adding 2 new fields to the DescribeLogDirsResponse message and bumping its protocol version to 4. The LogDirDescription class will also be updated to expose these 2 new fields to the Admin API.
...