Page 1 of 1

Seemingly incorrect disk space for check-disk inside a docke

Posted: Thu Mar 14, 2019 10:35 am
by mtdeguzis
Hi, we run Icinga2 inside a docker container, which by default, pulls in some checks for things like the disk space.

This displays wildly incorrect warnings about the current state of disk usage:

Code: Select all

$ '/usr/lib64/nagios/plugins/check_disk' '-c' '10%' '-w' '20%' '-X' 'none' '-X' 'tmpfs' '-X' 'sysfs' '-X' 'proc' '-X' 'configfs' '-X' 'devtmpfs' '-X' 'devfs' '-X' 'mtmfs' '-X' 'tracefs' '-X' 'cgroup' '-X' 'fuse.gvfsd-fuse' '-X' 'fuse.gvfs-fuse-daemon' '-X' 'fdescfs' '-X' 'overlay' '-X' 'nsfs' '-X' 'squashfs' '-m' -n

DISK WARNING - free space:
/ 7992 MB (78.16% inode=98%);
/icinga-backups 6275 MB (12.26% inode=99%);
/etc/icinga2 6275 MB (12.26% inode=99%);
/etc/icingaweb2 6275 MB (12.26% inode=99%);
/run/secrets 6275 MB (12.26% inode=99%);
/etc/resolv.conf 6275 MB (12.26% inode=99%);
/etc/hostname 6275 MB (12.26% inode=99%);
/etc/hosts 6275 MB (12.26% inode=99%);
/var/log/icinga2 6275 MB (12.26% inode=99%);
/var/lib/icinga2 6275 MB (12.26% inode=99%);
| /=2233MB;8180;9203;0;10226 /icinga-backups=44895MB;40936;46053;0;51171 /etc/icinga2=44895MB;40936;46053;0;51171 /etc/icingaweb2=44895MB;40936;46053;0;51171 /run/secrets=44895MB;40936;46053;0;51171 /etc/resolv.conf=44895MB;40936;46053;0;51171 /etc/hostname=44895MB;40936;46053;0;51171 /etc/hosts=44895MB;40936;46053;0;51171 /var/log/icinga2=44895MB;40936;46053;0;51171 /var/lib/icinga2=44895MB;40936;46053;0;51171
df inside the container:

Code: Select all

$ df -h
Filesystem                                                                                           Size  Used Avail Use% Mounted on
/dev/mapper/docker-253:3-126064738-5677da1e1badc5ac1a4a1258fa9acae03c5658db35c7f86abc38819b638aae14   10G  2.2G  7.9G  22% /
tmpfs                                                                                                126G     0  126G   0% /dev
tmpfs                                                                                                126G     0  126G   0% /sys/fs/cgroup
/dev/mapper/rhel-var                                                                                  50G   44G  6.2G  88% /etc/hosts
shm                                                                                                   64M     0   64M   0% /dev/shm
tmpfs                                                                                                126G     0  126G   0% /proc/acpi
tmpfs                                                                                                126G     0  126G   0% /proc/scsi
tmpfs                                                                                                126G     0  126G   0% /sys/firmware
df on the parent host:

Code: Select all

$ df -h
Filesystem                           Size  Used Avail Use% Mounted on
/dev/mapper/rhel-root                4.0G  1.6G  2.5G  40% /
devtmpfs                             126G     0  126G   0% /dev
tmpfs                                126G     0  126G   0% /dev/shm
tmpfs                                126G  4.1G  122G   4% /run
tmpfs                                126G     0  126G   0% /sys/fs/cgroup
/dev/mapper/rhel-usr                  20G  8.6G   12G  43% /usr
/dev/sda2                           1016M  173M  844M  18% /boot
/dev/mapper/rhel-var                  50G   44G  6.2G  88% /var
/dev/mapper/rhel-tmp                 8.0G  546M  7.5G   7% /tmp
/dev/sda1                            200M  9.8M  191M   5% /boot/efi
/dev/mapper/vg_data1-hadoop          500G   25G  476G   5% /hadoop
/dev/mapper/vg_data1-home            5.0G  4.1G 1002M  81% /home
tmpfs                                 26G     0   26G   0% /run/user/4906
tmpfs                                 26G     0   26G   0% /run/user/4434
tmpfs                                 26G     0   26G   0% /run/user/4955
tmpfs                                 26G     0   26G   0% /run/user/0
tmpfs                                 26G     0   26G   0% /run/user/4959
tmpfs                                 26G     0   26G   0% /run/user/4436
gdchdpmn04drlx.geisinger.edu:/group  219T  163T   56T  75% /hdfs/group
tmpfs                                 26G     0   26G   0% /run/user/4185
What should be the expectation here? This causes false alerts from our support services teams when the / disk inside the container is just fine with space.

Submitted: https://github.com/nagios-plugins/nagio ... issues/437

Re: Seemingly incorrect disk space for check-disk inside a d

Posted: Thu Mar 14, 2019 11:11 am
by scottwilkerson
mtdeguzis wrote:Hi, we run Icinga2 inside a docker container, which by default, pulls in some checks for things like the disk space.
Sorry, we do not support Icinga, this is a Nagios forum

Re: Seemingly incorrect disk space for check-disk inside a d

Posted: Thu Mar 14, 2019 11:37 am
by mtdeguzis
This has 0% to do with Icinga and 100% to do with check-disk inside a docker container.

Re: Seemingly incorrect disk space for check-disk inside a d

Posted: Thu Mar 14, 2019 12:34 pm
by scottwilkerson
The forum you posted to was a Nagios XI forum.

thanks for adding the bug report to Nagios Plugins project.

Re: Seemingly incorrect disk space for check-disk inside a d

Posted: Thu Mar 14, 2019 12:48 pm
by scottwilkerson
looking at your results you have it set to warn if there is less than 20% free and the following has less than 20% free

Code: Select all

/etc/hosts 6275 MB (12.26% inode=99%);