[pkg-nagios-changes] [Git][nagios-team/monitoring-plugins][master] 16 commits: Adding d/p/14_check_curl_fix_SSL_with_multiple_IPs from upstream

Jan Wagner (@waja) gitlab at salsa.debian.org
Mon Jun 12 09:47:40 BST 2023



Jan Wagner pushed to branch master at Debian Nagios Maintainer Group / monitoring-plugins


Commits:
e1f97860 by Jan Wagner at 2023-03-13T08:28:36+00:00
Adding d/p/14_check_curl_fix_SSL_with_multiple_IPs from upstream

- - - - -
534d0c88 by Jan Wagner at 2023-03-13T08:31:34+00:00
Adding d/p/30_check_radius_radcli_1.3.1_support from upstream

- - - - -
bd72df25 by Jan Wagner at 2023-03-13T08:38:20+00:00
Adding d/p/31_checl_mailq_separate_submission_queue from upstream

- - - - -
567890c3 by Jan Wagner at 2023-03-13T08:43:42+00:00
Adding d/p/32_check_disk_add_ignore_missing from upstream (Closes: #516097)

- - - - -
47b7589c by Jan Wagner at 2023-03-16T22:11:03+00:00
Adding d/p/15_check_swap_remove_includes from upstream

- - - - -
6f89be83 by Jan Wagner at 2023-03-24T19:04:52+00:00
Adding d/p/33_check_procs_exclude-process from upstream

- - - - -
983507a1 by Jan Wagner at 2023-03-27T14:02:54+00:00
Adding d/p/34_check_curl_fix_compare_warning from upstream

- - - - -
49df534b by Jan Wagner at 2023-04-14T14:23:44+00:00
Merge branch 'master' into experimental

- - - - -
9225592b by Jan Wagner at 2023-05-05T18:53:57+00:00
Adding d/p/17_fix_exit_codes from upstream

- - - - -
3a0d875c by Jan Wagner at 2023-05-05T18:56:38+00:00
Adding d/p/18_check_mysql_fix_typo from upstream

- - - - -
17688c79 by Jan Wagner at 2023-05-05T18:58:42+00:00
Adding d/p/19_check_nwstat_fix_typo from upstream

- - - - -
e0cfe77e by Jan Wagner at 2023-05-10T15:39:06+00:00
Adding d/p/20_chech_nt_fix_encoding from upstream

- - - - -
3da21634 by Jan Wagner at 2023-05-10T15:40:58+00:00
Adding d/p/21_check_pgsql_extra_output from upstream

- - - - -
7cbe4b61 by Jan Wagner at 2023-05-23T09:49:23+02:00
Adding d/p/22_check_disk_avoid_mount from upstream

- - - - -
01be8ce8 by Jan Wagner at 2023-05-23T10:04:36+02:00
d/p/series: Fix typo

- - - - -
85d9e03e by Jan Wagner at 2023-05-31T16:38:05+02:00
Adding d/p/23_check_mysql_fix_error_handling from upstream

- - - - -


13 changed files:

- + debian/patches/17_fix_exit_codes
- + debian/patches/18_check_mysql_fix_typo
- + debian/patches/19_check_nwstat_fix_typo
- + debian/patches/20_chech_nt_fix_encoding
- + debian/patches/21_check_pgsql_extra_output
- + debian/patches/22_check_disk_avoid_mount
- + debian/patches/23_check_mysql_fix_error_handling
- + debian/patches/30_check_radius_radcli_1.3.1_support
- + debian/patches/31_checl_mailq_separate_submission_queue
- + debian/patches/32_check_disk_add_ignore_missing
- + debian/patches/33_check_procs_exclude-process
- + debian/patches/34_check_curl_fix_compare_warning
- debian/patches/series


Changes:

=====================================
debian/patches/17_fix_exit_codes
=====================================
@@ -0,0 +1,166 @@
+From 5af4db7b4169acee20bfa2d637ce3f3eb5bdef47 Mon Sep 17 00:00:00 2001
+From: MisterMountain <bjoern.berg at netways.de>
+Date: Tue, 11 Apr 2023 16:26:12 +0200
+Subject: [PATCH 1/3] fixed the outputs of the --versions options on 3 scripts
+
+---
+ plugins-scripts/check_log.sh     | 2 +-
+ plugins-scripts/check_oracle.sh  | 2 +-
+ plugins-scripts/check_sensors.sh | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/plugins-scripts/check_log.sh b/plugins-scripts/check_log.sh
+index c623a8d6b..10c56f14b 100755
+--- a/plugins-scripts/check_log.sh
++++ b/plugins-scripts/check_log.sh
+@@ -109,7 +109,7 @@ while test -n "$1"; do
+             ;;
+         -V | --version)
+             print_revision "$PROGNAME" "$REVISION"
+-            exit "$STATE_OK"
++            exit "$STATE_UNKNOWN"
+             ;;
+         -F | --filename)
+             logfile=$2
+diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh
+index b14ec50ed..f340b97c4 100755
+--- a/plugins-scripts/check_oracle.sh
++++ b/plugins-scripts/check_oracle.sh
+@@ -95,7 +95,7 @@ case "$cmd" in
+     ;;
+ --version)
+ 		print_revision "$PROGNAME" "$REVISION"
+-    exit "$STATE_OK"
++    exit "$STATE_UNKNOWN"
+     ;;
+ -V)
+ 		print_revision "$PROGNAME" "$REVISION"
+diff --git a/plugins-scripts/check_sensors.sh b/plugins-scripts/check_sensors.sh
+index 921e7b365..3c4cf01bf 100755
+--- a/plugins-scripts/check_sensors.sh
++++ b/plugins-scripts/check_sensors.sh
+@@ -34,7 +34,7 @@ case "$1" in
+ 		;;
+ 	--version)
+ 		print_revision "$PROGNAME" "$REVISION"
+-		exit "$STATE_OK"
++		exit "$STATE_UNKNOWN"
+ 		;;
+ 	-V)
+ 		print_revision "$PROGNAME" "$REVISION"
+
+From 3dc677e4f1f990e7b26bc714a02608070379cf85 Mon Sep 17 00:00:00 2001
+From: MisterMountain <bjoern.berg at netways.de>
+Date: Tue, 11 Apr 2023 17:11:06 +0200
+Subject: [PATCH 2/3] fixed the identation (and also patched -V on check_oracle
+ to behave exactly like --version again)
+
+---
+ plugins-scripts/check_oracle.sh  | 10 +++++-----
+ plugins-scripts/check_sensors.sh |  2 +-
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh
+index f340b97c4..d58cfbea3 100755
+--- a/plugins-scripts/check_oracle.sh
++++ b/plugins-scripts/check_oracle.sh
+@@ -86,20 +86,20 @@ esac
+ # Information options
+ case "$cmd" in
+ --help)
+-		print_help
++    print_help
+     exit "$STATE_OK"
+     ;;
+ -h)
+-		print_help
++    print_help
+     exit "$STATE_OK"
+     ;;
+ --version)
+-		print_revision "$PROGNAME" "$REVISION"
++    print_revision "$PROGNAME" "$REVISION"
+     exit "$STATE_UNKNOWN"
+     ;;
+ -V)
+-		print_revision "$PROGNAME" "$REVISION"
+-    exit "$STATE_OK"
++    print_revision "$PROGNAME" "$REVISION"
++    exit "$STATE_UNKNOWN"
+     ;;
+ esac
+ 
+diff --git a/plugins-scripts/check_sensors.sh b/plugins-scripts/check_sensors.sh
+index 3c4cf01bf..adbfc533f 100755
+--- a/plugins-scripts/check_sensors.sh
++++ b/plugins-scripts/check_sensors.sh
+@@ -38,7 +38,7 @@ case "$1" in
+ 		;;
+ 	-V)
+ 		print_revision "$PROGNAME" "$REVISION"
+-		exit "$STATE_OK"
++		exit "$STATE_UNKNOWN"
+ 		;;
+ 	*)
+ 		sensordata=$(sensors 2>&1)
+
+From 21885d85d54ce2afe7b9bf962348dc60e31442e0 Mon Sep 17 00:00:00 2001
+From: MisterMountain <bjoern.berg at netways.de>
+Date: Tue, 2 May 2023 09:40:35 +0200
+Subject: [PATCH 3/3] also fixed the --help returns
+
+---
+ plugins-scripts/check_log.sh     | 2 +-
+ plugins-scripts/check_oracle.sh  | 4 ++--
+ plugins-scripts/check_sensors.sh | 4 ++--
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/plugins-scripts/check_log.sh b/plugins-scripts/check_log.sh
+index 10c56f14b..8ecdd3164 100755
+--- a/plugins-scripts/check_log.sh
++++ b/plugins-scripts/check_log.sh
+@@ -105,7 +105,7 @@ while test -n "$1"; do
+     case "$1" in
+         -h | --help)
+             print_help
+-            exit "$STATE_OK"
++            exit "$STATE_UNKNOWN"
+             ;;
+         -V | --version)
+             print_revision "$PROGNAME" "$REVISION"
+diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh
+index d58cfbea3..599813865 100755
+--- a/plugins-scripts/check_oracle.sh
++++ b/plugins-scripts/check_oracle.sh
+@@ -87,11 +87,11 @@ esac
+ case "$cmd" in
+ --help)
+     print_help
+-    exit "$STATE_OK"
++    exit "$STATE_UNKNOWN"
+     ;;
+ -h)
+     print_help
+-    exit "$STATE_OK"
++    exit "$STATE_UNKNOWN"
+     ;;
+ --version)
+     print_revision "$PROGNAME" "$REVISION"
+diff --git a/plugins-scripts/check_sensors.sh b/plugins-scripts/check_sensors.sh
+index adbfc533f..866e0e0f0 100755
+--- a/plugins-scripts/check_sensors.sh
++++ b/plugins-scripts/check_sensors.sh
+@@ -26,11 +26,11 @@ print_help() {
+ case "$1" in
+ 	--help)
+ 		print_help
+-		exit "$STATE_OK"
++		exit "$STATE_UNKNOWN"
+ 		;;
+ 	-h)
+ 		print_help
+-		exit "$STATE_OK"
++		exit "$STATE_UNKNOWN"
+ 		;;
+ 	--version)
+ 		print_revision "$PROGNAME" "$REVISION"


