New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check_disk - exclude squashfs, etc. by default #1608
Comments
These synthetic filesystems always report 100% disk usage by design, so can generate false-positive "disk full" alerts. While it is possible to exclude these via command line arguments, it is more convenient to ignore them directly by the tool. Fixes: monitoring-plugins#1608
I personally do not care if I have to add 12 or 16 parameters to check_disk, as that is done once in the Icinga2 command definition. I already exclude
But that is of course site-dependant. |
I'm voting no on adding tmpfs to the exclude list, as excludes can't be overridden by command line arguments. tmpfs also reports correctly on my Ubuntu systems:
|
I think, this is better left over to the monitoring system, not the plugin |
In Ubuntu, squashfs is routinely used for snap files, but since these are synthetic filesystems they display as 100% utilization and thus trigger check_disk to issue a false positive DISK CRITICAL error.
Similar false positives have been reported to us for tracefs and tmpfs. The commonly discussed workaround is to exclude these when running the tools (e.g. using the '-X ' parameter for check_all_disks). Since wrappers are typically used for running the underlying tools, it is possible to add a string of -X... parameters.
Unfortunately the number of flags needed is getting extensive, and I wonder if this could be solved more uniformly. For filesystems that are always going to show 100% capacity, a cleaner solution is possible. monitoring-plugins' check_disk.c maintains an internal exclusion list, fs_exclude_list, which already excludes iso9660, and can be modified to add other filesystems to exclude by default.
In other words, check_disk.c would be modified thusly:
np_add_name(&fs_exclude_list, "iso9660");
np_add_name(&fs_exclude_list, "squashfs");
np_add_name(&fs_exclude_list, "tmpfs");
np_add_name(&fs_exclude_list, "tracefs");
This code is added prior to the command line parsing logic, and as such simply sets default behavior. It does not preclude further adding or removing filesystems via the -X and -N parameters. Indeed, if someone were to desire checking tmpfs, they are able to manually add it, via "-N tmpfs".
The text was updated successfully, but these errors were encountered: