diff -Nru monitoring-plugins-2.2/debian/changelog monitoring-plugins-2.2/debian/changelog --- monitoring-plugins-2.2/debian/changelog 2020-05-02 06:43:05.000000000 +0000 +++ monitoring-plugins-2.2/debian/changelog 2021-12-01 06:55:47.000000000 +0000 @@ -1,3 +1,12 @@ +monitoring-plugins (2.2-6ubuntu1.2) focal; urgency=medium + + * d/p/exclude-tmpfs-squashfs-tracefs.patch: Adding synthetic filesystems + for exclusion only if they have not been included and no mount point + has been provided in command line. Re-implementing solution for + LP bug 1827159. (LP: #1940916). + + -- Miriam España Acebal Wed, 01 Dec 2021 07:55:47 +0100 + monitoring-plugins (2.2-6ubuntu1.1) focal; 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 2020-05-02 06:43:05.000000000 +0000 +++ monitoring-plugins-2.2/debian/patches/exclude-tmpfs-squashfs-tracefs.patch 2021-12-01 06:55:47.000000000 +0000 @@ -2,29 +2,54 @@ 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. + 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 -Forwarded: yes, https://github.com/monitoring-plugins/monitoring-plugins/pull/1609 + 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(+) -diff --git a/plugins/check_disk.c b/plugins/check_disk.c -index e73a008..ec5d663 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c -@@ -471,6 +471,9 @@ process_arguments (int argc, char **argv) - return ERROR; +@@ -417,7 +417,7 @@ + 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 @@ + {0, 0, 0, 0} + }; - 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"); ++ 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) --- -2.17.1 - + strcpy (argv[c], "-t"); +@@ -785,6 +785,12 @@ + 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; + } +