On certain OS's not all docker metrics are available by default. Particularly this has been observed on Debian Jessie (8.2).
When executing an info check you may see output similar to the following:
docker ------ - initialize check class [ERROR]: Exception("Can't find mounted memory cgroups.",)
This occurs when the OS has decided to disable the memory cgroup because of the very fine-grained accounting of the memory usage on your host which increases the docker overhead.
Resolving the Issue
As per the official docker documentation regarding this, generally, to enable this counter you need to add a kernel command-line parameter:
To do so, simply open up /etc/default/grub with your favourite text editor.
And then add
Here's an example:
GRUB_CMDLINE_LINUX_DEFAULT="quiet cgroup_enable=memory swapaccount=1"
Then update your grub config with the following command:
and after a reboot you should now see a directory at:
And executing an info check will now show the following:
docker ------ - instance #0 [OK] - Collected 0 metrics, 0 events & 2 service checks