aims team mailing list archive
-
aims team
-
Mailing list archive
-
Message #01782
[Bug 1516451] Re: check_disk plugin broken after upgrade to 15.10
Ramon, thank you for the detailed test case, I was able to run through
it exactly as you described, both as root user (see attached) and as
nagios (with sudo setup). I suspect I'm unable to reproduce the issue
you're seeing since under lxc the /sys/kernel/debug directory belongs to
the host and thus is owned by nobody:nogroup, (although I should think
that it would produce a permission denied error.)
>From the host:
# mount | grep tracing
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
In any case, regarding the bug itself, I am able to detect the
permissions error:
# /usr/lib/nagios/plugins/check_disk -e
DISK CRITICAL - /sys/kernel/debug/tracing is not accessible: Permission denied
# ls -la /sys/kernel/debug/tracing
ls: cannot access '/sys/kernel/debug/tracing': Permission denied
# /usr/lib/nagios/plugins/check_disk -e -X tracefs
DISK OK| /=44420MB;;;0;3754403 /dev=0MB;;;0;0 /dev/full=0MB;;;0;16018 /dev/null=0MB;;;0;16018 /dev/random=0MB;;;0;16018 /dev/tty=0MB;;;0;16018 /dev/urandom=0MB;;;0;16018 /dev/zero=0MB;;;0;16018 /dev/fuse=0MB;;;0;16018 /dev/net/tun=0MB;;;0;16018 /dev/lxd=0MB;;;0;0 /dev/.lxd-mounts=0MB;;;0;0 /dev/shm=0MB;;;0;16041 /run=16MB;;;0;16041 /run/lock=0MB;;;0;5 /sys/fs/cgroup=0MB;;;0;16041 /var/lib/lxd/shmounts=0MB;;;0;0 /var/lib/lxd/devlxd=0MB;;;0;0 /run/user/1001=0MB;;;0;3208
The suggestion in comment #16 looks like the best approach for
addressing the issue so far. Alternatively, I posted a patch to LP
#1827159 for altering check_disk itself, however as mentioned in comment
#9 on this bug, excluding all tmpfs would be too broad.
Ramon, if you can test out the approach outlined in comment #16 and let
me know if it seems suitable for your use case, perhaps we should
proceed with implementing an SRU for that.
** Attachment added: "Screenshot from 2019-07-17 14-19-10.png"
https://bugs.launchpad.net/ubuntu/+source/nagios-plugins/+bug/1516451/+attachment/5277690/+files/Screenshot%20from%202019-07-17%2014-19-10.png
--
You received this bug notification because you are a member of AIMS,
which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1516451
Title:
check_disk plugin broken after upgrade to 15.10
Status in nagios-plugins package in Ubuntu:
Incomplete
Bug description:
I didn't touch my Nagios config, just update my system from 15.04 to
15.10. Suddenly the default localhost/Disk Space check fails with the
following output:
DISK CRITICAL - /sys/kernel/debug/tracing is not accessible:
Permission denied
This can be reproduced when manually running the underlying command as
user "nagios":
$ /usr/lib/nagios/plugins/check_disk -w '20%' -c '10%' -e
DISK CRITICAL - /sys/kernel/debug/tracing is not accessible: Permission denied
When I run it as root it works:
# /usr/lib/nagios/plugins/check_disk -w '20%' -c '10%' -e
DISK OK| /dev=0MB;1186;1334;0;1483 /run=8MB;239;269;0;299 /=17157MB;57386;64559;0;71733 /dev/shm=0MB;1199;1349;0;1499 /run/lock=0MB;4;4;0;5 /sys/fs/cgroup=0MB;1199;1349;0;1499 /boot=48MB;181;204;0;227 /run/user/0=0MB;239;269;0;299
Seems "nagios" user can't access the dir it tries to access:
# ls -la /sys/kernel/debug/tracing
drwx------ 7 root root 0 Nov 15 19:40 .
# lsb_release -rd
Description: Ubuntu 15.10
Release: 15.10
# apt-cache policy nagios-plugins-basic
nagios-plugins-basic:
Installed: 1.5-3ubuntu1
Candidate: 1.5-3ubuntu1
Version table:
*** 1.5-3ubuntu1 0
500 http://de.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
100 /var/lib/dpkg/status
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nagios-plugins/+bug/1516451/+subscriptions