1
0

- Update to 2.3.3

Enhancements
  General
  + using PRId64 and PRIu64 instead of %ld directly
  Single Plugins
  + check_http: Make faster with larger files
  + check_snmp: add 'multiplier' to modify current value
  + check_http: Implement chunked encoding decoding
  + check_http/check_curl: add chunked encoding test
  + check_log: Added --exclude to exclude patterns
  + check_log: Add tests
  + check_disk: Clarify usage possibilites
  Fixes
  General
  + fixed two PRId64 to PRIu64 in perfdata_uint64
  Single Plugins
  + check_pgsql: Removing is_pg_dbname alltogether,using postgres API.
  + check_http: Remove superflous CRLF in HTTP-Requests
  + check_curl: detect ipv6
  + check_icmp: fix parsing help/version long options
  + check_http: fix test plan
  + check_disk: Find accessible mount path if multiple are available
  + check_apt: Fix unknown escape sequence error output
  + check_curl: fix checking large bodys
  + check_snmp: Improve tests for check_snmp & multiply option
  + check_snmp: always apply format when applying multiplier
  + check_http: Use real booleans instead of ints
  + check_http: Document process_arguments a little bit better
  + check_http: Remove dead code
  + check_http: Fix several bug in the implementation of unchunking

OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins?expand=0&rev=101
This commit is contained in:
Lars Vogdt 2023-02-23 15:43:20 +00:00 committed by Git OBS Bridge
parent b82aee2d3d
commit 7e6efb42c5
22 changed files with 527 additions and 264 deletions

View File

@ -1,70 +0,0 @@
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",

View File

@ -1,25 +0,0 @@
commit a00fd77179dd6a6c2c96ff09350a9c213c18fd62
Author: George Hansper <george@hansper.id.au>
Date: Tue Sep 22 19:06:57 2020 +1000
check_disk - fix false DISK CRITICAL alert for btrfs filesystems due to BSD Gnulib workaround
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 2f20e47a..c813ad65 100755
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -1310,10 +1310,14 @@ get_stats (struct parameter_list *p, struct fs_usage *fsp) {
void
get_path_stats (struct parameter_list *p, struct fs_usage *fsp) {
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(OpenBSD )
/* 2007-12-08 - Workaround for Gnulib reporting insanely high available
* space on BSD (the actual value should be negative but fsp->fsu_bavail
* is unsigned) */
p->available = fsp->fsu_bavail > fsp->fsu_bfree ? 0 : fsp->fsu_bavail;
+#else
+ p->available = fsp->fsu_bavail;
+#endif
p->available_to_root = fsp->fsu_bfree;
p->used = fsp->fsu_blocks - fsp->fsu_bfree;
if (freespace_ignore_reserved) {

View File

@ -1,13 +0,0 @@
Index: monitoring-plugins-2.3.1/plugins/check_snmp.c
===================================================================
--- monitoring-plugins-2.3.1.orig/plugins/check_snmp.c
+++ monitoring-plugins-2.3.1/plugins/check_snmp.c
@@ -375,7 +375,7 @@ main (int argc, char **argv)
}
}
- for (line=0, i=0; line < chld_out.lines; line++, i++) {
+ for (line=0, i=0; line < chld_out.lines && i < numoids; line++, i++) {
if(calculate_rate)
conv = "%.10g";
else

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f56eb84871983fd719247249e3532228b37e2efaae657a3979bd14ac1f84a35b
size 2529669

View File

@ -1 +0,0 @@
8cb4d72920ed99ff922b6989fe5213ea76b9388e *monitoring-plugins-2.3.1.tar.gz

View File

@ -0,0 +1,46 @@
Index: monitoring-plugins-2.3.3/plugins/check_by_ssh.c
===================================================================
--- monitoring-plugins-2.3.3.orig/plugins/check_by_ssh.c
+++ monitoring-plugins-2.3.3/plugins/check_by_ssh.c
@@ -109,6 +109,13 @@ main (int argc, char **argv)
return STATE_UNKNOWN;
}
+ /* 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]);
@@ -455,12 +462,12 @@ print_help (void)
printf (" %s\n", _("Tell ssh to use this configfile [optional]"));
printf (" %s\n","-q, --quiet");
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 (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"));
printf (" %s\n", _("the '-i' option. In this mode, the identity pair should have a null"));
printf (" %s\n", _("passphrase and the public key should be listed in the authorized_keys"));
@@ -479,7 +486,7 @@ print_help (void)
printf (" %s\n", "[1080933700] PROCESS_SERVICE_CHECK_RESULT;flint;c2;0; up 2 days");
printf (" %s\n", "[1080933700] PROCESS_SERVICE_CHECK_RESULT;flint;c3;0; up 2 days");
- printf(UT_SUPPORT);
+ printf(UT_SUPPORT);
}

View File

@ -1,7 +1,7 @@
Index: monitoring-plugins-2.3.1/plugins-root/check_dhcp.c Index: monitoring-plugins-2.3.3/plugins-root/check_dhcp.c
=================================================================== ===================================================================
--- monitoring-plugins-2.3.1.orig/plugins-root/check_dhcp.c --- monitoring-plugins-2.3.3.orig/plugins-root/check_dhcp.c
+++ monitoring-plugins-2.3.1/plugins-root/check_dhcp.c +++ monitoring-plugins-2.3.3/plugins-root/check_dhcp.c
@@ -156,6 +156,7 @@ typedef struct dhcp_offer_struct{ @@ -156,6 +156,7 @@ typedef struct dhcp_offer_struct{
u_int32_t lease_time; /* lease time in seconds */ u_int32_t lease_time; /* lease time in seconds */
u_int32_t renewal_time; /* renewal time in seconds */ u_int32_t renewal_time; /* renewal time in seconds */

View File

@ -0,0 +1,25 @@
commit a00fd77179dd6a6c2c96ff09350a9c213c18fd62
Author: George Hansper <george@hansper.id.au>
Date: Tue Sep 22 19:06:57 2020 +1000
check_disk - fix false DISK CRITICAL alert for btrfs filesystems due to BSD Gnulib workaround
Index: monitoring-plugins-2.3.3/plugins/check_disk.c
===================================================================
--- monitoring-plugins-2.3.3.orig/plugins/check_disk.c
+++ monitoring-plugins-2.3.3/plugins/check_disk.c
@@ -1041,7 +1041,14 @@ get_stats (struct parameter_list *p, str
void
get_path_stats (struct parameter_list *p, struct fs_usage *fsp) {
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(OpenBSD )
+ /* 2007-12-08 - Workaround for Gnulib reporting insanely high available
+ * space on BSD (the actual value should be negative but fsp->fsu_bavail
+ * is unsigned) */
+ p->available = fsp->fsu_bavail > fsp->fsu_bfree ? 0 : fsp->fsu_bavail;
+#else
p->available = fsp->fsu_bavail;
+#endif
p->available_to_root = fsp->fsu_bfree;
p->used = fsp->fsu_blocks - fsp->fsu_bfree;
if (freespace_ignore_reserved) {

View File

@ -0,0 +1,33 @@
Index: monitoring-plugins-2.3.3/plugins-scripts/check_log.sh
===================================================================
--- monitoring-plugins-2.3.3.orig/plugins-scripts/check_log.sh
+++ monitoring-plugins-2.3.3/plugins-scripts/check_log.sh
@@ -112,23 +112,23 @@ while test -n "$1"; do
exit "$STATE_OK"
;;
-F | --filename)
- logfile=$2
+ logfile="$2"
shift 2
;;
-O | --oldlog)
- oldlog=$2
+ oldlog="$2"
shift 2
;;
-q | --query)
- query=$2
+ query="$2"
shift 2
;;
--exclude)
- exclude=$2
+ exclude="$2"
shift 2
;;
-x | --exitstatus)
- exitstatus=$2
+ exitstatus="$2"
shift 2
;;
-e | --extended-regex)

