diff -Nru monitoring-plugins-2.2/debian/changelog monitoring-plugins-2.2/debian/changelog --- monitoring-plugins-2.2/debian/changelog 2020-05-02 14:35:43.000000000 +0800 +++ monitoring-plugins-2.2/debian/changelog 2022-06-27 18:12:04.000000000 +0800 @@ -1,3 +1,12 @@ +monitoring-plugins (2.2-3ubuntu4) bionic; urgency=medium + + * d/p/exclude-tmpfs-squashfs-tracefs.patch: Ignore artificial filesystems + that trigger false-positive DISK CRITICAL checks due to reporting as at + 100% capacity. + (LP: #1827159) + + -- Zhang Hua Mon, 27 Jun 2022 18:12:04 +0800 + monitoring-plugins (2.2-3ubuntu3) bionic; urgency=medium [Haw Loeung] diff -Nru monitoring-plugins-2.2/debian/patches/exclude-tmpfs-squashfs-tracefs.patch monitoring-plugins-2.2/debian/patches/exclude-tmpfs-squashfs-tracefs.patch --- monitoring-plugins-2.2/debian/patches/exclude-tmpfs-squashfs-tracefs.patch 1970-01-01 08:00:00.000000000 +0800 +++ monitoring-plugins-2.2/debian/patches/exclude-tmpfs-squashfs-tracefs.patch 2022-06-27 18:11:40.000000000 +0800 @@ -0,0 +1,57 @@ +Description: Exclude tmpfs, squashfs, and tracefs. + 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 taking into account if they have been + included by options or not and if a mount point has been provided in + the args. +Author: Bryce Harrington + Miriam EspaƱa Acebal +Bug-Ubuntu: https://bugs.launchpad.net/nagios-charm/+bug/1827159 + https://bugs.launchpad.net/ubuntu/+source/monitoring-plugins/+bug/1940916 +Forwarded: yes, https://github.com/monitoring-plugins/monitoring-plugins/pull/1749 +Last-Update: 2019-11-07 +--- + plugins/check_disk.c | 3 +++ + 1 file changed, 3 insertions(+) + +Index: monitoring-plugins-2.2/plugins/check_disk.c +=================================================================== +--- monitoring-plugins-2.2.orig/plugins/check_disk.c ++++ monitoring-plugins-2.2/plugins/check_disk.c +@@ -417,7 +417,7 @@ double calculate_percent(uintmax_t value + int + process_arguments (int argc, char **argv) + { +- int c, err; ++ int c, err, i; + struct parameter_list *se; + struct parameter_list *temp_list = NULL, *previous = NULL; + struct mount_entry *me; +@@ -467,11 +467,11 @@ process_arguments (int argc, char **argv + {0, 0, 0, 0} + }; + ++ char filesystems[3][10] = { "tmpfs", "squashfs", "tracefs" }; ++ + if (argc < 2) + return ERROR; + +- np_add_name(&fs_exclude_list, "iso9660"); +- + for (c = 1; c < argc; c++) + if (strcmp ("-to", argv[c]) == 0) + strcpy (argv[c], "-t"); +@@ -785,6 +785,12 @@ process_arguments (int argc, char **argv + mult = (uintmax_t)1024 * 1024; + } + ++ for (i = 0; i < 3; i++) ++ if (!np_find_name (fs_include_list, filesystems[i]) && (path_selected == FALSE)) ++ np_add_name(&fs_exclude_list, filesystems[i]); ++ ++ np_add_name(&fs_exclude_list, "iso9660"); ++ + return TRUE; + } + diff -Nru monitoring-plugins-2.2/debian/patches/series monitoring-plugins-2.2/debian/patches/series --- monitoring-plugins-2.2/debian/patches/series 2020-05-02 14:35:43.000000000 +0800 +++ monitoring-plugins-2.2/debian/patches/series 2022-06-27 18:11:27.000000000 +0800 @@ -5,3 +5,6 @@ 12_check_apt_only_crit 13_check_apt_list_packages 14_check_http_socket_timeouts + +# Ubuntu +exclude-tmpfs-squashfs-tracefs.patch