I'm running some Docker containers for my users. Users are able to start and stop their containers dynamically, so I would like to watch my Data space available metrics from docker info
with some sort of monitoring system.
I've tried to use Docker API directory with
echo -e 'GET /info HTTP/1.0\r\n' | nc -U /var/run/docker.sock | grep '{' | python -m json.tool
but the result is returned in human readable units - ie. "16.93 MB" and "9 GB", which is not suitable for machine processing.
The same happens when using Python Docker API library.
import docker
client = docker.Client()
print(client.info()['DriverStatus'])
So the question is: Is there a machine-readable version of docker info
for for parsing out "Base Data Space Total" metrics?