View File

@ -0,0 +1,13 @@
Index: monitoring-plugins-2.3.3/plugins/check_ntp_time.c
===================================================================
--- monitoring-plugins-2.3.3.orig/plugins/check_ntp_time.c
+++ monitoring-plugins-2.3.3/plugins/check_ntp_time.c
@@ -533,7 +533,7 @@ int process_arguments(int argc, char **a
char *perfd_offset (double offset)
{
- return fperfdata ("offset", offset, "s",
+ return fperfdata ("offset", fabs(offset), "s",
TRUE, offset_thresholds->warning->end,
TRUE, offset_thresholds->critical->end,
FALSE, 0, FALSE, 0);

View File

@ -0,0 +1,13 @@
Index: monitoring-plugins-2.3.3/plugins/check_snmp.c
===================================================================
--- monitoring-plugins-2.3.3.orig/plugins/check_snmp.c
+++ monitoring-plugins-2.3.3/plugins/check_snmp.c
@@ -594,7 +594,7 @@ main (int argc, char **argv)
len = sizeof(perfstr)-strlen(perfstr)-1;
strncat(perfstr, show, len>ptr-show ? ptr-show : len);
- if (type)
+ if (type[0])
strncat(perfstr, type, sizeof(perfstr)-strlen(perfstr)-1);
if (warning_thresholds) {

View File

@ -26,11 +26,20 @@ Signed-off-by: Anton Lofgren <alofgren@op5.com>
plugins/t/check_ssh.t | 97 ++++++++++++++++++++++++++------- plugins/t/check_ssh.t | 97 ++++++++++++++++++++++++++-------
2 files changed, 164 insertions(+), 55 deletions(-) 2 files changed, 164 insertions(+), 55 deletions(-)
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c Index: monitoring-plugins-2.3.3/plugins/check_ssh.c
index 3658965e5..fc2ceb78b 100644 ===================================================================
--- a/plugins/check_ssh.c --- monitoring-plugins-2.3.3.orig/plugins/check_ssh.c
+++ b/plugins/check_ssh.c +++ monitoring-plugins-2.3.3/plugins/check_ssh.c
@@ -215,8 +215,13 @@ ssh_connect (char *haddr, int hport, char *remote_version, char *remote_protocol @@ -106,7 +106,7 @@ process_arguments (int argc, char **argv
{"timeout", required_argument, 0, 't'},
{"verbose", no_argument, 0, 'v'},
{"remote-version", required_argument, 0, 'r'},
- {"remote-protcol", required_argument, 0, 'P'},
+ {"remote-protocol", required_argument, 0, 'P'},
{0, 0, 0, 0}
};
@@ -215,8 +215,13 @@ ssh_connect (char *haddr, int hport, cha
{ {
int sd; int sd;
int result; int result;
@ -44,7 +53,7 @@ index 3658965e5..fc2ceb78b 100644
char *ssh_proto = NULL; char *ssh_proto = NULL;
char *ssh_server = NULL; char *ssh_server = NULL;
static char *rev_no = VERSION; static char *rev_no = VERSION;
@@ -231,51 +236,94 @@ ssh_connect (char *haddr, int hport, char *remote_version, char *remote_protocol @@ -231,51 +236,118 @@ ssh_connect (char *haddr, int hport, cha
return result; return result;
output = (char *) malloc (BUFF_SZ + 1); output = (char *) malloc (BUFF_SZ + 1);
@ -95,11 +104,35 @@ index 3658965e5..fc2ceb78b 100644
+ printf("SSH CRITICAL - No version control string received"); + printf("SSH CRITICAL - No version control string received");
+ exit(STATE_CRITICAL); + exit(STATE_CRITICAL);
+ } + }
+ /*
+ * "When the connection has been established, both sides MUST send an
+ * identification string. This identification string MUST be
+ *
+ * SSH-protoversion-softwareversion SP comments CR LF"
+ * - RFC 4253:4.2
+ */
+ strip (version_control_string); + strip (version_control_string);
+ if (verbose) + if (verbose)
+ printf ("%s\n", version_control_string); + printf ("%s\n", version_control_string);
+ ssh_proto = version_control_string + 4; + ssh_proto = version_control_string + 4;
+ ssh_server = ssh_proto + strspn (ssh_proto, "-0123456789."); +
+ /*
+ * We assume the protoversion is of the form Major.Minor, although
+ * this is not _strictly_ required. See
+ *
+ * "Both the 'protoversion' and 'softwareversion' strings MUST consist of
+ * printable US-ASCII characters, with the exception of whitespace
+ * characters and the minus sign (-)"
+ * - RFC 4253:4.2
+ * and,
+ *
+ * "As stated earlier, the 'protoversion' specified for this protocol is
+ * "2.0". Earlier versions of this protocol have not been formally
+ * documented, but it is widely known that they use 'protoversion' of
+ * "1.x" (e.g., "1.5" or "1.3")."
+ * - RFC 4253:5
+ */
+ ssh_server = ssh_proto + strspn (ssh_proto, "0123456789.") + 1; /* (+1 for the '-' separating protoversion from softwareversion) */
+ +
+ /* If there's a space in the version string, whatever's after the space is a comment + /* If there's a space in the version string, whatever's after the space is a comment
+ * (which is NOT part of the server name/version)*/ + * (which is NOT part of the server name/version)*/
@ -131,8 +164,7 @@ index 3658965e5..fc2ceb78b 100644
- close(sd); - close(sd);
- exit (STATE_CRITICAL); - exit (STATE_CRITICAL);
- } - }
+ ssh_proto[strspn (ssh_proto, "0123456789. ")] = 0; -
- if (remote_protocol && strcmp(remote_protocol, ssh_proto)) { - if (remote_protocol && strcmp(remote_protocol, ssh_proto)) {
- printf - printf
- (_("SSH CRITICAL - %s (protocol %s) protocol version mismatch, expected '%s'\n"), - (_("SSH CRITICAL - %s (protocol %s) protocol version mismatch, expected '%s'\n"),
@ -140,31 +172,33 @@ index 3658965e5..fc2ceb78b 100644
- close(sd); - close(sd);
- exit (STATE_CRITICAL); - exit (STATE_CRITICAL);
- } - }
+ ssh_proto[strspn (ssh_proto, "0123456789. ")] = 0;
- elapsed_time = (double)deltime(tv) / 1.0e6;
+ xasprintf (&buffer, "SSH-%s-check_ssh_%s\r\n", ssh_proto, rev_no); + xasprintf (&buffer, "SSH-%s-check_ssh_%s\r\n", ssh_proto, rev_no);
+ send (sd, buffer, strlen (buffer), MSG_DONTWAIT); + send (sd, buffer, strlen (buffer), MSG_DONTWAIT);
+ if (verbose) + if (verbose)
+ printf ("%s\n", buffer); + printf ("%s\n", buffer);
- elapsed_time = (double)deltime(tv) / 1.0e6;
+ if (remote_version && strcmp(remote_version, ssh_server)) { + if (remote_version && strcmp(remote_version, ssh_server)) {
+ printf
+ (_("SSH CRITICAL - %s (protocol %s) version mismatch, expected '%s'\n"),
+ ssh_server, ssh_proto, remote_version);
+ close(sd);
+ exit (STATE_CRITICAL);
+ }
+ if (remote_protocol && strcmp(remote_protocol, ssh_proto)) {
printf printf
- (_("SSH OK - %s (protocol %s) | %s\n"), - (_("SSH OK - %s (protocol %s) | %s\n"),
- ssh_server, ssh_proto, fperfdata("time", elapsed_time, "s", - ssh_server, ssh_proto, fperfdata("time", elapsed_time, "s",
- FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)socket_timeout)); - FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)socket_timeout));
+ (_("SSH CRITICAL - %s (protocol %s) protocol version mismatch, expected '%s'\n"), + (_("SSH CRITICAL - %s (protocol %s) version mismatch, expected '%s'\n"),
+ ssh_server, ssh_proto, remote_protocol); + ssh_server, ssh_proto, remote_version);
close(sd); close(sd);
- exit (STATE_OK); - exit (STATE_OK);
+ exit (STATE_CRITICAL); + exit (STATE_CRITICAL);
} }
+
+ if (remote_protocol && strcmp(remote_protocol, ssh_proto)) {
+ printf
+ (_("SSH CRITICAL - %s (protocol %s) protocol version mismatch, expected '%s'\n"),
+ ssh_server, ssh_proto, remote_protocol);
+ close(sd);
+ exit (STATE_CRITICAL);
+ }
+ elapsed_time = (double)deltime(tv) / 1.0e6; + elapsed_time = (double)deltime(tv) / 1.0e6;
+ +
+ printf + printf
@ -176,71 +210,3 @@ index 3658965e5..fc2ceb78b 100644
} }
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c
index fc2ceb78b..7b576895f 100644
--- a/plugins/check_ssh.c
+++ b/plugins/check_ssh.c
@@ -278,11 +278,35 @@ ssh_connect (char *haddr, int hport, char *remote_version, char *remote_protocol
printf("SSH CRITICAL - No version control string received");
exit(STATE_CRITICAL);
}
+ /*
+ * "When the connection has been established, both sides MUST send an
+ * identification string. This identification string MUST be
+ *
+ * SSH-protoversion-softwareversion SP comments CR LF"
+ * - RFC 4253:4.2
+ */
strip (version_control_string);
if (verbose)
printf ("%s\n", version_control_string);
ssh_proto = version_control_string + 4;
- ssh_server = ssh_proto + strspn (ssh_proto, "-0123456789.");
+
+ /*
+ * We assume the protoversion is of the form Major.Minor, although
+ * this is not _strictly_ required. See
+ *
+ * "Both the 'protoversion' and 'softwareversion' strings MUST consist of
+ * printable US-ASCII characters, with the exception of whitespace
+ * characters and the minus sign (-)"
+ * - RFC 4253:4.2
+ * and,
+ *
+ * "As stated earlier, the 'protoversion' specified for this protocol is
+ * "2.0". Earlier versions of this protocol have not been formally
+ * documented, but it is widely known that they use 'protoversion' of
+ * "1.x" (e.g., "1.5" or "1.3")."
+ * - RFC 4253:5
+ */
+ ssh_server = ssh_proto + strspn (ssh_proto, "0123456789.") + 1; /* (+1 for the '-' separating protoversion from softwareversion) */
/* If there's a space in the version string, whatever's after the space is a comment
* (which is NOT part of the server name/version)*/
From 59bed139e84fd6342d4203ebebca28bf2f4dcc82 Mon Sep 17 00:00:00 2001
From: Anton Lofgren <alofgren@op5.com>
Date: Fri, 30 Jan 2015 10:52:20 +0100
Subject: [PATCH 4/4] check_ssh: Fix a typo in "remote-protocol parameter
remote-protcol -> remote-protocol
Signed-off-by: Anton Lofgren <alofgren@op5.com>
---
plugins/check_ssh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c
index 7b576895f..f12f34051 100644
--- a/plugins/check_ssh.c
+++ b/plugins/check_ssh.c
@@ -106,7 +106,7 @@ process_arguments (int argc, char **argv)
{"timeout", required_argument, 0, 't'},
{"verbose", no_argument, 0, 'v'},
{"remote-version", required_argument, 0, 'r'},
- {"remote-protcol", required_argument, 0, 'P'},
+ {"remote-protocol", required_argument, 0, 'P'},
{0, 0, 0, 0}
};

View File

@ -1,11 +1,11 @@
Index: monitoring-plugins-2.3.1/plugins/t/check_ssh.t Index: monitoring-plugins-2.3.3/plugins/t/check_ssh.t
=================================================================== ===================================================================
--- monitoring-plugins-2.3.1.orig/plugins/t/check_ssh.t --- monitoring-plugins-2.3.3.orig/plugins/t/check_ssh.t
+++ monitoring-plugins-2.3.1/plugins/t/check_ssh.t +++ monitoring-plugins-2.3.3/plugins/t/check_ssh.t
@@ -8,34 +8,105 @@ use strict; @@ -8,34 +8,105 @@ use strict;
use Test::More; use Test::More;
use NPTest; use NPTest;
-# Required parameters -# Required parameters
-my $ssh_host = getTestParameter("NP_SSH_HOST", "A host providing SSH service", "localhost"); -my $ssh_host = getTestParameter("NP_SSH_HOST", "A host providing SSH service", "localhost");
-my $host_nonresponsive = getTestParameter("NP_HOST_NONRESPONSIVE", "The hostname of system not responsive to network requests", "10.0.0.1" ); -my $host_nonresponsive = getTestParameter("NP_HOST_NONRESPONSIVE", "The hostname of system not responsive to network requests", "10.0.0.1" );
@ -21,7 +21,8 @@ Index: monitoring-plugins-2.3.1/plugins/t/check_ssh.t
- ); - );
-cmp_ok($result->return_code, '==', 0, "Exit with return code 0 (OK)"); -cmp_ok($result->return_code, '==', 0, "Exit with return code 0 (OK)");
-like($result->output, '/^SSH OK - /', "Status text if command returned none (OK)"); -like($result->output, '/^SSH OK - /', "Status text if command returned none (OK)");
- +my $res;
- -
-$result = NPTest->testCmd( -$result = NPTest->testCmd(
- "./check_ssh -H $host_nonresponsive -t 2" - "./check_ssh -H $host_nonresponsive -t 2"
@ -36,8 +37,6 @@ Index: monitoring-plugins-2.3.1/plugins/t/check_ssh.t
- ); - );
-cmp_ok($result->return_code, '==', 3, "Exit with return code 0 (OK)"); -cmp_ok($result->return_code, '==', 3, "Exit with return code 0 (OK)");
-like($result->output, '/^check_ssh: Invalid hostname/', "Status text if command returned none (OK)"); -like($result->output, '/^check_ssh: Invalid hostname/', "Status text if command returned none (OK)");
+my $res;
+# Required parameters +# Required parameters
+my $ssh_host = getTestParameter("NP_SSH_HOST", +my $ssh_host = getTestParameter("NP_SSH_HOST",
+ "A host providing SSH service", + "A host providing SSH service",
@ -137,4 +136,4 @@ Index: monitoring-plugins-2.3.1/plugins/t/check_ssh.t
+ cmp_ok( $res->return_code, '==', 0, "Got delayed SSH protocol version control string"); + cmp_ok( $res->return_code, '==', 0, "Got delayed SSH protocol version control string");
+ like( $res->output, '/^SSH OK - nagiosplug.ssh.0.2 \(protocol 2.0\)/', "Output OK"); + like( $res->output, '/^SSH OK - nagiosplug.ssh.0.2 \(protocol 2.0\)/', "Output OK");
+ close NC; + close NC;
+

View File

@ -0,0 +1,95 @@
From d6bd787123aa9ccd96edec8286ec22dd0442c620 Mon Sep 17 00:00:00 2001
From: Michael Orlitzky <michael@orlitzky.com>
Date: Fri, 27 Oct 2017 07:58:43 -0400
Subject: [PATCH] plugins/check_mysql*.c: define our own default MySQL port.
The MYSQL_PORT constant used to be defined in mysql.h, and was used as
the default port in the two plugins check_mysql and check_mysql_query.
Now that mysql.h no longer defines that constant, our plugins fail to
build against newer versions of MySQL and MariaDB.
Since MYSQL_PORT used the "default port" on the local system, it
actually was not the best choice as the default for the check plugins:
when monitoring remote MySQL servers, the usual default of 3306 is
more likely to be correct than whatever the local server happens to be
listening on.
As a result, we fix the issue by defining our own constant, called
CHECK_PORT_DEFAULT, as "3306" at the top of both check_mysql.c and
check_mysql_query.c. The existing uses of MYSQL_PORT have been changed
to use the new CHECK_PORT_DEFAULT.
This change is backwards-incompatible: any users who compiled in a
MYSQL_PORT other than 3306 and who were running their checks on the
same server as the database will now need to specify that port
explicitly.
Closes: https://github.com/monitoring-plugins/monitoring-plugins/issues/1508
---
plugins/check_mysql.c | 8 ++++++--
plugins/check_mysql_query.c | 8 ++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
Index: monitoring-plugins-2.3.3/plugins/check_mysql.c
===================================================================
--- monitoring-plugins-2.3.3.orig/plugins/check_mysql.c
+++ monitoring-plugins-2.3.3/plugins/check_mysql.c
@@ -35,6 +35,8 @@ const char *copyright = "1999-2011";
const char *email = "devel@monitoring-plugins.org";
#define SLAVERESULTSIZE 70
+/* The default port that MySQL servers listen on. */
+#define CHECK_PORT_DEFAULT 3306
#include "common.h"
#include "utils.h"
@@ -58,7 +60,7 @@ char *ciphers = NULL;
bool ssl = false;
char *opt_file = NULL;
char *opt_group = NULL;
-unsigned int db_port = MYSQL_PORT;
+unsigned int db_port = CHECK_PORT_DEFAULT;
int check_slave = 0, warn_sec = 0, crit_sec = 0;
int ignore_auth = 0;
int verbose = 0;
@@ -508,7 +510,7 @@ void
print_help (void)
{
char *myport;
- xasprintf (&myport, "%d", MYSQL_PORT);
+ xasprintf (&myport, "%d", CHECK_PORT_DEFAULT);
print_revision (progname, NP_VERSION);
Index: monitoring-plugins-2.3.3/plugins/check_mysql_query.c
===================================================================
--- monitoring-plugins-2.3.3.orig/plugins/check_mysql_query.c
+++ monitoring-plugins-2.3.3/plugins/check_mysql_query.c
@@ -33,6 +33,9 @@ const char *progname = "check_mysql_quer
const char *copyright = "1999-2007";
const char *email = "devel@monitoring-plugins.org";
+/* The default port that MySQL servers listen on. */
+#define CHECK_PORT_DEFAULT 3306
+
#include "common.h"
#include "utils.h"
#include "utils_base.h"
@@ -48,7 +51,7 @@ char *db_pass = NULL;
char *db = NULL;
char *opt_file = NULL;
char *opt_group = NULL;
-unsigned int db_port = MYSQL_PORT;
+unsigned int db_port = CHECK_PORT_DEFAULT;
int process_arguments (int, char **);
int validate_arguments (void);
@@ -299,7 +302,7 @@ void
print_help (void)
{
char *myport;
- xasprintf (&myport, "%d", MYSQL_PORT);
+ xasprintf (&myport, "%d", CHECK_PORT_DEFAULT);
print_revision (progname, NP_VERSION);

View File

@ -0,0 +1,21 @@
Index: monitoring-plugins-2.3.3/plugins-root/Makefile.am
===================================================================
--- monitoring-plugins-2.3.3.orig/plugins-root/Makefile.am
+++ monitoring-plugins-2.3.3/plugins-root/Makefile.am
@@ -49,7 +49,6 @@ INSTALL_SUID = \
p=$$f; \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p; \
- echo " chown root $(DESTDIR)$(libexecdir)/$$p"; \
chown root $(DESTDIR)$(libexecdir)/$$p; \
echo " chmod $(setuid_root_mode) $(DESTDIR)$(libexecdir)/$$p"; \
chmod $(setuid_root_mode) $(DESTDIR)$(libexecdir)/$$p; \
@@ -64,7 +63,7 @@ install-exec-local: $(noinst_PROGRAMS)
echo > $$TMPFILE; \
## See if we can create a setuid root executable in $(libexecdir).
## If not, then don't even try to install setuid plugins.
- can_create_suid_root_executable=no; \
+ can_create_suid_root_executable=yes; \
chown root $$TMPFILE > /dev/null 2>&1 \
&& chmod $(setuid_root_mode) $$TMPFILE > /dev/null 2>&1 \
&& can_create_suid_root_executable=yes; \

View File

@ -0,0 +1,44 @@
From f3e6c9663369d011b241c6fb2c8fd5312f98cacf Mon Sep 17 00:00:00 2001
From: Jan ONDREJ <ondrejj@salstar.sk>
Date: Thu, 7 Oct 2010 17:28:48 +0400
Subject: [PATCH 6/6] Prevent check_swap from returning OK, if no swap activated
My swap was not activated on boot for unknown reason and nagios does not
report this as a problem. Here is an example:
[root@kecom ~]# rpm -q nagios-plugins
nagios-plugins-1.4.13-11.fc10.i386
[root@kecom ~]# /usr/lib/nagios/plugins/check_swap -w 80% -c 40% -c 1 -w 2
SWAP CRITICAL - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0
If there is no swap and users is trying to test percentage of free swap,
consider 0 MB free swap space as problem, or of free/total raises division
by zero, then set percentage to 0%, not to 100%.
Steps to Reproduce:
1. make sure, your swap is empty or it's usage is not large
2. swapoff -a
3. /usr/lib/nagios/plugins/check_swap -w 80% -c 40%
Actual results:
SWAP OK - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0
Expected results:
SWAP CRITICAL - 0% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0
Additional info:
https://bugzilla.redhat.com/512559
Index: monitoring-plugins-2.3.3/plugins/check_swap.c
===================================================================
--- monitoring-plugins-2.3.3.orig/plugins/check_swap.c
+++ monitoring-plugins-2.3.3/plugins/check_swap.c
@@ -137,7 +137,7 @@ main (int argc, char **argv)
free_swap_mb += dskfree_mb;
if (allswaps) {
if (dsktotal_mb == 0)
- percent=100.0;
+ percent= 0.0;
else
percent = 100 * (((double) dskused_mb) / ((double) dsktotal_mb));
result = max_state (result, check_swap (dskfree_mb, dsktotal_mb));

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7023b1dc17626c5115b061e7ce02e06f006e35af92abf473334dffe7ff3c2d6d
size 2620192

View File

@ -0,0 +1 @@
4424d4ed0bfffa42b215ae4702a70adea968ad6d *monitoring-plugins-2.3.3.tar.gz

View File

@ -1,13 +0,0 @@
Index: monitoring-plugins-2.3.1/plugins/check_disk.c
===================================================================
--- monitoring-plugins-2.3.1.orig/plugins/check_disk.c
+++ monitoring-plugins-2.3.1/plugins/check_disk.c
@@ -1030,7 +1030,7 @@ get_stats (struct parameter_list *p, str
if (verbose >= 3)
printf("Group %s: adding %llu blocks sized %llu, (%s) used_units=%g free_units=%g total_units=%g fsu_blocksize=%llu mult=%llu\n",
p_list->group, tmpfsp.fsu_bavail, tmpfsp.fsu_blocksize, p_list->best_match->me_mountdir, p_list->dused_units, p_list->dfree_units,
- p_list->dtotal_units, mult);
+ p_list->dtotal_units, tmpfsp.fsu_blocksize, mult);
/* prevent counting the first FS of a group twice since its parameter_list entry
* is used to carry the information of all file systems of the entire group */

View File

@ -1,3 +1,157 @@
-------------------------------------------------------------------
Thu Feb 2 17:11:00 UTC 2023 - Lars Vogdt <lars@linux-schulserver.de> -2.3.3
- Update to 2.3.3
Enhancements
General
+ using PRId64 and PRIu64 instead of %ld directly
Single Plugins
+ check_http: Make faster with larger files
+ check_snmp: add 'multiplier' to modify current value
+ check_http: Implement chunked encoding decoding
+ check_http/check_curl: add chunked encoding test
+ check_log: Added --exclude to exclude patterns
+ check_log: Add tests
+ check_disk: Clarify usage possibilites
Fixes
General
+ fixed two PRId64 to PRIu64 in perfdata_uint64
Single Plugins
+ check_pgsql: Removing is_pg_dbname alltogether,using postgres API.
+ check_http: Remove superflous CRLF in HTTP-Requests
+ check_curl: detect ipv6
+ check_icmp: fix parsing help/version long options
+ check_http: fix test plan
+ check_disk: Find accessible mount path if multiple are available
+ check_apt: Fix unknown escape sequence error output
+ check_curl: fix checking large bodys
+ check_snmp: Improve tests for check_snmp & multiply option
+ check_snmp: always apply format when applying multiplier
+ check_http: Use real booleans instead of ints
+ check_http: Document process_arguments a little bit better
+ check_http: Remove dead code
+ check_http: Fix several bug in the implementation of unchunking
+ check_http: Reformat a part to increase readability
+ check_apt: Put upgrade options in the root sections
+ check_apt: Fix comment
+ check_apt: Use real booleans
+ check_mailq: Fixing nullmailer regex
+ check_snmp: Fix regex matches
+ check_log: Fixed a bug when using --all
+ check_log: Cleaned up duplicated code in the args
+ check_http: Fix memory reallocation error in chunk decoding logic
+ check_http: Add space for ending NULL byte in array for chunked encoding
- included changes in 2.3.2
General
+ Use silent automake by default
Fixes
Single Plugins
+ check_by_ssh: added option to exit with an warning, if there is output on STDERR
+ check_by_ssh: Add "-U" flag (#1123).
+ check_by_ssh: Let ssh decide if a host is valid, enables usage of ssh .config file
+ check_curl: Add an option to check_curl to verify the peer certificate & host using the system CA's
+ check_curl: fixed -ffollow for HTTP/2.0 (Fixes #1685): added major_version parsing to PicoHTTPParser
+ check_curl: fixes check_curl: "CRITICAL - Cannot retrieve certificate subject."
+ check_curl: fix if http header contains leading spaces
+ check_curl: Update check_curl.c to display a specific human-readable error message where possible
+ check_curl: verify certificates option should not force SSL to be used
+ check_disk: Description for -M was the wrong way around
+ check_disk: Fixing the stuff that is broken on btrfs
+ check_disk: Fix perfdata for big values for check disk
+ check_disk_smb: Add configfile feature
+ check_disk_smb: Add timeout
+ check_dns: Add --expect-nxdomain
+ check_dns: split multiple IP addresses passed in one -a argument
+ check_file_age: Make size parameter a little bit more intelligible
+ check_fping: Implements 'host-alive' mode (Closes. #1027)
+ check_game: Update Url to qstat
+ check_http: changed 'STATE_CRITICAL' to 'STATE_WARNING' for infinite loop
+ check_http: Increase regexp limit by @hydrapolic
+ check_http: Support http redirect by @waja
+ check_icmp: buffer offerflow
+ check_icmp: delay set_source_ip() until address_family is detected
+ check_icmp: Fix "Invalid Argument" from sendmsg() under FreeBSD 13.1 and "setsockopt failed" for TTL setting
+ check_icmp: Fix pkt perfdata in check_host mode
+ check_ldap: Allows check_ldap to read password from environment variable
+ check_load: add LOAD prefix to load plugin
+ check_load: Display total and scaled load values if check_load scales the values by number of CPUs
+ check_log: Missing oldlog now aborts check_log
+ check_mailq: Add mailq -C option for config dir or config file
+ check_mailq: Check mailq domain specific warnings
+ check_mailq: Fix regexp for nullmailer "mailq" output
+ check_mysql: fix segfaults with mysql-connector-c #1562
+ check_pgsql: add --queryname parameter to check_pgsql
+ check_ping: Do not show RTA if no connection was possible
+ check_ping: understang ping6 output from iputils package
+ check_proc: Fix check proc ps detection
+ check_procs: exchange needle and haystack in strstr() for proper state match
+ check_smtp: add -L flag to support LMTP (LHLO instead of HELO/EHLO).
+ check_snmp: Added option for null zero length string exit codes
+ check_snmp: fix performance thresholds when using multiple oids
+ check_snmp fix segfaults
+ check_snmp: put the "c" (to mark a counter) after the perfdata value
+ check_swap: fix parsing swap values
+ check_swap: Fix perfdata for check swap
+ check_swap: Fix unit for total in perfdata
+ check_swap: Handle cached swap
+ check_swap: Small fix to threshold validation and style (indentation) fixes
+ check_ups: Fix possible overflow in check_ups
+ check_uptime: Add option to report uptime in days instead of seconds
+ check_uptime: Fix/improve output message "Uptime is ..."
Multiple Plugins
+ check_http, check_curl: added --max-redirs=N option (feature #1684)
+ check_http, check_curl: Enhancement --continue-after-certificate (backport from nagios-plugins)
+ check_http, check_curl: Remove check_http and check_curl test which are somehow always failing
+ check_log, check_oracle, check_sensors: Several fixes shellcheck complaining about
+ sslutils: use chain from client certificates
Non functional changes
+ Trivial source code whitespace formatting fixes to standard.
+ docs: fix simple typo, conspicuosly -> conspicuously
+ Migrate to GitHub actions
+ Point to Icinga Exchange instead of dead Monitoring Exchange
+ github actions: fix check_users test case
+ Add CodeQL checks
+ Fix some QL problems
+ Update CodeQL and update runner before installing
+ check_disk: Check disk compiler warnings
+ check_disk: Trivial printf fix and a little bit of code style
+ check_http: Docs: make -C obvious
+ check_ifoperstatus: Re-attach a comment to where it actually belongs
+ check_ircd: Restrict the nickname length of the test user for check_ircd
+ check_load: Check load compiler warnings
+ check_log Modernize check log
+ check_mailq: remove duplicate W=i/C=i args in check_mailq.pl
+ check_ntp: Check ntp remove unused variables
+ check_pgsql: Using snprintf which honors the buffers size and guarantees null temination. (Closes: #1601)
+ check_procs: Fix double percentage sign in usage
+ check_sensors.sh: Make shellcheck happier
+ check_snmp: Fixed option description authpassword -> authpasswd + whitespaces
+ check_swap: Check swap compiler warnings
- refreshed monitoring-plugins-1.4.6-Makefile_-_no_chown.patch
-> monitoring-plugins-2.3.3-root-plugins-Makefile_-_no_chown.patch
- refreshed monitoring-plugins-2.3.1-check_ssh.patch
-> monitoring-plugins-2.3.3-check_ssh.patch
- refreshed monitoring-plugins-2.3.1-check_dhcp_-_detect_rogue_dhcp_servers.patch
-> monitoring-plugins-2.3.3-check_dhcp_-_detect_rogue_dhcp_servers.patch
- refreshed monitoring-plugins-2.3.1-check_ssh.t_-_improve_testing.patch
-> monitoring-plugins-2.3.3-check_ssh.t_-_improve_testing.patch
- refreshed monitoring-plugins-2.3.1-check_disk_on_btrfs.patch
-> monitoring-plugins-2.3.3-check_disk_on_btrfs.patch
- refreshed monitoring-plugins-2.3.1-check_by_ssh.patch
-> monitoring-plugins-2.3.3-check_by_ssh.patch
- removed monitoring-plugins-too_few_arguments_for_check_disk.patch
-> fixed upstream
- removed monitoring-plugins.check_hpjd.c-64bit-portability-issue.patch
-> fixed upstream
- removed monitoring-plugins-2.3.1-check_snmp_segfaults.patch
-> fixed upstream
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Oct 6 12:28:59 CEST 2022 - ro@suse.de Thu Oct 6 12:28:59 CEST 2022 - ro@suse.de

View File

@ -1,13 +0,0 @@
Index: monitoring-plugins-2.3.1/plugins/check_hpjd.c
===================================================================
--- monitoring-plugins-2.3.1.orig/plugins/check_hpjd.c
+++ monitoring-plugins-2.3.1/plugins/check_hpjd.c
@@ -66,7 +66,7 @@ void print_usage (void);
char *community = NULL;
char *address = NULL;
-char *port = NULL;
+int port = NULL;
int check_paper_out = 1;
int

View File

@ -17,7 +17,7 @@
Name: monitoring-plugins Name: monitoring-plugins
Version: 2.3.1 Version: 2.3.3
Release: 0 Release: 0
Summary: The Monitoring Plug-Ins Summary: The Monitoring Plug-Ins
License: GPL-2.0-or-later AND GPL-3.0-only License: GPL-2.0-or-later AND GPL-3.0-only
@ -62,33 +62,25 @@ Source58: nrpe-check_zombie_procs
Source59: nrpe-check_mysql Source59: nrpe-check_mysql
Source60: nrpe-check_ups Source60: nrpe-check_ups
# PATCH-FIX-UPSTREAM Quote the options comming in from users (path names might contain whitespaces) # PATCH-FIX-UPSTREAM Quote the options comming in from users (path names might contain whitespaces)
Patch1: %{name}-2.1.1-check_log_-_quoting.patch Patch1: %{name}-2.3.3-check_log_-_quoting.patch
# PATH-FIX-openSUSE - do not use/run chown in Makefile: we use RPM for this # PATH-FIX-openSUSE - do not use/run chown in Makefile: we use RPM for this
Patch6: %{name}-1.4.6-Makefile_-_no_chown.patch Patch6: %{name}-2.3.3-root-plugins-Makefile_-_no_chown.patch
# PATCH-FIX-UPSTREAM Use correct pointer # PATCH-FIX-UPSTREAM Use correct pointer
Patch11: %{name}.check_snmp.arrayaddress.patch Patch11: %{name}-2.3.3-check_snmp.arrayaddress.patch
# PATCH-FIX-UPSTREAM print out all arguments out a Group if in verbose mode
Patch15: %{name}-too_few_arguments_for_check_disk.patch
# PATCH-FIX-UPSTREAM port should be integer, not character
Patch118: %{name}.check_hpjd.c-64bit-portability-issue.patch
# PATCH-FIX-UPSTREAM kstreitova@suse.com -- fix build with MariaDB 10.2 # PATCH-FIX-UPSTREAM kstreitova@suse.com -- fix build with MariaDB 10.2
Patch119: monitoring-plugins-2.2-mariadb_102_build_fix.patch Patch119: %{name}-2.3.3-mariadb_102_build_fix.patch
# PATCH-FIX-UPSTREAM see https://bugzilla.redhat.com/512559 # PATCH-FIX-UPSTREAM see https://bugzilla.redhat.com/512559
Patch121: %{name}-wrong_return_in_check_swap.patch Patch121: %{name}-2.3.3-wrong_percent_in_check_swap.patch
# PATCH-FIX-UPSTREAM - return ntp offset absolute (as positive value) in performance data since warn and crit are also positive values # PATCH-FIX-UPSTREAM - return ntp offset absolute (as positive value) in performance data since warn and crit are also positive values
Patch122: monitoring-plugins-2.3-check_ntp_perf_absolute.patch Patch122: %{name}-2.3.3-check_ntp_perf_absolute.patch
# PATCH-FIX-UPSTREAM - see https://github.com/monitoring-plugins/monitoring-plugins/pull/1589
Patch123: monitoring-plugins-2.3.1-check_snmp_segfaults.patch
# PATCH-FIX-UPSTREAM - see https://github.com/monitoring-plugins/monitoring-plugins/pull/1459
Patch124: monitoring-plugins-2.3.1-fixing-shellcheck.patch
# PATCH-FIX-UPSTREAM - see https://github.com/monitoring-plugins/monitoring-plugins/pull/1322 # PATCH-FIX-UPSTREAM - see https://github.com/monitoring-plugins/monitoring-plugins/pull/1322
Patch125: monitoring-plugins-2.3.1-check_ssh.patch Patch125: monitoring-plugins-2.3.3-check_ssh.patch
Patch126: monitoring-plugins-2.3.1-check_ssh.t_-_improve_testing.patch Patch126: monitoring-plugins-2.3.3-check_ssh.t_-_improve_testing.patch
# PATCH-FIX-UPSTREAM - see https://github.com/monitoring-plugins/monitoring-plugins/issues/1375 # 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 Patch127: monitoring-plugins-2.3.3-check_dhcp_-_detect_rogue_dhcp_servers.patch
Patch128: monitoring-plugins-2.3.1-check_disk_on_btrfs.patch Patch128: monitoring-plugins-2.3.3-check_disk_on_btrfs.patch
# PATCH-FIX-UPSTREAM - see https://github.com/monitoring-plugins/monitoring-plugins/pull/1774 # PATCH-FIX-UPSTREAM - see https://github.com/monitoring-plugins/monitoring-plugins/pull/1774
Patch129: monitoring-plugins-2.3.1-check_by_ssh.patch Patch129: monitoring-plugins-2.3.3-check_by_ssh.patch
BuildRequires: bind-utils BuildRequires: bind-utils
BuildRequires: dhcp-devel BuildRequires: dhcp-devel
BuildRequires: fping BuildRequires: fping
@ -112,7 +104,7 @@ BuildRequires: openssl-devel
BuildRequires: net-snmp-perl BuildRequires: net-snmp-perl
BuildRequires: net-snmp-utils BuildRequires: net-snmp-utils
%else %else
BuildRequires: perl-Net-SNMP BuildRequires: perl(Net::SNMP)
%endif %endif
BuildRequires: postfix BuildRequires: postfix
BuildRequires: postgresql-devel BuildRequires: postgresql-devel
@ -631,7 +623,7 @@ Requires: %{name}-common = %{version}
Requires: net-snmp-perl Requires: net-snmp-perl
Requires: net-snmp-utils Requires: net-snmp-utils
%else %else
Requires: perl-Net-SNMP Requires: perl(Net::SNMP)
%endif %endif
Provides: nagios-plugins-ifoperstatus = %{version} Provides: nagios-plugins-ifoperstatus = %{version}
Obsoletes: nagios-plugins-ifoperstatus <= 1.5 Obsoletes: nagios-plugins-ifoperstatus <= 1.5
@ -648,7 +640,7 @@ Requires: %{name}-common = %{version}
Requires: net-snmp-perl Requires: net-snmp-perl
Requires: net-snmp-utils Requires: net-snmp-utils
%else %else
Requires: perl-Net-SNMP Requires: perl(Net::SNMP)
%endif %endif
Provides: nagios-plugins-ifstatus = %{version} Provides: nagios-plugins-ifstatus = %{version}
Obsoletes: nagios-plugins-ifstatus <= 1.5 Obsoletes: nagios-plugins-ifstatus <= 1.5
@ -1130,15 +1122,11 @@ done
%patch1 -p1 %patch1 -p1
%patch6 -p1 %patch6 -p1
%patch11 -p1 %patch11 -p1
%patch15 -p1
# Debian patches # Debian patches
%patch118 -p1
%patch119 -p1 %patch119 -p1
%patch121 -p1 %patch121 -p1
%patch122 -p1 %patch122 -p1
# Github patches # Github patches
%patch123 -p1
%patch124 -p1
%patch125 -p1 %patch125 -p1
%patch126 -p1 %patch126 -p1
%patch127 -p1 %patch127 -p1