dd.collector[1724]: WARNING (disk.py:109): Unable to get disk metrics for ...
When I mount anobject storage using: https://github.com/ovh/svfs
I get following error: dd.collector[1724]: WARNING (disk.py:109): Unable to get disk metrics for /root/gra1: [Errno 13] Permission denied: '/root/gra1'
same issue here
I'm having this issue, too, though it's just a lot of extra log messages; as far as I can see nothing is being reported incorrectly.
I'm using docker on all my servers, and sometime between docker 1.11.2 and 1.12.1 it started attaching every aufs container as a mount, so that there are many repeated "none" and "shm" filesystems in the output of $ mount. Since these are not actually contributing to the total size of any disk or disk usage, no metrics are actually going unreported, as far as I can tell.
On Ubuntu 16.04 I see this with docker 1.12.1, but not with docker 1.11.2. It also appears that downgrading datadog-agent to 1:5.8.5-1 silences these errors, but I think that's because this was previously a debug log, and now is a warning.
Linux testhost 4.4.0-45-generic #66-Ubuntu SMP Wed Oct 19 14:12:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Hey there!
If I understand correctly, your problem @randallsquared is that your logs are spammed by these errors making them difficult to read. Is it exactly the same error? [Errno 13] Permission denied ?
@ne0ark and @wesseljt, I guess you actually want the metrics from the svfs storage. We use https://docs.python.org/2/library/os.html#os.statvfs to get those metrics, and it is failing with the [Errno 13] Permission denied. The agent is running as dd-agent, could you maybe give it an access to this storage (not sure exactly what's needed, sorry)?
@degemer Hi!
Yes, it's exactly the error you quote, and log inflation is indeed the only problem I have with it, now that I understand what's going on.
Hum, the easy solution would be to switch back to debug level (since most of the time it's only noise), but as this issue shows, this warning is sometimes useful.
Could you try adding none and shm to the excluded_filesystems in disk.yaml ? https://github.com/DataDog/dd-agent/blob/master/conf.d/disk.yaml.default#L13-L14
Especially none, if it's indeed the filesystem type we could exclude it by default.
That worked perfectly, @degemer ! Thanks. :)
Hello,
I am using version 5.9.1 and I did add none, shm and nsfs to the /etc/dd-agent/conf.d/disk.yaml.default yet I still receive a lot of these:
...
2017-01-26 16:46:06 CET | WARNING | dd.collector | checks.disk(disk.py:109) | Unable to get disk metrics for /var/lib/docker/containers/4049477990b5dd0e6f464fc63561d76d767bca172749f01a745eb54716094c1e/shm: [Errno 13] Permission denied: '/var/lib/docker/containers/4049477990b5dd0e6f464fc63561d76d767bca172749f01a745eb54716094c1e/shm'
2017-01-26 16:46:06 CET | WARNING | dd.collector | checks.disk(disk.py:109) | Unable to get disk metrics for /var/lib/docker/containers/2ffda5ac8e45280fd3d27d482137490249ca1e15725274449740facd1dc89563/shm: [Errno 13] Permission denied: '/var/lib/docker/containers/2ffda5ac8e45280fd3d27d482137490249ca1e15725274449740facd1dc89563/shm'
2017-01-26 16:46:06 CET | WARNING | dd.collector | checks.disk(disk.py:109) | Unable to get disk metrics for /var/lib/docker/containers/b055760e065518661c665f30763b01392d8e983bbeaa34426a1f84a002319d23/shm: [Errno 13] Permission denied: '/var/lib/docker/containers/b055760e065518661c665f30763b01392d8e983bbeaa34426a1f84a002319d23/shm'
...
Previously I also received similiar errors for nsfs filesystem, but adding them to excluded_filesystems did remove these warnings, but shm are still appearing.
What can I do to remove these warnings?
On Ubuntu 16.04, I'm getting this log
WARNING | dd.collector | checks.disk(disk.py:106) | Unable to get disk metrics for /host/proc/sys/fs/binfmt_misc: [Errno 40] Too many levels of symbolic links: '/host/proc/sys/fs/binfmt_misc'
with this configuration
/usr/bin/docker run --name datadog \
-v /etc/datadog/conf.d:/conf.d \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /proc/:/host/proc/:ro \
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
-p 8125:8125 \
-p 8126:8126 \
-p 9001:9001 \
-p 7777:7777 \
--env-file /etc/environment.d/datadog \
datadog/docker-dd-agent
I am getting this:
dd.collector[3596]: WARNING (disk.py:106): Unable to get disk metrics for /var/named/chroot/etc/named.root.key: [Errno 13] Permission denied: '/var/named/chroot/etc/named.root.key
I am using version 5.11.2 even /var/named/chroot/ excluded with
excluded_disk_re: /var/named/chroot/*
my loggly logs (you pay for amount of logs there!) heavily spammed by dd-agent:
WARNING (disk.py:106): Unable to get disk metrics for /run/docker/netns/c061983b11e3: [Errno 13] Permission denied: '/run/docker/netns/c061983b11e3'
2017-02-28 10:55:51.043
WARNING (disk.py:106): Unable to get disk metrics for /var/lib/docker/containers/1671f06638eb2923534243a4378ad548c93fac8f583ccd2cda368ec4a19b4e62/shm: [Errno 13] Permission denied: '/var/lib/docker/containers/1671f06638eb2923534243a4378ad548c93fac8f583ccd2cda368ec4a19b4e62/shm'
2017-02-28 10:55:51.041
WARNING (disk.py:106): Unable to get disk metrics for /var/lib/docker/containers/cfa29a5c834ecf112d9c3dd6f50ca52e50f453c40876484a383e09a2e3b50f79/shm: [Errno 13] Permission denied: '/var/lib/docker/containers/cfa29a5c834ecf112d9c3dd6f50ca52e50f453c40876484a383e09a2e3b50f79/shm'
2017-02-28 10:55:51.038
WARNING (disk.py:106): Unable to get disk metrics for /run/docker/netns/default: [Errno 13] Permission denied: '/run/docker/netns/default'
2017-02-28 10:55:51.036
WARNING (disk.py:106): Unable to get disk metrics for /var/lib/docker/overlay/81b7f13d32732320fe158ea991a7e7a9f3cb4f8c50d9408c013e300c9e7259e7/merged: [Errno 13] Permission denied: '/var/lib/docker/overlay/81b7f13d32732320fe158ea991a7e7a9f3cb4f8c50d9408c013e300c9e7259e7/merged'
2017-02-28 10:55:51.033
WARNING (disk.py:106): Unable to get disk metrics for /var/lib/docker/overlay/bea2782f91b9fd4d6aed9d5c226ccd6c3df1d43394e14556e8858f02fa08a5e9/merged: [Errno 13] Permission denied: '/var/lib/docker/overlay/bea2782f91b9fd4d6aed9d5c226ccd6c3df1d43394e14556e8858f02fa08a5e9/merged'
is there any way to disable this warnings?
version of datadog:
root@scw-033b1b:/etc/dd-agent/conf.d# apt show datadog-agent
Package: datadog-agent
Version: 1:5.11.2-1
Sorry for the trouble, we're considering silencing this warning on Docker (since it seems to be the main issue there). Could you confirm you're running the agent using our Docker image ?
In the meantime, you can try the excluded_filesystems option. To get the filesystem corresponding to a mountpoint, you can run this one-liner (replacing /my/mountpoint by yours):
DISK='/my/mountpoint' /opt/datadog-agent/embedded/bin/python -c 'import psutil; import os; print [part.fstype for part in psutil.disk_partitions(all=True) if part.mountpoint == os.environ["DISK"]][0]'
It should print the detected filesystem. Could you give it a try @rindek @andreysaksonov ?
@paulrm excluded_disk_re has to be a Python regex, so excluded_disk_re: /var/named/chroot/.* should work.
@geowa4 you can try either the excluded_disk_re option or the excluded_filesystems one.
Let us know if this helps you!
I have been unable to make any of these suggestion work. I have 3 secure-NFS mounts which are spamming my /var/log/messages with errors, e.g. every server has local mount /install = nas:/exports/install-files.
I have tried all the following:
excluded_filesystems:
- nfs4
excluded_disks:
- /install/.*
excluded_disk_re: /install/.*
excluded_mountpoint_re: /install/.*
Are these settings dependent on the 'use_mount' yes/no setting?
Is there a log-file or diagnostic command-line you can run to confirm that your custom 'disk.yaml' is being used?
I'm running a bare metal Ubuntu 16.04 (LTS) server. I'm getting lots of these messages as well:
Apr 12 09:30:12 server-name dd.collector[1523]: WARNING (disk.py:106): Unable to get disk metrics for /sys/kernel/debug/tracing: [Errno 13] Permission denied: '/sys/kernel/debug/tracing'
@degemer, when I run your python script, it reports the filesystem as tracefs
Doing the filesystem exclusion in disk.yaml cleared the warnings for me:
excluded_filesystems:
- tracefs
We get the error:
WARNING | dd.collector | checks.disk(disk.py:106) | Unable to get disk metrics for /host/proc/sys/fs/binfmt_misc: [Errno 40] Too many levels of symbolic links: '/host/proc/sys/fs/binfmt_misc'
Running on a centos7 based image
docker run -d --name dd-agent -m 256m --restart=always --oom-kill-disable=true \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /proc/:/host/proc:ro \
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
-v /opt/datadog-agent/agent/conf.d/docker_daemon.yaml:/opt/datadog-agent/agent/conf.d/docker_daemon.yaml \
-e API_KEY="..." \
-e TAGS="testing" \
-e EC2_TAGS="yes" \
-h `hostname` -p 8125:8125/udp datadog/docker-dd-agent:latest-alpine
- The docker container is started during boot using a user-script.
- The command
ls -l /host/proc/sys/fs/binfmt_misc/failed in the container, worked in the host. - In our case, we found out that restarting the docker container fixed the issue.
Is there a general solution for either fixing or silencing this? I am receiving a similar version of this warning as @andreysaksonov is/was:
Jul 24 11:01:45 ip-10-81-104-135 dd.collector: WARNING (disk.py:106): Unable to get disk metrics for /run/docker/netns/ingress_sbox: [Errno 13] Permission denied: '/run/docker/netns/ingress_sbox'
Jul 24 11:01:45 ip-10-81-104-135 dd.collector: WARNING (disk.py:106): Unable to get disk metrics for /run/docker/netns/1-pnbhxtmol6: [Errno 13] Permission denied: '/run/docker/netns/1-pnbhxtmol6'
I am not running the docker container version of dd-agent.
sudo /etc/init.d/datadog-agent info | grep -i -e "v [0-9]"
Collector (v 5.14.1)
Dogstatsd (v 5.14.1)
Forwarder (v 5.14.1)
Trace Agent (v 5.14.1)
I have managed to fix that perm denied errors by adding a /etc/dd-agent/conf.d/disk.yml with the contents:
init_config: null
instances:
- excluded_filesystems:
- tmpfs
- none
- shm
- nsfs
- netns
use_mount: false
If any similiar error shows up I simply add that to the list. The list of filesystems I found using "mount" command and see which type of FS is mounted and which DD is unable to fetch
For "/sys/kernel/debug/tracing": Add "- tracefs" to /etc/dd-agent/conf.d/disk.yml
Example if you have have copied disk.yaml.default to be disk.yaml N.B. the owner and group needs to be "dd-agent" for the file.
instances:
# The use_mount parameter will instruct the check to collect disk
# and fs metrics using mount points instead of volumes
- use_mount: no
# The (optional) excluded_filesystems parameter will instruct the check to
# ignore disks using these filesystems. Note: On some linux distributions,
# rootfs will be found and tagged as a device, add rootfs here to exclude.
excluded_filesystems:
- tracefs
FYI I solved my issue, though it may be different than what others are experiencing. It seems that the parser for the 'disk.yaml' is extremely picky about spacing -- when I adjusted each entry so that it was indented either 2-spaces or 4-spaces, then it worked as expected.
There was no error or logging to indicate that the .yaml was being rejected for formatting.
@sdsalsero ya, yaml is super picky on white space.
@sdsalsero If you are on a system with systemD you can run and the log output will give a parse error. (systemctl status da will autocomplete the service name)
systemctl status datadog-agent
# systemctl restart datadog-agent.service status
...
datadog-agent.service - "Datadog Agent"
Aug 03 17:29:58 ccpc-udm-n2 dd.collector[18597]: ERROR (config.py:957): Unable to parse yaml config in /etc/dd-agent/conf.d/disk.yaml
Traceback (most recent call last):
...