=====================================
debian/patches/18_check_mysql_fix_typo
=====================================
@@ -0,0 +1,22 @@
+From d10ee31d89c2c599ee4c502e82d632aef8554020 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lorenz=20K=C3=A4stle?= <lorenz.kaestle at netways.de>
+Date: Fri, 28 Apr 2023 16:51:39 +0200
+Subject: [PATCH] Typo in check_mysql
+
+---
+ plugins/check_mysql.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
+index 0cba50e6d..6cfa70edb 100644
+--- a/plugins/check_mysql.c
++++ b/plugins/check_mysql.c
+@@ -551,7 +551,7 @@ print_help (void)
+   printf ("    %s\n", _("Exit with CRITICAL status if slave server is more then INTEGER seconds"));
+   printf ("    %s\n", _("behind master"));
+   printf (" %s\n", "-l, --ssl");
+-  printf ("    %s\n", _("Use ssl encryptation"));
++  printf ("    %s\n", _("Use ssl encryption"));
+   printf (" %s\n", "-C, --ca-cert=STRING");
+   printf ("    %s\n", _("Path to CA signing the cert"));
+   printf (" %s\n", "-a, --cert=STRING");


=====================================
debian/patches/19_check_nwstat_fix_typo
=====================================
@@ -0,0 +1,64 @@
+From cc69e8f76bcde8f75b5828b920bb937682673f49 Mon Sep 17 00:00:00 2001
+From: donien <matthias.doehler at netways.de>
+Date: Thu, 13 Apr 2023 17:15:16 +0200
+Subject: [PATCH] Fix 'requres' typo
+
+---
+ plugins/check_nwstat.c    | 2 +-
+ po/de.po                  | 2 +-
+ po/fr.po                  | 2 +-
+ po/monitoring-plugins.pot | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/plugins/check_nwstat.c b/plugins/check_nwstat.c
+index e7e8de05b..3c9d23e2e 100644
+--- a/plugins/check_nwstat.c
++++ b/plugins/check_nwstat.c
+@@ -1668,7 +1668,7 @@ void print_help(void)
+ 
+   printf ("\n");
+   printf ("%s\n", _("Notes:"));
+-	printf (" %s\n", _("- This plugin requres that the MRTGEXT.NLM file from James Drews' MRTG"));
++	printf (" %s\n", _("- This plugin requires that the MRTGEXT.NLM file from James Drews' MRTG"));
+   printf (" %s\n", _("  extension for NetWare be loaded on the Novell servers you wish to check."));
+   printf (" %s\n", _("  (available from http://www.engr.wisc.edu/~drews/mrtg/)"));
+   printf (" %s\n", _("- Values for critical thresholds should be lower than warning thresholds"));
+diff --git a/po/de.po b/po/de.po
+index 919fae32b..c29cbbbac 100644
+--- a/po/de.po
++++ b/po/de.po
+@@ -3315,7 +3315,7 @@ msgid "Include server version string in results"
+ msgstr ""
+ 
+ #: plugins/check_nwstat.c:1671
+-msgid "- This plugin requres that the MRTGEXT.NLM file from James Drews' MRTG"
++msgid "- This plugin requires that the MRTGEXT.NLM file from James Drews' MRTG"
+ msgstr ""
+ 
+ #: plugins/check_nwstat.c:1672
+diff --git a/po/fr.po b/po/fr.po
+index e44cf88cb..b4de17ed6 100644
+--- a/po/fr.po
++++ b/po/fr.po
+@@ -3372,7 +3372,7 @@ msgid "Include server version string in results"
+ msgstr ""
+ 
+ #: plugins/check_nwstat.c:1671
+-msgid "- This plugin requres that the MRTGEXT.NLM file from James Drews' MRTG"
++msgid "- This plugin requires that the MRTGEXT.NLM file from James Drews' MRTG"
+ msgstr ""
+ 
+ #: plugins/check_nwstat.c:1672
+diff --git a/po/monitoring-plugins.pot b/po/monitoring-plugins.pot
+index 5bc236373..45f46a899 100644
+--- a/po/monitoring-plugins.pot
++++ b/po/monitoring-plugins.pot
+@@ -3225,7 +3225,7 @@ msgid "Include server version string in results"
+ msgstr ""
+ 
+ #: plugins/check_nwstat.c:1671
+-msgid "- This plugin requres that the MRTGEXT.NLM file from James Drews' MRTG"
++msgid "- This plugin requires that the MRTGEXT.NLM file from James Drews' MRTG"
+ msgstr ""
+ 
+ #: plugins/check_nwstat.c:1672


=====================================
debian/patches/20_chech_nt_fix_encoding
=====================================
@@ -0,0 +1,46 @@
+From b2659391aba7e4a79b678aba5cc21b443626f81f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lorenz=20K=C3=A4stle?= <lorenz.kaestle at netways.de>
+Date: Wed, 26 Apr 2023 10:13:51 +0200
+Subject: [PATCH 1/2] check_nt: change encoding from latin1 to utf8
+
+---
+ plugins/check_nt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/check_nt.c b/plugins/check_nt.c
+index 59c135dba..babe3b642 100644
+--- a/plugins/check_nt.c
++++ b/plugins/check_nt.c
+@@ -341,7 +341,7 @@ int main(int argc, char **argv){
+ 
+ 		2) If the counter you're going to measure is percent-based, the code will detect
+ 		 the percent sign in its name and will attribute minimum (0%) and maximum (100%)
+-		 values automagically, as well the ¨%" sign to graph units.
++		 values automagically, as well the ¨%" sign to graph units.
+ 
+ 		3) OTOH, if the counter is "absolute", you'll have to provide the following
+ 		 the counter unit - that is, the dimensions of the counter you're getting. Examples:
+
+From fcf68d702e590bd3e58fb7556f420330ddf0a0ae Mon Sep 17 00:00:00 2001
+From: Lorenz <12514511+RincewindsHat at users.noreply.github.com>
+Date: Thu, 27 Apr 2023 00:42:30 +0200
+Subject: [PATCH 2/2] Update plugins/check_nt.c
+
+Co-authored-by: datamuc <m at rbfh.de>
+---
+ plugins/check_nt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/check_nt.c b/plugins/check_nt.c
+index babe3b642..d73d83cea 100644
+--- a/plugins/check_nt.c
++++ b/plugins/check_nt.c
+@@ -341,7 +341,7 @@ int main(int argc, char **argv){
+ 
+ 		2) If the counter you're going to measure is percent-based, the code will detect
+ 		 the percent sign in its name and will attribute minimum (0%) and maximum (100%)
+-		 values automagically, as well the ¨%" sign to graph units.
++		 values automagically, as well the "%" sign to graph units.
+ 
+ 		3) OTOH, if the counter is "absolute", you'll have to provide the following
+ 		 the counter unit - that is, the dimensions of the counter you're getting. Examples:


=====================================
debian/patches/21_check_pgsql_extra_output
=====================================
@@ -0,0 +1,46 @@
+From 9f15dac8e789a4b13d4f9e8897ee03fee84f494a Mon Sep 17 00:00:00 2001
+From: phowen <phowen at cisco.com>
+Date: Wed, 26 Apr 2017 13:40:27 +0100
+Subject: [PATCH] add extra output to pgsql check
+
+---
+ plugins/check_pgsql.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
+index c26cd439c..05fdc1568 100644
+--- a/plugins/check_pgsql.c
++++ b/plugins/check_pgsql.c
+@@ -517,7 +517,10 @@ print_help (void)
+ 	printf (" %s\n", _("connecting to the server. The result from the query has to be numeric."));
+ 	printf (" %s\n", _("Multiple SQL commands, separated by semicolon, are allowed but the result "));
+ 	printf (" %s\n", _("of the last command is taken into account only. The value of the first"));
+-	printf (" %s\n\n", _("column in the first row is used as the check result."));
++	printf (" %s\n", _("column in the first row is used as the check result. If a second column is"));
++	printf (" %s\n", _("present in the result set, this is added to the plugin output with a"));
++	printf (" %s\n", _("prefix of \"Extra Info:\". This information can be displayed in the system"));
++	printf (" %s\n\n", _("executing the plugin."));
+ 
+ 	printf (" %s\n", _("See the chapter \"Monitoring Database Activity\" of the PostgreSQL manual"));
+ 	printf (" %s\n\n", _("for details about how to access internal statistics of the database server."));
+@@ -557,6 +560,7 @@ do_query (PGconn *conn, char *query)
+ 	PGresult *res;
+ 
+ 	char *val_str;
++	char *extra_info;
+ 	double value;
+ 
+ 	char *endptr = NULL;
+@@ -621,6 +625,12 @@ do_query (PGconn *conn, char *query)
+ 	printf ("|query=%f;%s;%s;;\n", value,
+ 			query_warning ? query_warning : "",
+ 			query_critical ? query_critical : "");
++	if (PQnfields (res) > 1) {
++		extra_info = PQgetvalue (res, 0, 1);
++		if (extra_info != NULL) {
++			printf ("Extra Info: %s\n", extra_info);
++		}
++	}
+ 	return my_status;
+ }
+ 


