Monitoring host disk usage inside a docker

Viewed 520

I want to create a docker img for monitoring a server.

I try to get host storage information ( free/used/total space ...)

So, I start the container with privileged

I try to 'mount' the \dev of the host into /mnt/dev_host in the container but seem didn't help ...

How can i achieve this ?

Edit: I know this is possible, Instana.com and Sematext.com provide a monitoring agent that run in docker and get that kind of metric from the host ...

1 Answers

i mount the / of my host in read-only in my docker and df return all partition list ...

PS: if someone know exatly why, and what is the minimum requirement for df to list partition of my host i take it !

Related