Check_disk reports CRITICAL even though space is available

Since yesterday one of our disk checks reports critical 0MB (0%) even though there is plenty of space on the disk. Here is the output of df and the check for the failing mount (file system is btrfs, hence no inode count):

# df -i /mnt/backup-testsystem
Filesystem                         Inodes IUsed IFree IUse% Mounted on
/dev/mapper/vg0-backup--testsystem      0     0     0     - /mnt/backup-testsystem
# df -m /mnt/backup-testsystem
Filesystem                         1M-blocks   Used Available Use% Mounted on
/dev/mapper/vg0-backup--testsystem   6291456 564844   5726730   9% /mnt/backup-testsystem
# /usr/lib/nagios/plugins/check_disk -c 10%  -p /mnt/backup-testsystem
DISK CRITICAL - free space: /mnt/backup-testsystem 0 MB (0% inode=-)];| /mnt/backup-testsystem=564843MB;;5662310;0;6291456

By comparison, same host, different mount works fine:

# df -i /mnt/backup-produktiv/
Filesystem                        Inodes IUsed IFree IUse% Mounted on
/dev/mapper/vg0-backup--produktiv      0     0     0     - /mnt/backup-produktiv
# df -m /mnt/backup-produktiv/
Filesystem                        1M-blocks    Used Available Use% Mounted on
/dev/mapper/vg0-backup--produktiv   8388608 7196070   1186063  86% /mnt/backup-produktiv
# /usr/lib/nagios/plugins/check_disk -c 10%  -p /mnt/backup-produktiv/
DISK OK - free space: /mnt/backup-produktiv 1186062 MB (14% inode=-);| /mnt/backup-produktiv=7196069MB;;7549747;0;8388608

Any ideas what is wrong here? The check worked fine up until yesterday.

Thanks,

Stefan

Just an idea: different mount options?

Unfortunately the mount options are 100% identical between the two. I can do a check of the file system, but somehow I wonder how that can be the problem since there’s nothing indicative of that :thinking:

Hi.

It seems that this already happened in the past for check_disk and checks on BTRFS.
Maybe you could use check_disk_btrfs instead.

Greetings.

Ah, I see. I found https://github.com/monitoring-plugins/monitoring-plugins/issues/1357 so that might already be the problem. Hope it gets fixed soon.

edit: oh, that’s from 2015/2016 so shouldn’t get my hopes up :frowning:

Maybe an old bug has occurred again.
You could create an issue or use the suggested alternative.
Are you using the latest version of check_disk?

From what I understand the bug/feature has been introduced in 2016 or so and never been fixed because it would break on other systems. My version of monitoring-plugins is 2.2-6.

I leave a message here for others who found this thread by searching for that problem:

As of Nagios 4.4.6, the bug is still present. But it has been fixed and merged (https://github.com/monitoring-plugins/monitoring-plugins/pull/1388/commits/23436a18516e66469aeb4d81329d62ee4bfa7a51). So the fix should be included in the next release.
For now, you can either wait or build the plugin from the source (https://github.com/monitoring-plugins/monitoring-plugins).

2 Likes