=====================================
debian/patches/22_check_disk_avoid_mount
=====================================
@@ -0,0 +1,47 @@
+From 0dd11100aa92bab172293ec9615a8a56b0e35ee6 Mon Sep 17 00:00:00 2001
+From: Stefan Taferner <stefan.taferner at porscheinformatik.com>
+Date: Wed, 10 May 2023 19:28:05 +0200
+Subject: [PATCH] avoid mounting when searching for matching mount points
+
+---
+ lib/utils_disk.c | 17 +++++++++--------
+ 1 file changed, 9 insertions(+), 8 deletions(-)
+
+diff --git a/lib/utils_disk.c b/lib/utils_disk.c
+index 468769b19..582d3ea17 100644
+--- a/lib/utils_disk.c
++++ b/lib/utils_disk.c
+@@ -147,24 +147,25 @@ np_set_best_match(struct parameter_list *desired, struct mount_entry *mount_list
+ 
+       /* set best match if path name exactly matches a mounted device name */
+       for (me = mount_list; me; me = me->me_next) {
+-	if (get_fs_usage(me->me_mountdir, me->me_devname, &fsp) < 0)
+-	  continue; /* skip if permissions do not suffice for accessing device */
+-        if (strcmp(me->me_devname, d->name)==0)
+-          best_match = me;
++        if (strcmp(me->me_devname, d->name)==0) {
++          if (get_fs_usage(me->me_mountdir, me->me_devname, &fsp) >= 0) {
++            best_match = me;
++          }
++        }
+       }
+ 
+       /* set best match by directory name if no match was found by devname */
+       if (! best_match) {
+         for (me = mount_list; me; me = me->me_next) {
+-	  if (get_fs_usage(me->me_mountdir, me->me_devname, &fsp) < 0)
+-	    continue; /* skip if permissions do not suffice for accessing device */
+           size_t len = strlen (me->me_mountdir);
+           if ((exact == FALSE && (best_match_len <= len && len <= name_len &&
+              (len == 1 || strncmp (me->me_mountdir, d->name, len) == 0)))
+              || (exact == TRUE && strcmp(me->me_mountdir, d->name)==0))
+           {
+-            best_match = me;
+-            best_match_len = len;
++            if (get_fs_usage(me->me_mountdir, me->me_devname, &fsp) >= 0) {
++              best_match = me;
++              best_match_len = len;
++            }
+           }
+         }
+       }


=====================================
debian/patches/23_check_mysql_fix_error_handling
=====================================
@@ -0,0 +1,28 @@
+From 10863265324a9a9fdf8ce771271af15b7e2f5a4a Mon Sep 17 00:00:00 2001
+From: Platon Pronko <platon7pronko at gmail.com>
+Date: Fri, 19 May 2023 15:05:02 +0800
+Subject: [PATCH] check_mysql: handle ER_ACCESS_DENIED_NO_PASSWORD_ERROR if
+ ignore_auth=1
+
+In some situations MySQL might return ER_ACCESS_DENIED_NO_PASSWORD_ERROR
+instead of ER_ACCESS_DENIED_ERROR. Semantically these errors are the same.
+---
+ plugins/check_mysql.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
+index 6cfa70edb..91e150fbd 100644
+--- a/plugins/check_mysql.c
++++ b/plugins/check_mysql.c
+@@ -138,7 +138,10 @@ main (int argc, char **argv)
+ 		mysql_ssl_set(&mysql,key,cert,ca_cert,ca_dir,ciphers);
+ 	/* establish a connection to the server and error checking */
+ 	if (!mysql_real_connect(&mysql,db_host,db_user,db_pass,db,db_port,db_socket,0)) {
+-		if (ignore_auth && mysql_errno (&mysql) == ER_ACCESS_DENIED_ERROR)
++		/* Depending on internally-selected auth plugin MySQL might return */
++		/* ER_ACCESS_DENIED_NO_PASSWORD_ERROR or ER_ACCESS_DENIED_ERROR. */
++		/* Semantically these errors are the same. */
++		if (ignore_auth && (mysql_errno (&mysql) == ER_ACCESS_DENIED_ERROR || mysql_errno (&mysql) == ER_ACCESS_DENIED_NO_PASSWORD_ERROR))
+ 		{
+ 			printf("MySQL OK - Version: %s (protocol %d)\n",
+ 				mysql_get_server_info(&mysql),


=====================================
debian/patches/30_check_radius_radcli_1.3.1_support
=====================================
@@ -0,0 +1,26 @@
+From 6bbe0b7b0f609ecab831dec9be7690842bf0a0fc Mon Sep 17 00:00:00 2001
+From: Stuart Henderson <sthen at users.noreply.github.com>
+Date: Wed, 8 Feb 2023 16:35:22 +0000
+Subject: [PATCH] cope with radcli-1.3.1 RC_BUFFER_LEN
+
+radcli 1.3.1 now uses RC_BUFFER_LEN instead of BUFFER_LEN. Add an #ifdef to allow working with either.
+---
+ plugins/check_radius.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/plugins/check_radius.c b/plugins/check_radius.c
+index be1001b4d..96a955536 100644
+--- a/plugins/check_radius.c
++++ b/plugins/check_radius.c
+@@ -155,7 +155,11 @@ main (int argc, char **argv)
+ {
+ 	struct sockaddr_storage ss;
+ 	char name[HOST_NAME_MAX];
++#ifdef RC_BUFFER_LEN
++	char msg[RC_BUFFER_LEN];
++#else
+ 	char msg[BUFFER_LEN];
++#endif
+ 	SEND_DATA data;
+ 	int result = STATE_UNKNOWN;
+ 	uint32_t client_id, service;


=====================================
debian/patches/31_checl_mailq_separate_submission_queue
=====================================
@@ -0,0 +1,77 @@
+From 12ae1fb6627bfef419fb4571a7189909107f5e6e Mon Sep 17 00:00:00 2001
+From: Jan Wagner <waja at cyconet.org>
+Date: Tue, 1 Oct 2013 15:06:51 +0200
+Subject: [PATCH] check_mailq.pl: separate submission queue
+
+check_mailq.pl ignores the separate submission queue used in (modern?) sendmail
+implementations.
+
+For the queue output below with one message in the submission queue and no
+messages in the transport queue, check_mailq.pl reports zero messages in the
+queue because the request count from the last queue always overwrites previous
+queues. If the sendmail MTA isn't running or has become wedged, messages will
+sit in the submission queue forever.
+
+The attached patch fixes this in a backwards compatible way (i.e., it shouldn't
+break any of the currently supported formats).
+--
+Just turning attached patch of github issue #972 into a push request.
+(Closes #972)
+---
+
+diff --git a/plugins-scripts/check_mailq.pl b/plugins-scripts/check_mailq.pl
+index 27073d3cc..f02c90fbc 100755
+--- a/plugins-scripts/check_mailq.pl
++++ b/plugins-scripts/check_mailq.pl
+@@ -149,7 +149,26 @@
+ ##/var/spool/mqueue/qF/df is empty
+ ##                Total Requests: 1
+ 
+-	
++# separate submission/transport queues, empty
++## MSP Queue status...
++## /var/spool/mqueue-client is empty
++##                 Total requests: 0
++## MTA Queue status...
++## /var/spool/mqueue is empty
++##                 Total requests: 0
++# separate submission/transport queues: 1
++## MSP Queue status...
++##                 /var/spool/mqueue-client (1 request)
++## -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
++## oAJEfhdW014123        5 Fri Nov 19 14:41 jwm
++##                  (Deferred: Connection refused by [127.0.0.1])
++##                                          root
++##                 Total requests: 1
++## MTA Queue status...
++## /var/spool/mqueue is empty
++##                 Total requests: 0
++
++	my $this_msg_q = 0;
+ 	while (<MAILQ>) {
+ 	
+ 		# match email addr on queue listing
+@@ -189,13 +208,18 @@
+ 	    	#
+ 		    # single queue: first line
+ 		    # multi queue: one for each queue. overwrite on multi queue below
+-	  	  $msg_q = $1 ;
++		  $this_msg_q = $1 ;
++	  	  $msg_q += $1 ;
+ 			}
+ 		} elsif (/^\s+Total\sRequests:\s(\d+)$/i) {
+-			print "$utils::PATH_TO_MAILQ = $_ \n" if $verbose ;
+-			#
+-			# multi queue: last line
+-			$msg_q = $1 ;
++			if ($this_msg_q) {
++				$this_msg_q = 0 ;
++			} else {
++				print "$utils::PATH_TO_MAILQ = $_ \n" if $verbose ;
++				#
++				# multi queue: last line
++				$msg_q += $1 ;
++			}
+ 		}
+ 	
+ 	}


=====================================
debian/patches/32_check_disk_add_ignore_missing
=====================================
@@ -0,0 +1,839 @@
+From 8cf31437e99167ad9c260e6677b4d1ed31a34d56 Mon Sep 17 00:00:00 2001
+From: Kristian Schuster <116557017+KriSchu at users.noreply.github.com>
+Date: Mon, 24 Oct 2022 17:29:53 +0200
+Subject: [PATCH 1/9] check_disk: add ignore-missing option to return OK for
+ missing fs There a situations where UNKNOWN or CRITICAL services are not
+ wanted when a filesystem is missing, a regex does not match or the filesystem
+ is inaccessible on a system. This new option helps to have the service in
+ state OK.
+
+---
+ plugins/check_disk.c | 29 ++++++++++++++++++++++++-----
+ 1 file changed, 24 insertions(+), 5 deletions(-)
+
+diff --git a/plugins/check_disk.c b/plugins/check_disk.c
+index 7018c6fd5..8df9e7ec8 100644
+--- a/plugins/check_disk.c
++++ b/plugins/check_disk.c
+@@ -112,7 +112,8 @@ enum
+ {
+   SYNC_OPTION = CHAR_MAX + 1,
+   NO_SYNC_OPTION,
+-  BLOCK_SIZE_OPTION
++  BLOCK_SIZE_OPTION,
++  IGNORE_MISSING
+ };
+ 
+ #ifdef _AIX
+@@ -140,6 +141,7 @@ int verbose = 0;
+ int erronly = FALSE;
+ int display_mntp = FALSE;
+ int exact_match = FALSE;
++int ignore_missing = FALSE;
+ int freespace_ignore_reserved = FALSE;
+ int display_inodes_perfdata = FALSE;
+ char *warn_freespace_units = NULL;
+@@ -219,7 +221,9 @@ main (int argc, char **argv)
+   temp_list = path_select_list;
+ 
+   while (temp_list) {
+-    if (! temp_list->best_match) {
++    if (! temp_list->best_match && ignore_missing == 1) {
++      die (STATE_OK, _("DISK %s: %s not found (ignoring)\n"), _("OK"), temp_list->name);
++    } else if (! temp_list->best_match) {
+       die (STATE_CRITICAL, _("DISK %s: %s not found\n"), _("CRITICAL"), temp_list->name);
+     }
+ 
+@@ -481,6 +485,7 @@ process_arguments (int argc, char **argv)
+     {"ignore-ereg-partition", required_argument, 0, 'i'},
+     {"ignore-eregi-path", required_argument, 0, 'I'},
+     {"ignore-eregi-partition", required_argument, 0, 'I'},
++    {"ignore-missing", no_argument, 0, IGNORE_MISSING},
+     {"local", no_argument, 0, 'l'},
+     {"stat-remote-fs", no_argument, 0, 'L'},
+     {"iperfdata", no_argument, 0, 'P'},
+@@ -718,6 +723,9 @@ process_arguments (int argc, char **argv)
+       cflags = default_cflags;
+       break;
+ 
++    case IGNORE_MISSING:
++      ignore_missing = 1;
++      break;
+     case 'A':
+       optarg = strdup(".*");
+ 	  // Intentional fallthrough
+@@ -753,7 +761,10 @@ process_arguments (int argc, char **argv)
+         }
+       }
+ 
+-      if (!fnd)
++      if (!fnd && ignore_missing == 1)
++        die (STATE_OK, "DISK %s: %s - %s\n",_("OK"),
++            _("Regular expression did not match any path or disk (ignoring)"), optarg);
++      else if (!fnd)
+         die (STATE_UNKNOWN, "DISK %s: %s - %s\n",_("UNKNOWN"),
+             _("Regular expression did not match any path or disk"), optarg);
+ 
+@@ -923,6 +934,9 @@ print_help (void)
+   printf ("    %s\n", _("Regular expression to ignore selected path/partition (case insensitive) (may be repeated)"));
+   printf (" %s\n", "-i, --ignore-ereg-path=PATH, --ignore-ereg-partition=PARTITION");
+   printf ("    %s\n", _("Regular expression to ignore selected path or partition (may be repeated)"));
++  printf (" %s\n", "--ignore-missing");
++  printf ("    %s\n", _("Return OK if no filesystem matches, filesystem does not exist or is inaccessible."));
++  printf ("    %s\n", _("(Provide this option before -r / --ereg-path if used)"));
+   printf (UT_PLUG_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+   printf (" %s\n", "-u, --units=STRING");
+   printf ("    %s\n", _("Choose bytes, kB, MB, GB, TB (default: MB)"));
+@@ -965,8 +979,13 @@ stat_path (struct parameter_list *p)
+   if (stat (p->name, &stat_buf[0])) {
+     if (verbose >= 3)
+       printf("stat failed on %s\n", p->name);
+-    printf("DISK %s - ", _("CRITICAL"));
+-    die (STATE_CRITICAL, _("%s %s: %s\n"), p->name, _("is not accessible"), strerror(errno));
++    if (ignore_missing == 1) {
++      printf("DISK %s - ", _("OK"));
++      die (STATE_OK, _("%s %s: %s\n"), p->name, _("is not accessible (ignoring)"), strerror(errno));
++    } else {
++      printf("DISK %s - ", _("CRITICAL"));
++      die (STATE_CRITICAL, _("%s %s: %s\n"), p->name, _("is not accessible"), strerror(errno));
++    }
+   }
+ }
+ 
+
+From 0d562a356f45f645014c3908178fc13876006f6e Mon Sep 17 00:00:00 2001
+From: Kristian Schuster <116557017+KriSchu at users.noreply.github.com>
+Date: Tue, 25 Oct 2022 20:49:51 +0200
+Subject: [PATCH 2/9] check_disk: add tests for new option --ignore-missing
+
+---
+ plugins/t/check_disk.t | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t
+index ec527e7f6..bea34a4c9 100644
+--- a/plugins/t/check_disk.t
++++ b/plugins/t/check_disk.t
+@@ -351,3 +351,18 @@ unlike( $result->output, qr/$mountpoint2_valid/, "output data does not have $mou
+ $result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p $mountpoint_valid -p $mountpoint2_valid -i '^barbazJodsf\$'");
+ like( $result->output, qr/$mountpoint_valid/, "ignore: output data does have $mountpoint_valid when regex doesn't match");
+ like( $result->output, qr/$mountpoint2_valid/,"ignore: output data does have $mountpoint2_valid when regex doesn't match");
++
++# ignore-missing: exit okay, when fs is not accessible
++$result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -p /bob");
++cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay for not existing filesystem /bob");
++like( $result->output, '/^DISK OK - /bob is not accessible .*$/', 'Output OK');
++
++# ignore-missing: exit okay, when regex does not match
++$result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -r /bob");
++cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay for regular expression not matching");
++like( $result->output, '/^DISK OK: Regular expression did not match any path or disk.*$/', 'Output OK');
++
++# ignore-missing: exit okay, when fs with exact match (-E) is not found
++$result = NPTest->testCmd( "./check_disk --ignore-missing -E -w 0% -c 0% -p /etc");
++cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay when exact match does not find fs");
++like( $result->output, '/^DISK OK: /etc not found.*$/', 'Output OK');
+
+From bacacd2cb38c7d7a695a6f75f699168d9df0132d Mon Sep 17 00:00:00 2001
+From: Sven Nierlein <sven at nierlein.org>
+Date: Wed, 26 Oct 2022 14:03:22 +0200
+Subject: [PATCH 3/9] check_disk: adjust test plan
+
+---
+ plugins/t/check_disk.t | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t
+index bea34a4c9..a534fd4a5 100644
+--- a/plugins/t/check_disk.t
++++ b/plugins/t/check_disk.t
+@@ -23,7 +23,7 @@ my $mountpoint2_valid = getTestParameter( "NP_MOUNTPOINT2_VALID", "Path to anoth
+ if ($mountpoint_valid eq "" or $mountpoint2_valid eq "") {
+ 	plan skip_all => "Need 2 mountpoints to test";
+ } else {
+-	plan tests => 78;
++	plan tests => 84;
+ }
+ 
+ $result = NPTest->testCmd( 
+
+From 9898a8ad7dabfabfe80785585a5bbc30b678bdb0 Mon Sep 17 00:00:00 2001
+From: Kristian Schuster <116557017+KriSchu at users.noreply.github.com>
+Date: Sun, 19 Feb 2023 13:44:04 +0100
+Subject: [PATCH 4/9] utils_disk: add name_prev pointer to struct
+ parameter_list
+
+Also added handling of name_prev in np_add_parameter and np_delete_parameter.
+This make calling the np_delete_parameter function easier, because it requires
+the previous element as second argument.
+---
+ lib/utils_disk.c | 19 +++++++++++++++++--
+ lib/utils_disk.h |  1 +
+ 2 files changed, 18 insertions(+), 2 deletions(-)
+
+diff --git a/lib/utils_disk.c b/lib/utils_disk.c
+index c7c9126e4..a1181d37b 100644
+--- a/lib/utils_disk.c
++++ b/lib/utils_disk.c
+@@ -46,9 +46,10 @@ np_add_parameter(struct parameter_list **list, const char *name)
+   struct parameter_list *current = *list;
+   struct parameter_list *new_path;
+   new_path = (struct parameter_list *) malloc (sizeof *new_path);
+-  new_path->name = (char *) name;
++  new_path->name = (char *) malloc(strlen(name) + 1);
+   new_path->best_match = NULL;
+   new_path->name_next = NULL;
++  new_path->name_prev = NULL;
+   new_path->freespace_bytes = NULL;
+   new_path->freespace_units = NULL;
+   new_path->freespace_percent = NULL;
+@@ -74,13 +75,17 @@ np_add_parameter(struct parameter_list **list, const char *name)
+   new_path->dused_inodes_percent = 0;
+   new_path->dfree_inodes_percent = 0;
+ 
++  strcpy(new_path->name, name);
++
+   if (current == NULL) {
+     *list = new_path;
++    new_path->name_prev = NULL;
+   } else {
+     while (current->name_next) {
+       current = current->name_next;
+     }
+     current->name_next = new_path;
++    new_path->name_prev = current;
+   }
+   return new_path;
+ }
+@@ -89,6 +94,9 @@ np_add_parameter(struct parameter_list **list, const char *name)
+ struct parameter_list *
+ np_del_parameter(struct parameter_list *item, struct parameter_list *prev)
+ {
++  if (item == NULL) {
++    return NULL;
++  }
+   struct parameter_list *next;
+ 
+   if (item->name_next)
+@@ -96,10 +104,17 @@ np_del_parameter(struct parameter_list *item, struct parameter_list *prev)
+   else
+     next = NULL;
+ 
+-  free(item);
++  if (next)
++    next->name_prev = prev;
++
+   if (prev)
+     prev->name_next = next;
+ 
++  if (item->name) {
++    free(item->name);
++  }
++  free(item);
++
+   return next;
+ }
+ 
+diff --git a/lib/utils_disk.h b/lib/utils_disk.h
+index bf52e4ce9..3b5a45f86 100644
+--- a/lib/utils_disk.h
++++ b/lib/utils_disk.h
+@@ -24,6 +24,7 @@ struct parameter_list
+   char *group;
+   struct mount_entry *best_match;
+   struct parameter_list *name_next;
++  struct parameter_list *name_prev;
+   uintmax_t total, available, available_to_root, used,
+     inodes_free, inodes_free_to_root, inodes_used, inodes_total;
+   double dfree_pct, dused_pct;
+
+From ba78c32018658608a31c293beef89ec82b9ba9d3 Mon Sep 17 00:00:00 2001
+From: Kristian Schuster <116557017+KriSchu at users.noreply.github.com>
+Date: Sun, 19 Feb 2023 22:49:30 +0100
+Subject: [PATCH 5/9] check_disk: still allow check of available disks with
+ ignore-missing param used
+
+Also add reporting of ignored paths. When paths are provided by -p and/ or -r and
+one path does not match a mounted disk, checking available disks is still
+possible. Paths provided by -p are reported as ignored, when not available. Due
+to code structure, this is not possible for -r unfortunately.
+---
+ plugins/check_disk.c | 103 ++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 78 insertions(+), 25 deletions(-)
+
+diff --git a/plugins/check_disk.c b/plugins/check_disk.c
+index 8df9e7ec8..c1cfb13c0 100644
+--- a/plugins/check_disk.c
++++ b/plugins/check_disk.c
+@@ -117,7 +117,7 @@ enum
+ };
+ 
+ #ifdef _AIX
+- #pragma alloca
++#pragma alloca
+ #endif
+ 
+ int process_arguments (int, char **);
+@@ -127,7 +127,7 @@ int validate_arguments (uintmax_t, uintmax_t, double, double, double, double, ch
+ void print_help (void);
+ void print_usage (void);
+ double calculate_percent(uintmax_t, uintmax_t);
+-void stat_path (struct parameter_list *p);
++bool stat_path (struct parameter_list *p);
+ void get_stats (struct parameter_list *p, struct fs_usage *fsp);
+ void get_path_stats (struct parameter_list *p, struct fs_usage *fsp);
+ 
+@@ -157,6 +157,7 @@ char *crit_usedinodes_percent = NULL;
+ char *warn_freeinodes_percent = NULL;
+ char *crit_freeinodes_percent = NULL;
+ int path_selected = FALSE;
++int path_ignored = FALSE;
+ char *group = NULL;
+ struct stat *stat_buf;
+ struct name_list *seen = NULL;
+@@ -168,10 +169,12 @@ main (int argc, char **argv)
+   int result = STATE_UNKNOWN;
+   int disk_result = STATE_UNKNOWN;
+   char *output;
++  char *ignored;
+   char *details;
+   char *perf;
+   char *perf_ilabel;
+   char *preamble;
++  char *ignored_preamble;
+   char *flag_header;
+   int temp_result;
+ 
+@@ -183,8 +186,10 @@ main (int argc, char **argv)
+   char mountdir[32];
+ #endif
+ 
+-  preamble = strdup (" - free space:");
++  preamble = strdup (" free space:");
++  ignored_preamble = strdup (" ignored paths:");
+   output = strdup ("");
++  ignored = strdup ("");
+   details = strdup ("");
+   perf = strdup ("");
+   perf_ilabel = strdup ("");
+@@ -205,7 +210,7 @@ main (int argc, char **argv)
+   /* If a list of paths has not been selected, find entire
+      mount list and create list of paths
+    */
+-  if (path_selected == FALSE) {
++  if (path_selected == FALSE && path_ignored == FALSE) {
+     for (me = mount_list; me; me = me->me_next) {
+       if (! (path = np_find_parameter(path_select_list, me->me_mountdir))) {
+         path = np_add_parameter(&path_select_list, me->me_mountdir);
+@@ -215,19 +220,40 @@ main (int argc, char **argv)
+       set_all_thresholds(path);
+     }
+   }
+-  np_set_best_match(path_select_list, mount_list, exact_match);
++
++  if (path_ignored == FALSE) {
++    np_set_best_match(path_select_list, mount_list, exact_match);
++  }
+ 
+   /* Error if no match found for specified paths */
+   temp_list = path_select_list;
+ 
+-  while (temp_list) {
+-    if (! temp_list->best_match && ignore_missing == 1) {
+-      die (STATE_OK, _("DISK %s: %s not found (ignoring)\n"), _("OK"), temp_list->name);
+-    } else if (! temp_list->best_match) {
+-      die (STATE_CRITICAL, _("DISK %s: %s not found\n"), _("CRITICAL"), temp_list->name);
++  while (path_select_list) {
++    if (! path_select_list->best_match && ignore_missing == 1) {
++      /* If the first element will be deleted, the temp_list must be updated with the new start address as well */
++      if (path_select_list == temp_list) {
++        temp_list = path_select_list->name_next;
++      }
++      /* Add path argument to list of ignored paths to inform about missing paths being ignored and not alerted */
++      xasprintf (&ignored, "%s %s;", ignored, path_select_list->name);
++      /* Delete the path from the list so that it is not stat-checked later in the code. */
++      path_select_list = np_del_parameter(path_select_list, path_select_list->name_prev);
++    } else if (! path_select_list->best_match) {
++      /* Without --ignore-missing option, exit with Critical state. */
++      die (STATE_CRITICAL, _("DISK %s: %s not found\n"), _("CRITICAL"), path_select_list->name);
++    } else {
++      /* Continue jumping through the list */
++      path_select_list = path_select_list->name_next;
+     }
++  }
++
++  path_select_list = temp_list;
+ 
+-    temp_list = temp_list->name_next;
++  if (! path_select_list && ignore_missing == 1) {
++    result = STATE_OK;
++    if (verbose >= 2) {
++      printf ("None of the provided paths were found\n");
++    }
+   }
+ 
+   /* Process for every path in list */
+@@ -246,6 +272,10 @@ main (int argc, char **argv)
+ 
+     me = path->best_match;
+ 
++    if (!me) {
++      continue;
++    }
++
+ #ifdef __CYGWIN__
+     if (strncmp(path->name, "/cygdrive/", 10) != 0 || strlen(path->name) > 11)
+         continue;
+@@ -264,8 +294,12 @@ main (int argc, char **argv)
+     if (path->group == NULL) {
+       /* Skip remote filesystems if we're not interested in them */
+       if (me->me_remote && show_local_fs) {
+-        if (stat_remote_fs)
+-          stat_path(path);
++        if (stat_remote_fs) {
++          if (!stat_path(path) && ignore_missing == 1) {
++              result = STATE_OK;
++              xasprintf (&ignored, "%s %s;", ignored, path->name);
++          }
++        }
+         continue;
+       /* Skip pseudo fs's if we haven't asked for all fs's */
+       } else if (me->me_dummy && !show_all_fs) {
+@@ -284,7 +318,13 @@ main (int argc, char **argv)
+       }
+     }
+ 
+-    stat_path(path);
++    if (!stat_path(path)) {
++      if (ignore_missing == 1) {
++        result = STATE_OK;
++        xasprintf (&ignored, "%s %s;", ignored, path->name);
++      }
++      continue;
++    }
+     get_fs_usage (me->me_mountdir, me->me_devname, &fsp);
+ 
+     if (fsp.fsu_blocks && strcmp ("none", me->me_mountdir)) {
+@@ -415,8 +455,12 @@ main (int argc, char **argv)
+   if (verbose >= 2)
+     xasprintf (&output, "%s%s", output, details);
+ 
++  if (strcmp(output, "") == 0) {
++    preamble = "";
++    xasprintf (&output, " No disks were found for provided parameters;");
++  }
+ 
+-  printf ("DISK %s%s%s|%s\n", state_text (result), (erronly && result==STATE_OK) ? "" : preamble, output, perf);
++  printf ("DISK %s -%s%s%s%s|%s\n", state_text (result), ((erronly && result==STATE_OK)) ? "" : preamble, output, (strcmp(ignored, "") == 0) ? "" : ignored_preamble, ignored, perf);
+   return result;
+ }
+ 
+@@ -637,12 +681,19 @@ process_arguments (int argc, char **argv)
+       /* add parameter if not found. overwrite thresholds if path has already been added  */
+       if (! (se = np_find_parameter(path_select_list, optarg))) {
+           se = np_add_parameter(&path_select_list, optarg);
++
++          if (stat(optarg, &stat_buf[0]) && ignore_missing == 1) {
++            path_ignored = TRUE;
++            break;
++          }
+       }
+       se->group = group;
+       set_all_thresholds(se);
+ 
+       /* With autofs, it is required to stat() the path before re-populating the mount_list */
+-      stat_path(se);
++      if (!stat_path(se)) {
++        break;
++      }
+       /* NB: We can't free the old mount_list "just like that": both list pointers and struct
+        * pointers are copied around. One of the reason it wasn't done yet is that other parts
+        * of check_disk need the same kind of cleanup so it'd better be done as a whole */
+@@ -761,10 +812,11 @@ process_arguments (int argc, char **argv)
+         }
+       }
+ 
+-      if (!fnd && ignore_missing == 1)
+-        die (STATE_OK, "DISK %s: %s - %s\n",_("OK"),
+-            _("Regular expression did not match any path or disk (ignoring)"), optarg);
+-      else if (!fnd)
++      if (!fnd && ignore_missing == 1) {
++        path_ignored = TRUE;
++        /* path_selected = TRUE;*/
++        break;
++      } else if (!fnd)
+         die (STATE_UNKNOWN, "DISK %s: %s - %s\n",_("UNKNOWN"),
+             _("Regular expression did not match any path or disk"), optarg);
+ 
+@@ -936,7 +988,7 @@ print_help (void)
+   printf ("    %s\n", _("Regular expression to ignore selected path or partition (may be repeated)"));
+   printf (" %s\n", "--ignore-missing");
+   printf ("    %s\n", _("Return OK if no filesystem matches, filesystem does not exist or is inaccessible."));
+-  printf ("    %s\n", _("(Provide this option before -r / --ereg-path if used)"));
++  printf ("    %s\n", _("(Provide this option before -p / -r / --ereg-path if used)"));
+   printf (UT_PLUG_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+   printf (" %s\n", "-u, --units=STRING");
+   printf ("    %s\n", _("Choose bytes, kB, MB, GB, TB (default: MB)"));
+@@ -970,7 +1022,7 @@ print_usage (void)
+   printf ("[-t timeout] [-u unit] [-v] [-X type] [-N type]\n");
+ }
+ 
+-void
++bool
+ stat_path (struct parameter_list *p)
+ {
+   /* Stat entry to check that dir exists and is accessible */
+@@ -980,13 +1032,13 @@ stat_path (struct parameter_list *p)
+     if (verbose >= 3)
+       printf("stat failed on %s\n", p->name);
+     if (ignore_missing == 1) {
+-      printf("DISK %s - ", _("OK"));
+-      die (STATE_OK, _("%s %s: %s\n"), p->name, _("is not accessible (ignoring)"), strerror(errno));
++      return false;
+     } else {
+       printf("DISK %s - ", _("CRITICAL"));
+       die (STATE_CRITICAL, _("%s %s: %s\n"), p->name, _("is not accessible"), strerror(errno));
+     }
+   }
++  return true;
+ }
+ 
+ 
+@@ -1006,7 +1058,8 @@ get_stats (struct parameter_list *p, struct fs_usage *fsp) {
+         continue;
+ #endif
+       if (p_list->group && ! (strcmp(p_list->group, p->group))) {
+-        stat_path(p_list);
++        if (! stat_path(p_list))
++          continue;
+         get_fs_usage (p_list->best_match->me_mountdir, p_list->best_match->me_devname, &tmpfsp);
+         get_path_stats(p_list, &tmpfsp);
+         if (verbose >= 3)
+
+From ca3d59cd6918c9e2739e783b721d4c1122640fd3 Mon Sep 17 00:00:00 2001
+From: Kristian Schuster <116557017+KriSchu at users.noreply.github.com>
+Date: Sun, 19 Feb 2023 23:00:21 +0100
+Subject: [PATCH 6/9] check_disk: add new tests for new ignore-missing feature
+
+---
+ plugins/t/check_disk.t | 20 +++++++++++++++-----
+ 1 file changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t
+index a534fd4a5..275db70d8 100644
+--- a/plugins/t/check_disk.t
++++ b/plugins/t/check_disk.t
+@@ -23,7 +23,7 @@ my $mountpoint2_valid = getTestParameter( "NP_MOUNTPOINT2_VALID", "Path to anoth
+ if ($mountpoint_valid eq "" or $mountpoint2_valid eq "") {
+ 	plan skip_all => "Need 2 mountpoints to test";
+ } else {
+-	plan tests => 84;
++	plan tests => 86;
+ }
+ 
+ $result = NPTest->testCmd( 
+@@ -355,14 +355,24 @@ like( $result->output, qr/$mountpoint2_valid/,"ignore: output data does have $mo
+ # ignore-missing: exit okay, when fs is not accessible
+ $result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -p /bob");
+ cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay for not existing filesystem /bob");
+-like( $result->output, '/^DISK OK - /bob is not accessible .*$/', 'Output OK');
++like( $result->output, '/^DISK OK - No disks were found for provided parameters; ignored paths: /bob;.*$/', 'Output OK');
+ 
+ # ignore-missing: exit okay, when regex does not match
+ $result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -r /bob");
+ cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay for regular expression not matching");
+-like( $result->output, '/^DISK OK: Regular expression did not match any path or disk.*$/', 'Output OK');
++like( $result->output, '/^DISK OK - No disks were found for provided parameters;.*$/', 'Output OK');
+ 
+ # ignore-missing: exit okay, when fs with exact match (-E) is not found
+-$result = NPTest->testCmd( "./check_disk --ignore-missing -E -w 0% -c 0% -p /etc");
++$result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -E -p /etc");
+ cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay when exact match does not find fs");
+-like( $result->output, '/^DISK OK: /etc not found.*$/', 'Output OK');
++like( $result->output, '/^DISK OK - No disks were found for provided parameters; ignored paths: /etc;.*$/', 'Output OK');
++
++# ignore-missing: exit okay, when checking one existing fs and one non-existing fs (regex)
++$result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -r '/bob' -r '^/$'");
++cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay for regular expression not matching");
++like( $result->output, '/^DISK OK - free space: / .*$/', 'Output OK');
++
++# ignore-missing: exit okay, when checking one existing fs and one non-existing fs (path)
++$result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -p '/bob' -p '/'");
++cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay for regular expression not matching");
++like( $result->output, '/^DISK OK - free space: / .*; ignored paths: /bob;.*$/', 'Output OK');
+\ No newline at end of file
+
+From a58293a0c288ee0e050c79715073da9fbdfc4c58 Mon Sep 17 00:00:00 2001
+From: Kristian Schuster <116557017+KriSchu at users.noreply.github.com>
+Date: Mon, 20 Feb 2023 01:27:23 +0100
+Subject: [PATCH 7/9] check_disk: fix tests by setting correct test number and
+ escaping line end regex
+
+---
+ plugins/t/check_disk.t | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t
+index 275db70d8..73f1e3748 100644
+--- a/plugins/t/check_disk.t
++++ b/plugins/t/check_disk.t
+@@ -23,7 +23,7 @@ my $mountpoint2_valid = getTestParameter( "NP_MOUNTPOINT2_VALID", "Path to anoth
+ if ($mountpoint_valid eq "" or $mountpoint2_valid eq "") {
+ 	plan skip_all => "Need 2 mountpoints to test";
+ } else {
+-	plan tests => 86;
++	plan tests => 88;
+ }
+ 
+ $result = NPTest->testCmd( 
+@@ -126,7 +126,7 @@ my $free_mb_on_all = $free_mb_on_mp1 + $free_mb_on_mp2;
+ 
+ 
+ $result = NPTest->testCmd( "./check_disk -e -w 1 -c 1 -p $more_free" );
+-is( $result->only_output, "DISK OK", "No print out of disks with -e for OKs");
++is( $result->only_output, "DISK OK - No disks were found for provided parameters;", "No print out of disks with -e for OKs");
+ 
+ $result = NPTest->testCmd( "./check_disk 100 100 $more_free" );
+ cmp_ok( $result->return_code, '==', 0, "Old syntax okay" );
+@@ -368,9 +368,9 @@ cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay when exact m
+ like( $result->output, '/^DISK OK - No disks were found for provided parameters; ignored paths: /etc;.*$/', 'Output OK');
+ 
+ # ignore-missing: exit okay, when checking one existing fs and one non-existing fs (regex)
+-$result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -r '/bob' -r '^/$'");
++$result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -r '/bob' -r '^/\$'");
+ cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay for regular expression not matching");
+-like( $result->output, '/^DISK OK - free space: / .*$/', 'Output OK');
++like( $result->output, '/^DISK OK - free space: \/ .*$/', 'Output OK');
+ 
+ # ignore-missing: exit okay, when checking one existing fs and one non-existing fs (path)
+ $result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -p '/bob' -p '/'");
+
+From e102b8a49e857a474db516455d2e871e6834ae34 Mon Sep 17 00:00:00 2001
+From: Kristian Schuster <116557017+KriSchu at users.noreply.github.com>
+Date: Mon, 20 Feb 2023 02:03:01 +0100
+Subject: [PATCH 8/9] check_disk: fix ugly output with -e option and adapt
+ tests accordingly
+
+---
+ plugins/check_disk.c   | 10 +++++-----
+ plugins/t/check_disk.t |  8 ++++----
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/plugins/check_disk.c b/plugins/check_disk.c
+index d32841d8e..c52d1df48 100644
+--- a/plugins/check_disk.c
++++ b/plugins/check_disk.c
+@@ -186,8 +186,8 @@ main (int argc, char **argv)
+   char mountdir[32];
+ #endif
+ 
+-  preamble = strdup (" free space:");
+-  ignored_preamble = strdup (" ignored paths:");
++  preamble = strdup (" - free space:");
++  ignored_preamble = strdup (" - ignored paths:");
+   output = strdup ("");
+   ignored = strdup ("");
+   details = strdup ("");
+@@ -455,12 +455,12 @@ main (int argc, char **argv)
+   if (verbose >= 2)
+     xasprintf (&output, "%s%s", output, details);
+ 
+-  if (strcmp(output, "") == 0) {
++  if (strcmp(output, "") == 0 && ! erronly) {
+     preamble = "";
+-    xasprintf (&output, " No disks were found for provided parameters;");
++    xasprintf (&output, " - No disks were found for provided parameters;");
+   }
+ 
+-  printf ("DISK %s -%s%s%s%s|%s\n", state_text (result), ((erronly && result==STATE_OK)) ? "" : preamble, output, (strcmp(ignored, "") == 0) ? "" : ignored_preamble, ignored, perf);
++  printf ("DISK %s%s%s%s%s|%s\n", state_text (result), ((erronly && result==STATE_OK)) ? "" : preamble, output, (strcmp(ignored, "") == 0) ? "" : ignored_preamble, ignored, perf);
+   return result;
+ }
+ 
+diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t
+index 73f1e3748..c8f08f515 100644
+--- a/plugins/t/check_disk.t
++++ b/plugins/t/check_disk.t
+@@ -126,7 +126,7 @@ my $free_mb_on_all = $free_mb_on_mp1 + $free_mb_on_mp2;
+ 
+ 
+ $result = NPTest->testCmd( "./check_disk -e -w 1 -c 1 -p $more_free" );
+-is( $result->only_output, "DISK OK - No disks were found for provided parameters;", "No print out of disks with -e for OKs");
++is( $result->only_output, "DISK OK", "No print out of disks with -e for OKs");
+ 
+ $result = NPTest->testCmd( "./check_disk 100 100 $more_free" );
+ cmp_ok( $result->return_code, '==', 0, "Old syntax okay" );
+@@ -355,7 +355,7 @@ like( $result->output, qr/$mountpoint2_valid/,"ignore: output data does have $mo
+ # ignore-missing: exit okay, when fs is not accessible
+ $result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -p /bob");
+ cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay for not existing filesystem /bob");
+-like( $result->output, '/^DISK OK - No disks were found for provided parameters; ignored paths: /bob;.*$/', 'Output OK');
++like( $result->output, '/^DISK OK - No disks were found for provided parameters; - ignored paths: /bob;.*$/', 'Output OK');
+ 
+ # ignore-missing: exit okay, when regex does not match
+ $result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -r /bob");
+@@ -365,7 +365,7 @@ like( $result->output, '/^DISK OK - No disks were found for provided parameters;
+ # ignore-missing: exit okay, when fs with exact match (-E) is not found
+ $result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -E -p /etc");
+ cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay when exact match does not find fs");
+-like( $result->output, '/^DISK OK - No disks were found for provided parameters; ignored paths: /etc;.*$/', 'Output OK');
++like( $result->output, '/^DISK OK - No disks were found for provided parameters; - ignored paths: /etc;.*$/', 'Output OK');
+ 
+ # ignore-missing: exit okay, when checking one existing fs and one non-existing fs (regex)
+ $result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -r '/bob' -r '^/\$'");
+@@ -375,4 +375,4 @@ like( $result->output, '/^DISK OK - free space: \/ .*$/', 'Output OK');
+ # ignore-missing: exit okay, when checking one existing fs and one non-existing fs (path)
+ $result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -p '/bob' -p '/'");
+ cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay for regular expression not matching");
+-like( $result->output, '/^DISK OK - free space: / .*; ignored paths: /bob;.*$/', 'Output OK');
+\ No newline at end of file
++like( $result->output, '/^DISK OK - free space: / .*; - ignored paths: /bob;.*$/', 'Output OK');
+\ No newline at end of file
+
+From 3e7da5f970d73df91fad32f4dce259d30cdbbd65 Mon Sep 17 00:00:00 2001
+From: Kristian Schuster <116557017+KriSchu at users.noreply.github.com>
+Date: Mon, 6 Mar 2023 14:03:10 +0100
+Subject: [PATCH 9/9] check_disk: use cleaner code for ignore-missing option -
+ use datatype bool for new vars ignore_missing and path_ignored instead of int
+ - directly initialize preamble and ignored_preamble with their strings
+
+---
+ plugins/check_disk.c | 34 ++++++++++++++++------------------
+ 1 file changed, 16 insertions(+), 18 deletions(-)
+
+diff --git a/plugins/check_disk.c b/plugins/check_disk.c
+index c52d1df48..bd84c8257 100644
+--- a/plugins/check_disk.c
++++ b/plugins/check_disk.c
+@@ -141,7 +141,7 @@ int verbose = 0;
+ int erronly = FALSE;
+ int display_mntp = FALSE;
+ int exact_match = FALSE;
+-int ignore_missing = FALSE;
++bool ignore_missing = false;
+ int freespace_ignore_reserved = FALSE;
+ int display_inodes_perfdata = FALSE;
+ char *warn_freespace_units = NULL;
+@@ -157,7 +157,7 @@ char *crit_usedinodes_percent = NULL;
+ char *warn_freeinodes_percent = NULL;
+ char *crit_freeinodes_percent = NULL;
+ int path_selected = FALSE;
+-int path_ignored = FALSE;
++bool path_ignored = false;
+ char *group = NULL;
+ struct stat *stat_buf;
+ struct name_list *seen = NULL;
+@@ -173,8 +173,8 @@ main (int argc, char **argv)
+   char *details;
+   char *perf;
+   char *perf_ilabel;
+-  char *preamble;
+-  char *ignored_preamble;
++  char *preamble = " - free space:";
++  char *ignored_preamble = " - ignored paths:";
+   char *flag_header;
+   int temp_result;
+ 
+@@ -186,8 +186,6 @@ main (int argc, char **argv)
+   char mountdir[32];
+ #endif
+ 
+-  preamble = strdup (" - free space:");
+-  ignored_preamble = strdup (" - ignored paths:");
+   output = strdup ("");
+   ignored = strdup ("");
+   details = strdup ("");
+@@ -210,7 +208,7 @@ main (int argc, char **argv)
+   /* If a list of paths has not been selected, find entire
+      mount list and create list of paths
+    */
+-  if (path_selected == FALSE && path_ignored == FALSE) {
++  if (path_selected == FALSE && path_ignored == false) {
+     for (me = mount_list; me; me = me->me_next) {
+       if (! (path = np_find_parameter(path_select_list, me->me_mountdir))) {
+         path = np_add_parameter(&path_select_list, me->me_mountdir);
+@@ -221,7 +219,7 @@ main (int argc, char **argv)
+     }
+   }
+ 
+-  if (path_ignored == FALSE) {
++  if (path_ignored == false) {
+     np_set_best_match(path_select_list, mount_list, exact_match);
+   }
+ 
+@@ -229,7 +227,7 @@ main (int argc, char **argv)
+   temp_list = path_select_list;
+ 
+   while (path_select_list) {
+-    if (! path_select_list->best_match && ignore_missing == 1) {
++    if (! path_select_list->best_match && ignore_missing == true) {
+       /* If the first element will be deleted, the temp_list must be updated with the new start address as well */
+       if (path_select_list == temp_list) {
+         temp_list = path_select_list->name_next;
+@@ -249,7 +247,7 @@ main (int argc, char **argv)
+ 
+   path_select_list = temp_list;
+ 
+-  if (! path_select_list && ignore_missing == 1) {
++  if (! path_select_list && ignore_missing == true) {
+     result = STATE_OK;
+     if (verbose >= 2) {
+       printf ("None of the provided paths were found\n");
+@@ -295,7 +293,7 @@ main (int argc, char **argv)
+       /* Skip remote filesystems if we're not interested in them */
+       if (me->me_remote && show_local_fs) {
+         if (stat_remote_fs) {
+-          if (!stat_path(path) && ignore_missing == 1) {
++          if (!stat_path(path) && ignore_missing == true) {
+               result = STATE_OK;
+               xasprintf (&ignored, "%s %s;", ignored, path->name);
+           }
+@@ -319,7 +317,7 @@ main (int argc, char **argv)
+     }
+ 
+     if (!stat_path(path)) {
+-      if (ignore_missing == 1) {
++      if (ignore_missing == true) {
+         result = STATE_OK;
+         xasprintf (&ignored, "%s %s;", ignored, path->name);
+       }
+@@ -682,8 +680,8 @@ process_arguments (int argc, char **argv)
+       if (! (se = np_find_parameter(path_select_list, optarg))) {
+           se = np_add_parameter(&path_select_list, optarg);
+ 
+-          if (stat(optarg, &stat_buf[0]) && ignore_missing == 1) {
+-            path_ignored = TRUE;
++          if (stat(optarg, &stat_buf[0]) && ignore_missing == true) {
++            path_ignored = true;
+             break;
+           }
+       }
+@@ -775,7 +773,7 @@ process_arguments (int argc, char **argv)
+       break;
+ 
+     case IGNORE_MISSING:
+-      ignore_missing = 1;
++      ignore_missing = true;
+       break;
+     case 'A':
+       optarg = strdup(".*");
+@@ -812,8 +810,8 @@ process_arguments (int argc, char **argv)
+         }
+       }
+ 
+-      if (!fnd && ignore_missing == 1) {
+-        path_ignored = TRUE;
++      if (!fnd && ignore_missing == true) {
++        path_ignored = true;
+         /* path_selected = TRUE;*/
+         break;
+       } else if (!fnd)
+@@ -1031,7 +1029,7 @@ stat_path (struct parameter_list *p)
+   if (stat (p->name, &stat_buf[0])) {
+     if (verbose >= 3)
+       printf("stat failed on %s\n", p->name);
+-    if (ignore_missing == 1) {
++    if (ignore_missing == true) {
+       return false;
+     } else {
+       printf("DISK %s - ", _("CRITICAL"));


=====================================
debian/patches/33_check_procs_exclude-process
=====================================
@@ -0,0 +1,168 @@
+From 691376d3a16da06e34740593d9a1de0e00cbffb8 Mon Sep 17 00:00:00 2001
+From: Christian Kujau <lists at nerdbynature.de>
+Date: Mon, 20 Mar 2023 11:35:01 +0100
+Subject: [PATCH 1/2] check_procs: Implement --exclude-process to exclude
+ specific processes.
+
+Signed-off-by: Christian Kujau <lists at nerdbynature.de>
+---
+ plugins/check_procs.c | 47 +++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 45 insertions(+), 2 deletions(-)
+
+diff --git a/plugins/check_procs.c b/plugins/check_procs.c
+index a025ee891..d672dd44e 100644
+--- a/plugins/check_procs.c
++++ b/plugins/check_procs.c
+@@ -70,6 +70,7 @@ int options = 0; /* bitmask of filter criteria to test against */
+ #define PCPU 256
+ #define ELAPSED 512
+ #define EREG_ARGS 1024
++#define EXCLUDE_PROGS 2048
+ 
+ #define KTHREAD_PARENT "kthreadd" /* the parent process of kernel threads:
+ 							ppid of procs are compared to pid of this proc*/
+@@ -93,6 +94,9 @@ int rss;
+ float pcpu;
+ char *statopts;
+ char *prog;
++char *exclude_progs;
++char **exclude_progs_arr = NULL;
++char exclude_progs_counter = 0;
+ char *args;
+ char *input_filename = NULL;
+ regex_t re_args;
+@@ -250,6 +254,25 @@ main (int argc, char **argv)
+ 				continue;
+ 			}
+ 
++			/* Ignore excluded processes by name */
++			if(options & EXCLUDE_PROGS) {
++			  int found = 0;
++			  int i = 0;
++
++			  for(i=0; i < (exclude_progs_counter); i++) {
++			    if(!strcmp(procprog, exclude_progs_arr[i])) {
++			      found = 1;
++			    }
++			  }
++			  if(found == 0) {
++			    resultsum |= EXCLUDE_PROGS;
++			  } else
++			  {
++			    if(verbose >= 3)
++			      printf("excluding - by ignorelist\n");
++			  }
++			}
++
+ 			/* filter kernel threads (childs of KTHREAD_PARENT)*/
+ 			/* TODO adapt for other OSes than GNU/Linux
+ 					sorry for not doing that, but I've no other OSes to test :-( */
+@@ -409,6 +432,7 @@ process_arguments (int argc, char **argv)
+ 		{"input-file", required_argument, 0, CHAR_MAX+2},
+ 		{"no-kthreads", required_argument, 0, 'k'},
+ 		{"traditional-filter", no_argument, 0, 'T'},
++		{"exclude-process", required_argument, 0, 'X'},
+ 		{0, 0, 0, 0}
+ 	};
+ 
+@@ -417,7 +441,7 @@ process_arguments (int argc, char **argv)
+ 			strcpy (argv[c], "-t");
+ 
+ 	while (1) {
+-		c = getopt_long (argc, argv, "Vvhkt:c:w:p:s:u:C:a:z:r:m:P:T",
++		c = getopt_long (argc, argv, "Vvhkt:c:w:p:s:u:C:a:z:r:m:P:T:X:",
+ 			longopts, &option);
+ 
+ 		if (c == -1 || c == EOF)
+@@ -490,6 +514,23 @@ process_arguments (int argc, char **argv)
+ 			          prog);
+ 			options |= PROG;
+ 			break;
++		case 'X':
++			if(exclude_progs)
++			  break;
++			else
++			  exclude_progs = optarg;
++			xasprintf (&fmt, _("%s%sexclude progs '%s'"), (fmt ? fmt : ""), (options ? ", " : ""),
++				   exclude_progs);
++			char *p = strtok(exclude_progs, ",");
++
++			while(p){
++			  exclude_progs_arr = realloc(exclude_progs_arr, sizeof(char*) * ++exclude_progs_counter);
++			  exclude_progs_arr[exclude_progs_counter-1] = p;
++			  p = strtok(NULL, ",");
++			}
++
++			options |= EXCLUDE_PROGS;
++			break;
+ 		case 'a':									/* args (full path name with args) */
+ 			/* TODO: allow this to be passed in with --metric */
+ 			if (args)
+@@ -745,6 +786,8 @@ print_help (void)
+   printf ("   %s\n", _("Only scan for processes with args that contain the regex STRING."));
+   printf (" %s\n", "-C, --command=COMMAND");
+   printf ("   %s\n", _("Only scan for exact matches of COMMAND (without path)."));
++  printf (" %s\n", "-X, --exclude-process");
++  printf ("   %s\n", _("Exclude processes which match this comma seperated list"));
+   printf (" %s\n", "-k, --no-kthreads");
+   printf ("   %s\n", _("Only scan for non kernel threads (works on Linux only)."));
+ 
+@@ -786,5 +829,5 @@ print_usage (void)
+   printf ("%s\n", _("Usage:"));
+ 	printf ("%s -w <range> -c <range> [-m metric] [-s state] [-p ppid]\n", progname);
+   printf (" [-u user] [-r rss] [-z vsz] [-P %%cpu] [-a argument-array]\n");
+-  printf (" [-C command] [-k] [-t timeout] [-v]\n");
++  printf (" [-C command] [-X process_to_exclude] [-k] [-t timeout] [-v]\n");
+ }
+
+From 7b7037280c36279ea51de07f9a4efea10bcfa24c Mon Sep 17 00:00:00 2001
+From: Christian Kujau <lists at nerdbynature.de>
+Date: Tue, 21 Mar 2023 11:26:03 +0100
+Subject: [PATCH 2/2] check_procs: add a test for the newly added -X option.
+
+$ make test
+[...]
+perl -I .. -I .. ../test.pl
+No application (check_curl) found for test harness (check_curl.t)
+No application (check_snmp) found for test harness (check_snmp.t)
+./t/check_procs.t ...... ok
+./tests/check_nt.t ..... ok
+./tests/check_procs.t .. ok
+All tests successful.
+Files=4, Tests=73,  8 wallclock secs ( 0.05 usr  0.02 sys +  0.38 cusr
+0.22 csys =  0.67 CPU)
+Result: PASS
+
+Signed-off-by: Christian Kujau <lists at nerdbynature.de>
+---
+ plugins/tests/check_procs.t | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/plugins/tests/check_procs.t b/plugins/tests/check_procs.t
+index 3af218f50..b3a0a3015 100755
+--- a/plugins/tests/check_procs.t
++++ b/plugins/tests/check_procs.t
+@@ -8,7 +8,7 @@ use Test::More;
+ use NPTest;
+ 
+ if (-x "./check_procs") {
+-	plan tests => 52;
++	plan tests => 54;
+ } else {
+ 	plan skip_all => "No check_procs compiled";
+ }
+@@ -34,9 +34,13 @@ is( $result->return_code, 0, "Checking no threshold breeched" );
+ is( $result->output, "PROCS OK: 95 processes | procs=95;100;200;0;", "Output correct" );
+ 
+ $result = NPTest->testCmd( "$command -C launchd -c 5" );
+-is( $result->return_code, 2, "Checking processes filtered by command name" );
++is( $result->return_code, 2, "Checking processes matched by command name" );
+ is( $result->output, "PROCS CRITICAL: 6 processes with command name 'launchd' | procs=6;;5;0;", "Output correct" );
+ 
++$result = NPTest->testCmd( "$command -X bash -c 5" );
++is( $result->return_code, 2, "Checking processes excluded by command name" );
++is( $result->output, "PROCS CRITICAL: 95 processes with exclude progs 'bash' | procs=95;;5;0;", "Output correct" );
++
+ SKIP: {
+     skip 'user with uid 501 required', 4 unless getpwuid(501);
+ 


=====================================
debian/patches/34_check_curl_fix_compare_warning
=====================================
@@ -0,0 +1,31 @@
+From cf90f0de7b3c347a6860b50de6a610bd7132668c Mon Sep 17 00:00:00 2001
+From: Andreas Baumann <mail at andreasbaumann.cc>
+Date: Thu, 16 Mar 2023 16:21:46 +0100
+Subject: [PATCH] check_curk: including netinet/in.h (for FreeBSD), fixed an
+ ambigous compare warning
+
+---
+ plugins/check_curl.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/plugins/check_curl.c b/plugins/check_curl.c
+index e5be1ad56..c51914a9a 100644
+--- a/plugins/check_curl.c
++++ b/plugins/check_curl.c
+@@ -55,6 +55,7 @@ const char *email = "devel at monitoring-plugins.org";
+ #include "uriparser/Uri.h"
+ 
+ #include <arpa/inet.h>
++#include <netinet/in.h>
+ 
+ #if defined(HAVE_SSL) && defined(USE_OPENSSL)
+ #include <openssl/opensslv.h>
+@@ -541,7 +542,7 @@ check_http (void)
+   /* compose URL: use the address we want to connect to, set Host: header later */
+   snprintf (url, DEFAULT_BUFFER_SIZE, "%s://%s:%d%s",
+       use_ssl ? "https" : "http",
+-      use_ssl & host_name != NULL ? host_name : server_address,
++      ( use_ssl & ( host_name != NULL ) ) ? host_name : server_address,
+       server_port,
+       server_url
+   );


=====================================
debian/patches/series
=====================================
@@ -8,3 +8,16 @@
 14_check_curl_fix_SSL_with_multiple_IPs
 15_check_swap_remove_includes
 16_check_snmp_disable_multiplier_when_unused
+17_fix_exit_codes
+18_check_mysql_fix_typo
+19_check_nwstat_fix_typo
+20_chech_nt_fix_encoding
+21_check_pgsql_extra_output
+22_check_disk_avoid_mount
+23_check_mysql_fix_error_handling
+# feature patches
+30_check_radius_radcli_1.3.1_support
+31_checl_mailq_separate_submission_queue
+32_check_disk_add_ignore_missing
+33_check_procs_exclude-process
+34_check_curl_fix_compare_warning



View it on GitLab: https://salsa.debian.org/nagios-team/monitoring-plugins/-/compare/deeee8535014bf1b7484b18597b822512ee416b8...85d9e03ea0e7e6f11ecb9ca7e9ee630d1e9db0e9

-- 
View it on GitLab: https://salsa.debian.org/nagios-team/monitoring-plugins/-/compare/deeee8535014bf1b7484b18597b822512ee416b8...85d9e03ea0e7e6f11ecb9ca7e9ee630d1e9db0e9
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-nagios-changes/attachments/20230612/3b111fa5/attachment-0001.htm>


More information about the pkg-nagios-changes mailing list