Was able to reproduce using the command in /etc/nagios-
plugins/config/disk.cfg; I've added this as a test case in the report
body.

Adding -X squashfs did nothing, but -X tmpfs worked:

# /usr/lib/nagios/plugins/check_disk -w 10 -c 10 -e -X squashfs
DISK CRITICAL - free space: /dev 0 MB (100% inode=99%); /dev/lxd 0 MB (100% 
inode=99%); [...]

# /usr/lib/nagios/plugins/check_disk -w 10 -c 10 -e -X tmpfs
DISK OK| /=111171MB;119160;119160;0;119170

monitoring-plugins-gu/plugins/check_disk.c includes some filtering code, which 
skips:
* Remote file systems (me_remote)
* Pseudo file systems (me_dummy)
* Excluded filesystems (fs_exclude_list)
* Excluded filesystem types (dp_exclude_list)

Looks like by default the fs_exclude_list has only one fs type added to
it:

  np_add_name(&fs_exclude_list, "iso9660");

Maybe a possible patch might be to add tmpfs there too (see attached;
untested)?

** Patch added: "check_disk_no_tmpfs.patch"
   
https://bugs.launchpad.net/nagios-charm/+bug/1827159/+attachment/5273538/+files/check_disk_no_tmpfs.patch

** Tags added: server-next

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1827159

Title:
  check_all_disks includes squashfs /snap/* which are 100%

To manage notifications about this bug go to:
https://bugs.launchpad.net/nagios-charm/+bug/1827159/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to