Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package monitoring-plugins for 
openSUSE:Factory checked in at 2022-07-14 16:34:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/monitoring-plugins (Old)
 and      /work/SRC/openSUSE:Factory/.monitoring-plugins.new.1523 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "monitoring-plugins"

Thu Jul 14 16:34:13 2022 rev:26 rq:988981 version:2.3.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/monitoring-plugins/monitoring-plugins.changes    
2022-03-26 22:31:23.409980267 +0100
+++ 
/work/SRC/openSUSE:Factory/.monitoring-plugins.new.1523/monitoring-plugins.changes
  2022-07-14 16:34:38.192649016 +0200
@@ -1,0 +2,8 @@
+Sat Jul  2 15:56:26 UTC 2022 - Archie Cobbs <archie.co...@gmail.com>
+
+- added monitoring-plugins-2.3.1-check_by_ssh.patch
+  Adds "-U" flag, which causes a 255 exit value from ssh(1), which
+  indicates a connection failure, to return UNKNOWN instead of CRITICAL.
+  (issue #1123)
+
+-------------------------------------------------------------------

New:
----
  monitoring-plugins-2.3.1-check_by_ssh.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ monitoring-plugins.spec ++++++
--- /var/tmp/diff_new_pack.MHOvhz/_old  2022-07-14 16:34:38.904649718 +0200
+++ /var/tmp/diff_new_pack.MHOvhz/_new  2022-07-14 16:34:38.908649721 +0200
@@ -87,6 +87,8 @@
 # PATCH-FIX-UPSTREAM - see 
https://github.com/monitoring-plugins/monitoring-plugins/issues/1375
 Patch127:       
monitoring-plugins-2.3.1-check_dhcp_-_detect_rogue_dhcp_servers.patch
 Patch128:       monitoring-plugins-2.3.1-check_disk_on_btrfs.patch
+# PATCH-FIX-UPSTREAM - see 
https://github.com/monitoring-plugins/monitoring-plugins/pull/1774
+Patch129:       monitoring-plugins-2.3.1-check_by_ssh.patch
 BuildRequires:  bind-utils
 BuildRequires:  dhcp-devel
 BuildRequires:  fping
@@ -1141,6 +1143,7 @@
 %patch126 -p1
 %patch127 -p1
 %patch128 -p1
+%patch129 -p1
 find -type f -exec chmod 644 {} +
 
 %build

++++++ monitoring-plugins-2.3.1-check_by_ssh.patch ++++++
diff -ur monitoring-plugins-2.3.1.orig/plugins/check_by_ssh.c 
monitoring-plugins-2.3.1/plugins/check_by_ssh.c
--- monitoring-plugins-2.3.1.orig/plugins/check_by_ssh.c        2021-04-10 
07:13:41.000000000 -0500
+++ monitoring-plugins-2.3.1/plugins/check_by_ssh.c     2022-07-02 
10:33:49.977417534 -0500
@@ -49,6 +49,7 @@
 unsigned int services = 0;
 int skip_stdout = 0;
 int skip_stderr = 0;
+int unknown_timeout = 0;
 char *remotecmd = NULL;
 char **commargv = NULL;
 int commargc = 0;
@@ -100,6 +101,13 @@
 
        result = cmd_run_array (commargv, &chld_out, &chld_err, 0);
 
+       /* SSH returns 255 if connection attempt fails; include the first line 
of error output */
+       if (result == 255 && unknown_timeout) {
+               printf (_("SSH connection failed: %s\n"),
+                       chld_err.lines > 0 ? chld_err.line[0] : "(no error 
output)");
+               return STATE_UNKNOWN;
+       }
+
        if (verbose) {
                for(i = 0; i < chld_out.lines; i++)
                        printf("stdout: %s\n", chld_out.line[i]);
@@ -176,6 +184,7 @@
                {"verbose", no_argument, 0, 'v'},
                {"fork", no_argument, 0, 'f'},
                {"timeout", required_argument, 0, 't'},
+               {"unknown-timeout", no_argument, 0, 'U'},
                {"host", required_argument, 0, 'H'},    /* backward 
compatibility */
                {"hostname", required_argument, 0, 'H'},
                {"port", required_argument,0,'p'},
@@ -207,7 +216,7 @@
                        strcpy (argv[c], "-t");
 
        while (1) {
-               c = getopt_long (argc, argv, 
"Vvh1246fqt:H:O:p:i:u:l:C:S::E::n:s:o:F:", longopts,
+               c = getopt_long (argc, argv, 
"Vvh1246fqt:UH:O:p:i:u:l:C:S::E::n:s:o:F:", longopts,
                                 &option);
 
                if (c == -1 || c == EOF)
@@ -229,6 +238,9 @@
                        else
                                timeout_interval = atoi (optarg);
                        break;
+               case 'U':
+                       unknown_timeout = 1;
+                       break;
                case 'H':                                                       
                /* host */
                        host_or_die(optarg);
                        hostname = optarg;
@@ -437,6 +449,8 @@
   printf ("    %s\n", _("Tell ssh to suppress warning and diagnostic messages 
[optional]"));
        printf (UT_WARN_CRIT);
        printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+       printf (" %s\n","-U, --unknown-timeout");
+       printf ("    %s\n", _("Make connection problems return UNKNOWN instead 
of CRITICAL"));
        printf (UT_VERBOSE);
        printf("\n");
   printf (" %s\n", _("The most common mode of use is to refer to a local 
identity file with"));
@@ -466,7 +480,7 @@
 print_usage (void)
 {
        printf ("%s\n", _("Usage:"));
-       printf (" %s -H <host> -C <command> [-fqv] [-1|-2] [-4|-6]\n"
+       printf (" %s -H <host> -C <command> [-fqvU] [-1|-2] [-4|-6]\n"
                "       [-S [lines]] [-E [lines]] [-t timeout] [-i identity]\n"
                "       [-l user] [-n name] [-s servicelist] [-O outputfile]\n"
                "       [-p port] [-o ssh-option] [-F configfile]\n",

Reply via email to