diff options
author | Mathieu Arnold <mat@FreeBSD.org> | 2019-12-09 14:10:40 +0000 |
---|---|---|
committer | Mathieu Arnold <mat@FreeBSD.org> | 2019-12-09 14:10:40 +0000 |
commit | b89f8760afb6ecf064f8a64bdeaa4be1f6c722ee (patch) | |
tree | 4e13ba144b44c2a2f8be280eebbc4fc8fa509cad /net-mgmt/nagios-plugins | |
parent | e27d8ba87e22705a9a036046e9214b763485be15 (diff) | |
download | ports-b89f8760afb6ecf064f8a64bdeaa4be1f6c722ee.tar.gz ports-b89f8760afb6ecf064f8a64bdeaa4be1f6c722ee.zip |
Update to 2.3.0.
Notes
Notes:
svn path=/head/; revision=519615
Diffstat (limited to 'net-mgmt/nagios-plugins')
13 files changed, 27 insertions, 276 deletions
diff --git a/net-mgmt/nagios-plugins/Makefile b/net-mgmt/nagios-plugins/Makefile index c49b2451109a..993ad378411d 100644 --- a/net-mgmt/nagios-plugins/Makefile +++ b/net-mgmt/nagios-plugins/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= nagios-plugins -PORTVERSION= 2.2.1 -PORTREVISION= 8 +DISTVERSION= 2.3.0 PORTEPOCH= 1 CATEGORIES= net-mgmt MASTER_SITES= https://www.nagios-plugins.org/download/ \ @@ -39,7 +38,7 @@ SSH_PORTABLE_DESC= Build check_ssh with ports openssh (instead of base) DNS_DESC= Configuration of check_dig and check_dns (see help) -DNS_BASE_DESC= >= 10 means drill for check_dig and no check_dns +DNS_BASE_DESC= Use drill for check_dig, check_dns not available DNS_BINDTOOLS_DESC= Use dig and nslookup from dns/bind-tools EXTRAOPTS_CONFIGURE_ENABLE= extra-opts diff --git a/net-mgmt/nagios-plugins/distinfo b/net-mgmt/nagios-plugins/distinfo index b0bac70f7569..4b8d5e3ebe81 100644 --- a/net-mgmt/nagios-plugins/distinfo +++ b/net-mgmt/nagios-plugins/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1493720605 -SHA256 (nagios-plugins-2.2.1.tar.gz) = 647c0ba4583d891c965fc29b77c4ccfeccc21f409fdf259cb8af52cb39c21e18 -SIZE (nagios-plugins-2.2.1.tar.gz) = 2728818 +TIMESTAMP = 1575890689 +SHA256 (nagios-plugins-2.3.0.tar.gz) = 18dff0152120e904b16b4b5562867c18ba6e17d66046656d33730427790bcfff +SIZE (nagios-plugins-2.3.0.tar.gz) = 2833054 diff --git a/net-mgmt/nagios-plugins/files/patch-configure b/net-mgmt/nagios-plugins/files/patch-configure index 602247d66039..05d6a58e85f3 100644 --- a/net-mgmt/nagios-plugins/files/patch-configure +++ b/net-mgmt/nagios-plugins/files/patch-configure @@ -1,6 +1,6 @@ ---- configure.orig 2017-04-19 16:03:27 UTC +--- configure.orig 2019-12-04 21:53:36 UTC +++ configure -@@ -21973,6 +21973,15 @@ $as_echo "$as_me: error: I don't know ho +@@ -22045,6 +22045,15 @@ $as_echo "$as_me: error: I don't know how to build a 6 fi @@ -16,12 +16,3 @@ elif ps axwwo 'stat comm vsz rss user uid pid ppid args cgroup:256' 2>/dev/null | \ egrep -i "^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND +CGROUP" > /dev/null then -@@ -23798,7 +23807,7 @@ then - - if $PATH_TO_SWAPINFO -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null - then -- ac_cv_swap_format="%*s %f %*d %f" -+ ac_cv_swap_format="%*s %lf %*d %lf" - ac_cv_swap_conv=1024 - { $as_echo "$as_me:$LINENO: result: using FreeBSD format swapinfo" >&5 - $as_echo "using FreeBSD format swapinfo" >&6; } diff --git a/net-mgmt/nagios-plugins/files/patch-plugins-check_ntp_time.c b/net-mgmt/nagios-plugins/files/patch-plugins-check_ntp_time.c deleted file mode 100644 index daa43daf30be..000000000000 --- a/net-mgmt/nagios-plugins/files/patch-plugins-check_ntp_time.c +++ /dev/null @@ -1,15 +0,0 @@ -Obtained from: -https://github.com/nagios-plugins/nagios-plugins/commit/df485c74f582708d6ce37cdf99880fe75215498a - ---- plugins/check_ntp_time.c.orig 2018-01-04 12:59:01.422087000 -0800 -+++ plugins/check_ntp_time.c 2018-01-04 13:05:56.317152000 -0800 -@@ -415,6 +415,9 @@ - } - } - /* lather, rinse, repeat. */ -+ /* break if we have one response but other ntp servers doesn't response */ -+ /* greater than timeout_interval/2 */ -+ if (servers_completed && now_time-start_ts > timeout_interval/2) break; - } - - if (one_read == 0) { diff --git a/net-mgmt/nagios-plugins/files/patch-plugins-scripts_check__mailq.pl b/net-mgmt/nagios-plugins/files/patch-plugins-scripts_check__mailq.pl deleted file mode 100644 index 06e51e89c987..000000000000 --- a/net-mgmt/nagios-plugins/files/patch-plugins-scripts_check__mailq.pl +++ /dev/null @@ -1,57 +0,0 @@ -commit d56818f5121b05439c7b7a1655d96ab39e066797 -Author: Filias Heidt <fh@netzkommune.de> -Date: 2017-04-24 11:00:43 +0200 - - add support for opensmtpd - ---- plugins-scripts/check_mailq.pl.orig 2017-04-19 16:03:12 UTC -+++ plugins-scripts/check_mailq.pl -@@ -558,6 +558,39 @@ elsif ( $mailq eq "nullmailer" ) { - } - } # end of ($mailq eq "nullmailer") - -+elsif ( $mailq eq "opensmtp" ) { -+ ## open mailq -+ if ( defined $utils::PATH_TO_MAILQ && -x $utils::PATH_TO_MAILQ ) { -+ if (! open (MAILQ, "$sudo $utils::PATH_TO_MAILQ | " ) ) { -+ print "ERROR: could not open $utils::PATH_TO_MAILQ \n"; -+ exit $ERRORS{'UNKNOWN'}; -+ } -+ }elsif( defined $utils::PATH_TO_MAILQ){ -+ unless (-x $utils::PATH_TO_MAILQ) { -+ print "ERROR: $utils::PATH_TO_MAILQ is not executable by (uid $>:gid($)))\n"; -+ exit $ERRORS{'UNKNOWN'}; -+ } -+ } else { -+ print "ERROR: \$utils::PATH_TO_MAILQ is not defined\n"; -+ exit $ERRORS{'UNKNOWN'}; -+ } -+ -+ $msg_q++ while (<MAILQ>); -+ -+ close(MAILQ) ; -+ if ($msg_q < $opt_w) { -+ $msg = "OK: $mailq mailq ($msg_q) is below threshold ($opt_w/$opt_c)"; -+ $state = $ERRORS{'OK'}; -+ }elsif ($msg_q >= $opt_w && $msg_q < $opt_c) { -+ $msg = "WARNING: $mailq mailq is $msg_q (threshold w = $opt_w)"; -+ $state = $ERRORS{'WARNING'}; -+ }else { -+ $msg = "CRITICAL: $mailq mailq is $msg_q (threshold c = $opt_c)"; -+ $state = $ERRORS{'CRITICAL'}; -+ } -+} # end of ($mailq eq "opensmtp") -+ -+ - # Perfdata support - print "$msg|unsent=$msg_q;$opt_w;$opt_c;0\n"; - exit $state; -@@ -618,7 +651,7 @@ sub process_arguments(){ - } - - if (defined $opt_M) { -- if ($opt_M =~ /^(sendmail|qmail|postfix|exim|nullmailer)$/) { -+ if ($opt_M =~ /^(sendmail|qmail|postfix|exim|nullmailer|opensmtp)$/) { - $mailq = $opt_M ; - }elsif( $opt_M eq ''){ - $mailq = 'sendmail'; diff --git a/net-mgmt/nagios-plugins/files/patch-plugins-scripts_check__ntp.pl b/net-mgmt/nagios-plugins/files/patch-plugins-scripts_check__ntp.pl index f1e43e6e5009..03a1d5c2d321 100644 --- a/net-mgmt/nagios-plugins/files/patch-plugins-scripts_check__ntp.pl +++ b/net-mgmt/nagios-plugins/files/patch-plugins-scripts_check__ntp.pl @@ -1,4 +1,4 @@ ---- plugins-scripts/check_ntp.pl.orig 2016-08-01 16:27:46 UTC +--- plugins-scripts/check_ntp.pl.orig 2019-12-04 21:53:08 UTC +++ plugins-scripts/check_ntp.pl @@ -314,7 +314,6 @@ if ($have_ntpq) { } @@ -8,12 +8,12 @@ } } -@@ -428,7 +427,7 @@ if ($ntpdate_error != $ERRORS{'OK'}) { - foreach my $key (keys %ERRORS) { +@@ -429,7 +428,7 @@ foreach my $key (keys %ERRORS) { if ($state==$ERRORS{$key}) { - # print ("NTP $key: $answer"); -- print ("NTP $key: $answer|offset=$offset, jitter=" . $jitter/1000 . ",peer_stratum=$stratum\n"); -+ print ("NTP $key: $answer|offset=$offset, jitter=" . ($jitter || 0)/1000 . ",peer_stratum=$stratum\n"); + print ("NTP $key: $answer|offset=$offset"); + if ($have_ntpq) { +- print (", jitter=" . $jitter/1000 . ",peer_stratum=$stratum"); ++ print (", jitter=" . ($jitter || 0)/1000 . ",peer_stratum=$stratum"); + } + print ("\n"); last; - } - } diff --git a/net-mgmt/nagios-plugins/files/patch-plugins_check__http.c b/net-mgmt/nagios-plugins/files/patch-plugins_check__http.c deleted file mode 100644 index cff5d3ee45ee..000000000000 --- a/net-mgmt/nagios-plugins/files/patch-plugins_check__http.c +++ /dev/null @@ -1,17 +0,0 @@ ---- plugins/check_http.c.orig 2017-04-19 16:03:12 UTC -+++ plugins/check_http.c -@@ -1026,11 +1026,9 @@ check_http (void) - elapsed_time_ssl = (double)microsec_ssl / 1.0e6; - if (check_cert == TRUE) { - result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit); -- if (result != STATE_OK) { -- np_net_ssl_cleanup(); -- if (sd) close(sd); -- return result; -- } -+ np_net_ssl_cleanup(); -+ if (sd) close(sd); -+ return result; - } - } - #endif /* HAVE_SSL */ diff --git a/net-mgmt/nagios-plugins/files/patch-plugins_check__load.c b/net-mgmt/nagios-plugins/files/patch-plugins_check__load.c new file mode 100644 index 000000000000..22fe2c3f9d67 --- /dev/null +++ b/net-mgmt/nagios-plugins/files/patch-plugins_check__load.c @@ -0,0 +1,10 @@ +--- plugins/check_load.c.orig 2019-12-09 11:57:36 UTC ++++ plugins/check_load.c +@@ -351,6 +351,7 @@ int cmpstringp(const void *p1, const void *p2) { + pid_t kthread_ppid = 0; + int procvsz = 0; + int procrss = 0; ++ int procjid = 0; + float procpcpu = 0; + char procstat[8]; + #ifdef PS_USES_PROCETIME diff --git a/net-mgmt/nagios-plugins/files/patch-plugins_check__nagios.c b/net-mgmt/nagios-plugins/files/patch-plugins_check__nagios.c deleted file mode 100644 index d96c844083be..000000000000 --- a/net-mgmt/nagios-plugins/files/patch-plugins_check__nagios.c +++ /dev/null @@ -1,10 +0,0 @@ ---- plugins/check_nagios.c.orig 2017-01-19 16:01:31 UTC -+++ plugins/check_nagios.c -@@ -64,6 +64,7 @@ main (int argc, char **argv) - int procuid = 0; - int procpid = 0; - int procppid = 0; -+ int procjid = 0; - int procvsz = 0; - int procrss = 0; - char proc_cgroup_hierarchy[MAX_INPUT_BUFFER]; diff --git a/net-mgmt/nagios-plugins/files/patch-plugins_check__procs.c b/net-mgmt/nagios-plugins/files/patch-plugins_check__procs.c deleted file mode 100644 index 11ea7d2df207..000000000000 --- a/net-mgmt/nagios-plugins/files/patch-plugins_check__procs.c +++ /dev/null @@ -1,107 +0,0 @@ ---- plugins/check_procs.c.orig 2017-01-16 17:24:03 UTC -+++ plugins/check_procs.c -@@ -71,6 +71,7 @@ int options = 0; /* bitmask of filter cr - #define ELAPSED 512 - #define EREG_ARGS 1024 - #define CGROUP_HIERARCHY 2048 -+#define JID 4096 - - #define KTHREAD_PARENT "kthreadd" /* the parent process of kernel threads: - ppid of procs are compared to pid of this proc*/ -@@ -103,6 +104,7 @@ char *fails; - char tmp[MAX_INPUT_BUFFER]; - int kthread_filter = 0; - int usepid = 0; /* whether to test for pid or /proc/pid/exe */ -+int jid; - - FILE *ps_input = NULL; - -@@ -133,6 +135,7 @@ main (int argc, char **argv) - int procuid = 0; - pid_t procpid = 0; - pid_t procppid = 0; -+ int procjid = 0; - pid_t kthread_ppid = 0; - int procvsz = 0; - int procrss = 0; -@@ -236,9 +239,9 @@ main (int argc, char **argv) - procseconds = convert_to_seconds(procetime); - - if (verbose >= 3) { -- printf ("proc#=%d uid=%d vsz=%d rss=%d pid=%d ppid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s", -++ printf ("proc#=%d uid=%d vsz=%d rss=%d pid=%d ppid=%d jid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s\n", - procs, procuid, procvsz, procrss, -- procpid, procppid, procpcpu, procstat, -+ procpid, procppid, procjid, procpcpu, procstat, - procetime, procprog, procargs); - if (strstr(PS_COMMAND, "cgroup") != NULL) { - printf(" proc_cgroup_hierarchy=%s\n", proc_cgroup_hierarchy); -@@ -287,6 +290,8 @@ main (int argc, char **argv) - resultsum |= PROG; - if ((options & PPID) && (procppid == ppid)) - resultsum |= PPID; -+ if ((options & JID) && (procjid == jid)) -+ resultsum |= JID; - if ((options & USER) && (procuid == uid)) - resultsum |= USER; - if ((options & VSZ) && (procvsz >= vsz)) -@@ -315,9 +320,9 @@ main (int argc, char **argv) - - procs++; - if (verbose >= 2) { -- printf ("Matched: uid=%d vsz=%d rss=%d pid=%d ppid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s", -++ printf ("Matched: uid=%d vsz=%d rss=%d pid=%d ppid=%d jid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s\n", - procuid, procvsz, procrss, -- procpid, procppid, procpcpu, procstat, -+ procpid, procppid, procjid, procpcpu, procstat, - procetime, procprog, procargs); - if (strstr(PS_COMMAND, "cgroup") != NULL) { - printf(" cgroup_hierarchy=%s\n", cgroup_hierarchy); -@@ -438,6 +443,7 @@ process_arguments (int argc, char **argv - {"no-kthreads", required_argument, 0, 'k'}, - {"traditional-filter", no_argument, 0, 'T'}, - {"cgroup-hierarchy", required_argument, 0, 'g'}, -+ {"jid", required_argument, 0, 'j'}, - {0, 0, 0, 0} - }; - -@@ -446,7 +452,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:Tg:", -+ c = getopt_long (argc, argv, "Vvhkt:c:w:p:s:u:C:a:z:r:m:P:Tg:j:", - longopts, &option); - - if (c == -1 || c == EOF) -@@ -477,6 +483,12 @@ process_arguments (int argc, char **argv - break; - } - usage4 (_("Parent Process ID must be an integer!")); -+ case 'j': /* jail id */ -+ if (sscanf (optarg, "%d%[^0-9]", &jid, tmp) == 1) { -+ asprintf (&fmt, "%s%sJID = %d", (fmt ? fmt : "") , (options ? ", " : ""), jid); -+ options |= JID; -+ break; -+ } - case 's': /* status */ - if (statopts) - break; -@@ -766,6 +778,8 @@ print_help (void) - printf (" %s\n", _("RSZDT, plus others based on the output of your 'ps' command).")); - printf (" %s\n", "-p, --ppid=PPID"); - printf (" %s\n", _("Only scan for children of the parent process ID indicated.")); -+ printf (" %s\n", "-j, --jid=JID"); -+ printf (" %s\n", _("Only scan for process running in jail which ID is JID.")); - printf (" %s\n", "-z, --vsz=VSZ"); - printf (" %s\n", _("Only scan for processes with VSZ higher than indicated.")); - printf (" %s\n", "-r, --rss=RSS"); -@@ -818,7 +832,7 @@ void - print_usage (void) - { - printf ("%s\n", _("Usage:")); -- printf ("%s -w <range> -c <range> [-m metric] [-s state] [-p ppid]\n", progname); -+ printf ("%s -w <range> -c <range> [-m metric] [-s state] [-p ppid] [-j jid]\n", progname); - printf (" [-u user] [-r rss] [-z vsz] [-P %%cpu] [-a argument-array]\n"); - printf (" [-C command] [-k] [-t timeout] [-v]\n"); - } diff --git a/net-mgmt/nagios-plugins/files/patch-plugins_common.h b/net-mgmt/nagios-plugins/files/patch-plugins_common.h deleted file mode 100644 index 2a9091fd8e98..000000000000 --- a/net-mgmt/nagios-plugins/files/patch-plugins_common.h +++ /dev/null @@ -1,24 +0,0 @@ -From 930ede8378245eb6bd31eaf1d9103f027df0f7a0 Mon Sep 17 00:00:00 2001 -From: Bernard Spil <brnrd@FreeBSD.org> -Date: Sun, 5 Nov 2017 10:43:56 +0100 -Subject: [PATCH] plugins/common.h: Set default MySQL port - -As of MariaDB 10.2 the headers for client no longer set the -default MySQL port. Patch fixes this for any version of MariaDB -or MySQL into the future. - -See also: https://bugs.freebsd.org/223387 ---- plugins/common.h.orig 2017-01-19 16:01:31 UTC -+++ plugins/common.h -@@ -168,6 +168,11 @@ - # endif - #endif - -+/* MariaDB 10.2 client does not set MYSQL_PORT */ -+#ifndef MYSQL_PORT -+# define MYSQL_PORT 3306 -+#endif -+ - /* - * - * Standard Values diff --git a/net-mgmt/nagios-plugins/files/patch-plugins_sslutils.c b/net-mgmt/nagios-plugins/files/patch-plugins_sslutils.c deleted file mode 100644 index 57cbd74156e3..000000000000 --- a/net-mgmt/nagios-plugins/files/patch-plugins_sslutils.c +++ /dev/null @@ -1,21 +0,0 @@ ---- plugins/sslutils.c.orig 2017-04-19 16:03:12 UTC -+++ plugins/sslutils.c -@@ -211,9 +211,6 @@ int np_net_ssl_check_cert(int days_till_ - int time_remaining; - time_t tm_t; - -- // Prefix whatever we're about to print with SSL -- printf("SSL "); -- - certificate=SSL_get_peer_certificate(s); - if (!certificate) { - printf("%s\n",_("CRITICAL - Cannot retrieve server certificate.")); -@@ -304,7 +301,7 @@ int np_net_ssl_check_cert(int days_till_ - else - status = STATE_CRITICAL; - } else { -- printf(_("OK - Certificate '%s' will expire on %s. "), cn, timestamp); -+ printf(_("OK - Certificate '%s' will expire on %s.\n"), cn, timestamp); - status = STATE_OK; - } - X509_free(certificate); diff --git a/net-mgmt/nagios-plugins/pkg-plist b/net-mgmt/nagios-plugins/pkg-plist index bc95a8dda01e..c9831a8b9a66 100644 --- a/net-mgmt/nagios-plugins/pkg-plist +++ b/net-mgmt/nagios-plugins/pkg-plist @@ -55,6 +55,7 @@ libexec/nagios/check_smtp %%NETSNMP%%libexec/nagios/check_snmp libexec/nagios/check_spop libexec/nagios/check_ssh +libexec/nagios/check_ssl_validity libexec/nagios/check_ssmtp libexec/nagios/check_swap libexec/nagios/check_tcp @@ -64,6 +65,7 @@ libexec/nagios/check_ups libexec/nagios/check_users libexec/nagios/check_wave libexec/nagios/negate +libexec/nagios/remove_perfdata libexec/nagios/urlize libexec/nagios/utils.pm libexec/nagios/utils.sh |