FreeBSD Bugzilla – Attachment 189433 Details for
Bug 224926
[PATCH] net-mgmt/nagios-plugins: Periodically check_ntp_time return "Socket timeout" when one of several ntp server doesn't response
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
SHAR archive
nagios-plugins-2.2.1_6.shar (text/plain), 28.03 KB, created by
admins
on 2018-01-05 09:24:16 UTC
(
hide
)
Description:
SHAR archive
Filename:
MIME Type:
Creator:
admins
Created:
2018-01-05 09:24:16 UTC
Size:
28.03 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># nagios-plugins ># nagios-plugins/pkg-help ># nagios-plugins/pkg-descr ># nagios-plugins/Makefile ># nagios-plugins/distinfo ># nagios-plugins/files ># nagios-plugins/files/patch-plugins-scripts_check__ircd.pl ># nagios-plugins/files/patch-configure ># nagios-plugins/files/patch-NEWS ># nagios-plugins/files/patch-plugins_check__nagios.c ># nagios-plugins/files/patch-plugins-scripts_check__mailq.pl ># nagios-plugins/files/extra-patch-dig-to-drill.diff ># nagios-plugins/files/patch-plugins_check__ssh.c ># nagios-plugins/files/patch-plugins-scripts_check__ntp.pl ># nagios-plugins/files/patch-plugins_sslutils.c ># nagios-plugins/files/patch-plugins_check__http.c ># nagios-plugins/files/patch-plugins_check__procs.c ># nagios-plugins/files/patch-THANKS ># nagios-plugins/files/patch-plugins_common.h ># nagios-plugins/files/patch-plugins_check__pgsql.c ># nagios-plugins/files/patch-plugins-check_ntp_time.c ># nagios-plugins/pkg-plist ># >echo c - nagios-plugins >mkdir -p nagios-plugins > /dev/null 2>&1 >echo x - nagios-plugins/pkg-help >sed 's/^X//' >nagios-plugins/pkg-help << '6898cb38a55a91cd761e1e566851cb54' >X >X ** DNS ** >XStarting from FreeBSD 10.0, BIND has been replaced in base >Xby unbound. This means that there are no dig and nslookup >Xutilities for check_dig and check_dns to use. If you choose >XDNS_BASE, check_dig will be built using drill instead of >Xdig, if you use -A the dig options will generally not work, >Xcheck drill(1) for the correct ones, also, timeout and retry >Xwill be ignored, and check_dns won't be installed. If you >Xcheck any other option, the installed dig and nslookup will >Xbe used. >X >XIf you run FreeBSD < 10, you can still use the DNS_BIND* >Xoptions to have check_dig and check_dns use the newer dig >Xand nslookup utilities. >X >XIf you use REPLACE_BASE with BIND, choose the DNS_BASE option. >X >6898cb38a55a91cd761e1e566851cb54 >echo x - nagios-plugins/pkg-descr >sed 's/^X//' >nagios-plugins/pkg-descr << '8aff8840132302e1fa091b7f44a187ce' >XThis is a plugin package for Nagios. Quoting from the >Xmain Nagios package: >X >XNagios is a host and service monitor designed to inform you of network >Xproblems before your clients, end-users or managers do. It has been >Xdesigned to run under the Linux operating system, but works fine under >Xmost *NIX variants as well. The monitoring daemon runs intermittent >Xchecks on hosts and services you specify using external "plugins" >Xwhich return status information to Nagios. When problems are >Xencountered, the daemon can send notifications out to administrative >Xcontacts in a variety of different ways (email, instant message, SMS, >Xetc.). Current status information, historical logs, and reports can >Xall be accessed via a web browser. >X >XWWW: https://www.nagios-plugins.org/ >8aff8840132302e1fa091b7f44a187ce >echo x - nagios-plugins/Makefile >sed 's/^X//' >nagios-plugins/Makefile << '9c56a0f88cf6d1b2d420ae65acec4732' >X# Created by: Blaz Zupan <blaz@si.FreeBSD.org> >X# $FreeBSD: head/net-mgmt/nagios-plugins/Makefile 449835 2017-09-14 11:58:58Z mat $ >X >XPORTNAME= nagios-plugins >XPORTVERSION= 2.2.1 >XPORTREVISION= 6 >XPORTEPOCH= 1 >XCATEGORIES= net-mgmt >XMASTER_SITES= https://www.nagios-plugins.org/download/ \ >X LOCAL/mat/${PORTNAME} >X >XMAINTAINER= mat@FreeBSD.org >XCOMMENT= Plugins for Nagios >X >XLICENSE= GPLv3 >XLICENSE_FILE= ${WRKSRC}/COPYING >X >XCONFLICTS_INSTALL= monitoring-plugins-* >X >XUSES= charsetfix gmake perl5 libtool ssl >XUSE_SUBMAKE= yes >X >XOPTIONS_DEFINE= QSTAT FPING NETSNMP RADIUS MYSQL PGSQL LDAP IPV6 NLS DBI EXTRAOPTS SSH_PORTABLE >XOPTIONS_SINGLE= DNS >XOPTIONS_SINGLE_DNS= DNS_BASE DNS_BINDTOOLS DNS_BIND99 DNS_BIND910 DNS_BIND911 >XOPTIONS_DEFAULT=EXTRAOPTS DNS_BASE >XOPTIONS_SUB= yes >X >XQSTAT_DESC= Game server query support (check_game) >XFPING_DESC= Support for non-flooding fast ping (check_fping) >XNETSNMP_DESC= SNMP support (check_snmp) >XRADIUS_DESC= Radius support (check_radius) >XMYSQL_DESC= MySQL support (check_mysql) >XPGSQL_DESC= PostgreSQL support (check_pgsql) >XLDAP_DESC= OpenLDAP support (check_ldap) >XDBI_DESC= Check database using DBI >XEXTRAOPTS_DESC= Parsing of plugins ini config files for extra options >XSSH_PORTABLE_DESC= Build check_ssh with ports openssh (instead of base) >X >XDNS_DESC= Configuration of check_dig and check_dns (see help) >X >XDNS_BASE_DESC= >= 10 means drill for check_dig and no check_dns >XDNS_BINDTOOLS_DESC= Use dig and nslookup from dns/bind-tools >XDNS_BIND99_DESC= Use dig and nslookup from dns/bind99 >XDNS_BIND910_DESC= Use dig and nslookup from dns/bind910 >XDNS_BIND911_DESC= Use dig and nslookup from dns/bind911 >X >XEXTRAOPTS_CONFIGURE_ENABLE= extra-opts >X >XGNU_CONFIGURE= yes >X >XNAGIOSUSER?= nagios >XNAGIOSGROUP?= nagios >XNAGIOSDIR?= /var/spool/nagios >X >XNAGIOSWWWDIR?= www/nagios >XNAGIOSHTMURL?= /nagios >XNAGIOSCGIURL?= ${NAGIOSHTMURL}/cgi-bin >X >XCONFIGURE_ARGS+=--with-nagios-user=${NAGIOSUSER} \ >X --with-nagios-group=${NAGIOSGROUP} \ >X --with-cgiurl=${NAGIOSCGIURL} \ >X --sbindir=${PREFIX}/${NAGIOSWWWDIR}/cgi-bin \ >X --libexecdir=${PREFIX}/libexec/nagios \ >X --datadir=${PREFIX}/share \ >X --sysconfdir=${PREFIX}/etc/nagios \ >X --localstatedir=${NAGIOSDIR} \ >X --with-perl=${PERL} \ >X --prefix=${PREFIX} >X >X# Also, force some commands with their expected paths so that they don't get >X# disabled. >XCONFIGURE_ARGS+=ac_cv_path_PATH_TO_QMAIL_QSTAT=/var/qmail/bin/qmail-qstat \ >X ac_cv_path_PATH_TO_PING=/sbin/ping \ >X ac_cv_path_PATH_TO_PING6=/sbin/ping6 \ >X --with-ping-command="/sbin/ping -n -t %d -c %d %s" \ >X --with-ping6-command="/sbin/ping6 -n -X %d -c %d %s" \ >X ac_cv_path_PATH_TO_SUDO=${LOCALBASE}/bin/sudo \ >X ac_cv_path_PATH_TO_SMBCLIENT=${LOCALBASE}/bin/smbclient >X >XCPPFLAGS+= -I${LOCALBASE}/include >XLIBS+= -L${LOCALBASE}/lib >X >XQSTAT_BUILD_DEPENDS= qstat:games/qstat >XQSTAT_RUN_DEPENDS= qstat:games/qstat >XQSTAT_CONFIGURE_OFF= ac_cv_path_PATH_TO_QUAKESTAT= \ >X ac_cv_path_PATH_TO_QSTAT= >X >XIPV6_CONFIGURE_WITH= ipv6 >X >XFPING_BUILD_DEPENDS= fping:net/fping >XFPING_RUN_DEPENDS= fping:net/fping >XFPING_CONFIGURE_OFF= ac_cv_path_PATH_TO_FPING= \ >X ac_cv_path_PATH_TO_FPING6= >X >XNETSNMP_BUILD_DEPENDS= snmpcheck:net-mgmt/net-snmp \ >X p5-Net-SNMP>=0:net-mgmt/p5-Net-SNMP >XNETSNMP_RUN_DEPENDS= snmpcheck:net-mgmt/net-snmp \ >X p5-Net-SNMP>=0:net-mgmt/p5-Net-SNMP >XNETSNMP_CONFIGURE_OFF= ac_cv_path_PATH_TO_SNMPGET= \ >X ac_cv_path_PATH_TO_SNMPGETNEXT= >X >XRADIUS_LIB_DEPENDS= libradiusclient-ng.so:net/radiusclient >XRADIUS_CONFIGURE_WITH= radius >X >XMYSQL_USE= mysql=yes >XMYSQL_CONFIGURE_WITH= mysql=${LOCALBASE} >X >XPGSQL_USES= pgsql >XPGSQL_CONFIGURE_WITH= pgsql=${LOCALBASE} >X >XLDAP_USE= openldap=yes >XLDAP_CONFIGURE_WITH= ldap >X >XNLS_USES= gettext >XNLS_CONFIGURE_ENABLE= nls >X >XDBI_LIB_DEPENDS= libdbi.so:databases/libdbi >XDBI_CONFIGURE_WITH= dbi >X >XDNS_BINDTOOLS_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:dns/bind-tools >XDNS_BINDTOOLS_CONFIGURE_ON= --with-dig-command=${LOCALBASE}/bin/dig \ >X --with-nslookup-command=${LOCALBASE}/bin/nslookup >XDNS_BIND99_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:dns/bind99 >XDNS_BIND99_CONFIGURE_ON= --with-dig-command=${LOCALBASE}/bin/dig \ >X --with-nslookup-command=${LOCALBASE}/bin/nslookup >XDNS_BIND910_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:dns/bind910 >XDNS_BIND910_CONFIGURE_ON= --with-dig-command=${LOCALBASE}/bin/dig \ >X --with-nslookup-command=${LOCALBASE}/bin/nslookup >XDNS_BIND911_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:dns/bind911 >XDNS_BIND911_CONFIGURE_ON= --with-dig-command=${LOCALBASE}/bin/dig \ >X --with-nslookup-command=${LOCALBASE}/bin/nslookup >X >XSSH_PORTABLE_BUILD_DEPENDS= ${LOCALBASE}/bin/ssh:security/openssh-portable >XSSH_PORTABLE_RUN_DEPENDS:= ${SSH_PORTABLE_BUILD_DEPENDS} >XSSH_PORTABLE_CONFIGURE_ON= --with-ssh-command=${LOCALBASE}/bin/ssh >X >X.include <bsd.port.options.mk> >X >X.if ${PORT_OPTIONS:MDNS_BASE} >XEXTRA_PATCHES+= ${FILESDIR}/extra-patch-dig-to-drill.diff >XCONFIGURE_ARGS+=--with-dig-command=/usr/bin/drill \ >X ac_cv_path_PATH_TO_NSLOOKUP= >XPLIST_SUB+= CHECK_DNS="@comment " >X.else >X. if ${PORT_OPTIONS:MDNS_BASE} >XCONFIGURE_ARGS+= --with-dig-command=/usr/bin/dig \ >X --with-nslookup-command=/usr/bin/nslookup >X. endif >XPLIST_SUB+= CHECK_DNS="" >X.endif >X >X.if !exists(/usr/bin/ssh) && empty(PORT_OPTIONS:MSSH_PORTABLE) >XPLIST_SUB+= SSH="@comment " >X.else >XPLIST_SUB+= SSH="" >X.endif >X >Xpost-patch: >X.for file in check_by_ssh.c check_disk.c check_http.c check_mrtgtraf.c \ >X check_nagios.c check_ntp.c check_ntp_peer.c check_ntp_time.c \ >X check_pgsql.c check_snmp.c check_ssh.c check_swap.c check_time.c \ >X check_users.c >X @${REINPLACE_CMD} -e 's|setlocale (LC_ALL, "");|setlocale (LC_ALL, ""); setlocale(LC_NUMERIC, "C");|g' ${WRKSRC}/plugins/${file} >X.endfor >X @${REINPLACE_CMD} -e 's|chown root|${TRUE}|g' ${WRKSRC}/plugins-root/Makefile.in >X # add a fake PATH so that it gets set to a correct value during build. >X @${REINPLACE_CMD} -e "s|$$ENV{'PATH'}=''|$$ENV{'PATH'}='foo'|; \ >X s|/usr/bin/|${LOCALBASE}/bin/|g" \ >X ${WRKSRC}/plugins-scripts/*.pl >X >X.include <bsd.port.mk> >9c56a0f88cf6d1b2d420ae65acec4732 >echo x - nagios-plugins/distinfo >sed 's/^X//' >nagios-plugins/distinfo << '069897676315e1cf73a09b114d8be636' >XTIMESTAMP = 1493720605 >XSHA256 (nagios-plugins-2.2.1.tar.gz) = 647c0ba4583d891c965fc29b77c4ccfeccc21f409fdf259cb8af52cb39c21e18 >XSIZE (nagios-plugins-2.2.1.tar.gz) = 2728818 >069897676315e1cf73a09b114d8be636 >echo c - nagios-plugins/files >mkdir -p nagios-plugins/files > /dev/null 2>&1 >echo x - nagios-plugins/files/patch-plugins-scripts_check__ircd.pl >sed 's/^X//' >nagios-plugins/files/patch-plugins-scripts_check__ircd.pl << '4a9c2f2e252aa2f22c1c9ae46391b708' >X--- plugins-scripts/check_ircd.pl.orig 2016-08-01 16:27:46 UTC >X+++ plugins-scripts/check_ircd.pl >X@@ -68,6 +68,7 @@ sub bindRemote ($$); >X $ENV{'PATH'}='@TRUSTED_PATH@'; >X $ENV{'BASH_ENV'}=''; >X $ENV{'ENV'}=''; >X+$ENV{'CDPATH'} = ""; >X >X # -----------------------------------------------------------------[ Global ]-- >X >X@@ -155,7 +156,7 @@ sub bindRemote ($$) >X print "IRCD UNKNOWN: Could not start socket ($!)\n"; >X exit $ERRORS{"UNKNOWN"}; >X } >X- $sockaddr = 'S n a4 x8'; >X+ $sockaddr = 'x C n a4 x8'; >X $that = pack($sockaddr, AF_INET, $in_remoteport, $thataddr); >X if (!connect(ClientSocket, $that)) { >X print "IRCD UNKNOWN: Could not connect socket ($!)\n"; >4a9c2f2e252aa2f22c1c9ae46391b708 >echo x - nagios-plugins/files/patch-configure >sed 's/^X//' >nagios-plugins/files/patch-configure << '2cee1e044d9a1bd28da89aefec3c62c3' >X--- configure.orig 2017-04-19 16:03:27 UTC >X+++ configure >X@@ -21973,6 +21973,15 @@ $as_echo "$as_me: error: I don't know ho >X fi >X >X >X+elif ps -axwo 'stat comm vsz rss user uid pid ppid jid args' 2>/dev/null | \ >X+ egrep -i "^ *STAT +COMMAND +VSZ +RSS +USER +UID +PID +PPID +JID +COMMAND" > /dev/null >X+then >X+ ac_cv_ps_varlist="procstat,&procuid,&procpid,&procppid,&procjid,&procvsz,&procrss,&procpcpu,procprog,&pos" >X+ ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid jid vsz rss pcpu comm args'" >X+ ac_cv_ps_format="%s %d %d %d %d %d %d %f %s %n" >X+ ac_cv_ps_cols=10 >X+ { $as_echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 >X+ $as_echo "$ac_cv_ps_command" >&6; } >X elif ps axwwo 'stat comm vsz rss user uid pid ppid args cgroup:256' 2>/dev/null | \ >X egrep -i "^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND +CGROUP" > /dev/null >X then >X@@ -23798,7 +23807,7 @@ then >X >X if $PATH_TO_SWAPINFO -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null >X then >X- ac_cv_swap_format="%*s %f %*d %f" >X+ ac_cv_swap_format="%*s %lf %*d %lf" >X ac_cv_swap_conv=1024 >X { $as_echo "$as_me:$LINENO: result: using FreeBSD format swapinfo" >&5 >X $as_echo "using FreeBSD format swapinfo" >&6; } >2cee1e044d9a1bd28da89aefec3c62c3 >echo x - nagios-plugins/files/patch-NEWS >sed 's/^X//' >nagios-plugins/files/patch-NEWS << '6cc058a9d4aa8a5075219bb67839780c' >X--- NEWS.orig 2018-01-04 09:16:46.608359000 -0800 >X+++ NEWS 2018-01-04 09:17:21.365900000 -0800 >X@@ -12,6 +12,7 @@ >X fix some gcc5 warnings (Mario Trangoni) >X check_cluster.c: Update wording in comments (Troy Lea) >X check_nagios.c: could not locate a running nagios process >X+ check_ntp_time: Periodically returns "Socket timeout" when one of several ntp server doesn't respond >X check_swap.c: does not accept threshold of zero >X check_swap.c: uses inconsistent checks on negative thresholds >X check_snmp.c: --offset does not appear to do anything (Troy Lea) >6cc058a9d4aa8a5075219bb67839780c >echo x - nagios-plugins/files/patch-plugins_check__nagios.c >sed 's/^X//' >nagios-plugins/files/patch-plugins_check__nagios.c << '0383d412ff912df57c324196ee26e3dc' >X--- plugins/check_nagios.c.orig 2017-01-19 16:01:31 UTC >X+++ plugins/check_nagios.c >X@@ -64,6 +64,7 @@ main (int argc, char **argv) >X int procuid = 0; >X int procpid = 0; >X int procppid = 0; >X+ int procjid = 0; >X int procvsz = 0; >X int procrss = 0; >X char proc_cgroup_hierarchy[MAX_INPUT_BUFFER]; >0383d412ff912df57c324196ee26e3dc >echo x - nagios-plugins/files/patch-plugins-scripts_check__mailq.pl >sed 's/^X//' >nagios-plugins/files/patch-plugins-scripts_check__mailq.pl << '858e517e47e0c652270143889d6b0bcf' >Xcommit d56818f5121b05439c7b7a1655d96ab39e066797 >XAuthor: Filias Heidt <fh@netzkommune.de> >XDate: 2017-04-24 11:00:43 +0200 >X >X add support for opensmtpd >X >X--- plugins-scripts/check_mailq.pl.orig 2017-04-19 16:03:12 UTC >X+++ plugins-scripts/check_mailq.pl >X@@ -558,6 +558,39 @@ elsif ( $mailq eq "nullmailer" ) { >X } >X } # end of ($mailq eq "nullmailer") >X >X+elsif ( $mailq eq "opensmtp" ) { >X+ ## open mailq >X+ if ( defined $utils::PATH_TO_MAILQ && -x $utils::PATH_TO_MAILQ ) { >X+ if (! open (MAILQ, "$sudo $utils::PATH_TO_MAILQ | " ) ) { >X+ print "ERROR: could not open $utils::PATH_TO_MAILQ \n"; >X+ exit $ERRORS{'UNKNOWN'}; >X+ } >X+ }elsif( defined $utils::PATH_TO_MAILQ){ >X+ unless (-x $utils::PATH_TO_MAILQ) { >X+ print "ERROR: $utils::PATH_TO_MAILQ is not executable by (uid $>:gid($)))\n"; >X+ exit $ERRORS{'UNKNOWN'}; >X+ } >X+ } else { >X+ print "ERROR: \$utils::PATH_TO_MAILQ is not defined\n"; >X+ exit $ERRORS{'UNKNOWN'}; >X+ } >X+ >X+ $msg_q++ while (<MAILQ>); >X+ >X+ close(MAILQ) ; >X+ if ($msg_q < $opt_w) { >X+ $msg = "OK: $mailq mailq ($msg_q) is below threshold ($opt_w/$opt_c)"; >X+ $state = $ERRORS{'OK'}; >X+ }elsif ($msg_q >= $opt_w && $msg_q < $opt_c) { >X+ $msg = "WARNING: $mailq mailq is $msg_q (threshold w = $opt_w)"; >X+ $state = $ERRORS{'WARNING'}; >X+ }else { >X+ $msg = "CRITICAL: $mailq mailq is $msg_q (threshold c = $opt_c)"; >X+ $state = $ERRORS{'CRITICAL'}; >X+ } >X+} # end of ($mailq eq "opensmtp") >X+ >X+ >X # Perfdata support >X print "$msg|unsent=$msg_q;$opt_w;$opt_c;0\n"; >X exit $state; >X@@ -618,7 +651,7 @@ sub process_arguments(){ >X } >X >X if (defined $opt_M) { >X- if ($opt_M =~ /^(sendmail|qmail|postfix|exim|nullmailer)$/) { >X+ if ($opt_M =~ /^(sendmail|qmail|postfix|exim|nullmailer|opensmtp)$/) { >X $mailq = $opt_M ; >X }elsif( $opt_M eq ''){ >X $mailq = 'sendmail'; >858e517e47e0c652270143889d6b0bcf >echo x - nagios-plugins/files/extra-patch-dig-to-drill.diff >sed 's/^X//' >nagios-plugins/files/extra-patch-dig-to-drill.diff << '9237e6b8a85d4d4f94eac3fed12ad16a' >X--- plugins/check_dig.c.orig 2015-07-30 21:40:06 UTC >X+++ plugins/check_dig.c >X@@ -94,8 +94,8 @@ main (int argc, char **argv) >X timeout_interval_dig = ceil((double) timeout_interval / (double) number_tries); >X >X /* get the command to run */ >X- xasprintf (&command_line, "%s %s %s -p %d @%s %s %s +tries=%d +time=%d", >X- PATH_TO_DIG, dig_args, query_transport, server_port, dns_server, query_address, record_type, number_tries, timeout_interval_dig); >X+ xasprintf (&command_line, "%s %s @%s -z -p %d %s %s %s", >X+ PATH_TO_DIG, dig_args, dns_server, server_port, query_transport, query_address, record_type); >X >X alarm (timeout_interval); >X gettimeofday (&tv, NULL); >9237e6b8a85d4d4f94eac3fed12ad16a >echo x - nagios-plugins/files/patch-plugins_check__ssh.c >sed 's/^X//' >nagios-plugins/files/patch-plugins_check__ssh.c << 'b78e30f5ba22cfee6d69a3dd38a62cb3' >X--- plugins/check_ssh.c.orig 2015-07-30 21:40:06 UTC >X+++ plugins/check_ssh.c >X@@ -252,6 +252,7 @@ ssh_connect (char *haddr, int hport, cha >X printf >X (_("SSH CRITICAL - %s (protocol %s) version mismatch, expected '%s'\n"), >X ssh_server, ssh_proto, remote_version); >X+ recv (sd, output, BUFF_SZ, 0); >X close(sd); >X exit (STATE_CRITICAL); >X } >X@@ -270,6 +271,7 @@ ssh_connect (char *haddr, int hport, cha >X (_("SSH OK - %s (protocol %s) | %s\n"), >X ssh_server, ssh_proto, fperfdata("time", elapsed_time, "s", >X FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)timeout_interval)); >X+ recv (sd, output, BUFF_SZ, 0); >X close(sd); >X exit (STATE_OK); >X } >b78e30f5ba22cfee6d69a3dd38a62cb3 >echo x - nagios-plugins/files/patch-plugins-scripts_check__ntp.pl >sed 's/^X//' >nagios-plugins/files/patch-plugins-scripts_check__ntp.pl << '8fcb16452802bdd62f94a62cb0b49f9b' >X--- plugins-scripts/check_ntp.pl.orig 2016-08-01 16:27:46 UTC >X+++ plugins-scripts/check_ntp.pl >X@@ -314,7 +314,6 @@ if ($have_ntpq) { >X } >X } else { >X print "No match!\n" if $verbose; >X- $jitter = '(not parsed)'; >X } >X >X } >X@@ -428,7 +427,7 @@ if ($ntpdate_error != $ERRORS{'OK'}) { >X foreach my $key (keys %ERRORS) { >X if ($state==$ERRORS{$key}) { >X # print ("NTP $key: $answer"); >X- print ("NTP $key: $answer|offset=$offset, jitter=" . $jitter/1000 . ",peer_stratum=$stratum\n"); >X+ print ("NTP $key: $answer|offset=$offset, jitter=" . ($jitter || 0)/1000 . ",peer_stratum=$stratum\n"); >X last; >X } >X } >8fcb16452802bdd62f94a62cb0b49f9b >echo x - nagios-plugins/files/patch-plugins_sslutils.c >sed 's/^X//' >nagios-plugins/files/patch-plugins_sslutils.c << '782f29c434a3774397a454a225ed3799' >X--- plugins/sslutils.c.orig 2017-04-19 16:03:12 UTC >X+++ plugins/sslutils.c >X@@ -211,9 +211,6 @@ int np_net_ssl_check_cert(int days_till_ >X int time_remaining; >X time_t tm_t; >X >X- // Prefix whatever we're about to print with SSL >X- printf("SSL "); >X- >X certificate=SSL_get_peer_certificate(s); >X if (!certificate) { >X printf("%s\n",_("CRITICAL - Cannot retrieve server certificate.")); >X@@ -304,7 +301,7 @@ int np_net_ssl_check_cert(int days_till_ >X else >X status = STATE_CRITICAL; >X } else { >X- printf(_("OK - Certificate '%s' will expire on %s. "), cn, timestamp); >X+ printf(_("OK - Certificate '%s' will expire on %s.\n"), cn, timestamp); >X status = STATE_OK; >X } >X X509_free(certificate); >782f29c434a3774397a454a225ed3799 >echo x - nagios-plugins/files/patch-plugins_check__http.c >sed 's/^X//' >nagios-plugins/files/patch-plugins_check__http.c << '0fbb86de0c226c38ae8e93941878c060' >X--- plugins/check_http.c.orig 2017-04-19 16:03:12 UTC >X+++ plugins/check_http.c >X@@ -1026,11 +1026,9 @@ check_http (void) >X elapsed_time_ssl = (double)microsec_ssl / 1.0e6; >X if (check_cert == TRUE) { >X result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit); >X- if (result != STATE_OK) { >X- np_net_ssl_cleanup(); >X- if (sd) close(sd); >X- return result; >X- } >X+ np_net_ssl_cleanup(); >X+ if (sd) close(sd); >X+ return result; >X } >X } >X #endif /* HAVE_SSL */ >0fbb86de0c226c38ae8e93941878c060 >echo x - nagios-plugins/files/patch-plugins_check__procs.c >sed 's/^X//' >nagios-plugins/files/patch-plugins_check__procs.c << 'cb42a73b7bdb391965c0547ee08b420f' >X--- plugins/check_procs.c.orig 2017-01-16 17:24:03 UTC >X+++ plugins/check_procs.c >X@@ -71,6 +71,7 @@ int options = 0; /* bitmask of filter cr >X #define ELAPSED 512 >X #define EREG_ARGS 1024 >X #define CGROUP_HIERARCHY 2048 >X+#define JID 4096 >X >X #define KTHREAD_PARENT "kthreadd" /* the parent process of kernel threads: >X ppid of procs are compared to pid of this proc*/ >X@@ -103,6 +104,7 @@ char *fails; >X char tmp[MAX_INPUT_BUFFER]; >X int kthread_filter = 0; >X int usepid = 0; /* whether to test for pid or /proc/pid/exe */ >X+int jid; >X >X FILE *ps_input = NULL; >X >X@@ -133,6 +135,7 @@ main (int argc, char **argv) >X int procuid = 0; >X pid_t procpid = 0; >X pid_t procppid = 0; >X+ int procjid = 0; >X pid_t kthread_ppid = 0; >X int procvsz = 0; >X int procrss = 0; >X@@ -236,9 +239,9 @@ main (int argc, char **argv) >X procseconds = convert_to_seconds(procetime); >X >X if (verbose >= 3) { >X- printf ("proc#=%d uid=%d vsz=%d rss=%d pid=%d ppid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s", >X++ 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", >X procs, procuid, procvsz, procrss, >X- procpid, procppid, procpcpu, procstat, >X+ procpid, procppid, procjid, procpcpu, procstat, >X procetime, procprog, procargs); >X if (strstr(PS_COMMAND, "cgroup") != NULL) { >X printf(" proc_cgroup_hierarchy=%s\n", proc_cgroup_hierarchy); >X@@ -287,6 +290,8 @@ main (int argc, char **argv) >X resultsum |= PROG; >X if ((options & PPID) && (procppid == ppid)) >X resultsum |= PPID; >X+ if ((options & JID) && (procjid == jid)) >X+ resultsum |= JID; >X if ((options & USER) && (procuid == uid)) >X resultsum |= USER; >X if ((options & VSZ) && (procvsz >= vsz)) >X@@ -315,9 +320,9 @@ main (int argc, char **argv) >X >X procs++; >X if (verbose >= 2) { >X- printf ("Matched: uid=%d vsz=%d rss=%d pid=%d ppid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s", >X++ 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", >X procuid, procvsz, procrss, >X- procpid, procppid, procpcpu, procstat, >X+ procpid, procppid, procjid, procpcpu, procstat, >X procetime, procprog, procargs); >X if (strstr(PS_COMMAND, "cgroup") != NULL) { >X printf(" cgroup_hierarchy=%s\n", cgroup_hierarchy); >X@@ -438,6 +443,7 @@ process_arguments (int argc, char **argv >X {"no-kthreads", required_argument, 0, 'k'}, >X {"traditional-filter", no_argument, 0, 'T'}, >X {"cgroup-hierarchy", required_argument, 0, 'g'}, >X+ {"jid", required_argument, 0, 'j'}, >X {0, 0, 0, 0} >X }; >X >X@@ -446,7 +452,7 @@ process_arguments (int argc, char **argv >X strcpy (argv[c], "-t"); >X >X while (1) { >X- c = getopt_long (argc, argv, "Vvhkt:c:w:p:s:u:C:a:z:r:m:P:Tg:", >X+ c = getopt_long (argc, argv, "Vvhkt:c:w:p:s:u:C:a:z:r:m:P:Tg:j:", >X longopts, &option); >X >X if (c == -1 || c == EOF) >X@@ -477,6 +483,12 @@ process_arguments (int argc, char **argv >X break; >X } >X usage4 (_("Parent Process ID must be an integer!")); >X+ case 'j': /* jail id */ >X+ if (sscanf (optarg, "%d%[^0-9]", &jid, tmp) == 1) { >X+ asprintf (&fmt, "%s%sJID = %d", (fmt ? fmt : "") , (options ? ", " : ""), jid); >X+ options |= JID; >X+ break; >X+ } >X case 's': /* status */ >X if (statopts) >X break; >X@@ -766,6 +778,8 @@ print_help (void) >X printf (" %s\n", _("RSZDT, plus others based on the output of your 'ps' command).")); >X printf (" %s\n", "-p, --ppid=PPID"); >X printf (" %s\n", _("Only scan for children of the parent process ID indicated.")); >X+ printf (" %s\n", "-j, --jid=JID"); >X+ printf (" %s\n", _("Only scan for process running in jail which ID is JID.")); >X printf (" %s\n", "-z, --vsz=VSZ"); >X printf (" %s\n", _("Only scan for processes with VSZ higher than indicated.")); >X printf (" %s\n", "-r, --rss=RSS"); >X@@ -818,7 +832,7 @@ void >X print_usage (void) >X { >X printf ("%s\n", _("Usage:")); >X- printf ("%s -w <range> -c <range> [-m metric] [-s state] [-p ppid]\n", progname); >X+ printf ("%s -w <range> -c <range> [-m metric] [-s state] [-p ppid] [-j jid]\n", progname); >X printf (" [-u user] [-r rss] [-z vsz] [-P %%cpu] [-a argument-array]\n"); >X printf (" [-C command] [-k] [-t timeout] [-v]\n"); >X } >cb42a73b7bdb391965c0547ee08b420f >echo x - nagios-plugins/files/patch-THANKS >sed 's/^X//' >nagios-plugins/files/patch-THANKS << '126ad3571199d12b961f66be63d003fa' >X--- THANKS.orig 2016-08-01 09:28:39.000000000 -0700 >X+++ THANKS 2018-01-04 09:15:34.922605000 -0800 >X@@ -331,6 +331,7 @@ >X Jon Vandegrift >X Gianluca Varisco >X Laurent Vaslin >X+Leonid Vasiliev >X Matej Vela >X Carole Verdon >X Ludse Verhoeven >126ad3571199d12b961f66be63d003fa >echo x - nagios-plugins/files/patch-plugins_common.h >sed 's/^X//' >nagios-plugins/files/patch-plugins_common.h << '523849b133b7dd14e36373e427798e08' >XFrom 930ede8378245eb6bd31eaf1d9103f027df0f7a0 Mon Sep 17 00:00:00 2001 >XFrom: Bernard Spil <brnrd@FreeBSD.org> >XDate: Sun, 5 Nov 2017 10:43:56 +0100 >XSubject: [PATCH] plugins/common.h: Set default MySQL port >X >XAs of MariaDB 10.2 the headers for client no longer set the >Xdefault MySQL port. Patch fixes this for any version of MariaDB >Xor MySQL into the future. >X >XSee also: https://bugs.freebsd.org/223387 >X--- plugins/common.h.orig 2017-01-19 16:01:31 UTC >X+++ plugins/common.h >X@@ -168,6 +168,11 @@ >X # endif >X #endif >X >X+/* MariaDB 10.2 client does not set MYSQL_PORT */ >X+#ifndef MYSQL_PORT >X+# define MYSQL_PORT 3306 >X+#endif >X+ >X /* >X * >X * Standard Values >523849b133b7dd14e36373e427798e08 >echo x - nagios-plugins/files/patch-plugins_check__pgsql.c >sed 's/^X//' >nagios-plugins/files/patch-plugins_check__pgsql.c << '75445259db6deb0719d7c6f20a9fc5bb' >X--- plugins/check_pgsql.c.orig 2015-07-30 21:40:06 UTC >X+++ plugins/check_pgsql.c >X@@ -36,6 +36,7 @@ const char *email = "devel@nagios-plugin >X #include "utils.h" >X >X #include "netutils.h" >X+#include "pg_config_manual.h" >X #include <libpq-fe.h> >X #include <pg_config_manual.h> >X >75445259db6deb0719d7c6f20a9fc5bb >echo x - nagios-plugins/files/patch-plugins-check_ntp_time.c >sed 's/^X//' >nagios-plugins/files/patch-plugins-check_ntp_time.c << 'fef09c81d32918e5c5c80df978833456' >X--- plugins/check_ntp_time.c.orig 2018-01-04 12:59:01.422087000 -0800 >X+++ plugins/check_ntp_time.c 2018-01-04 13:05:56.317152000 -0800 >X@@ -415,6 +415,9 @@ >X } >X } >X /* lather, rinse, repeat. */ >X+ /* break if we have one response but other ntp servers doesn't response */ >X+ /* greater than timeout_interval/2 */ >X+ if (servers_completed && now_time-start_ts > timeout_interval/2) break; >X } >X >X if (one_read == 0) { >fef09c81d32918e5c5c80df978833456 >echo x - nagios-plugins/pkg-plist >sed 's/^X//' >nagios-plugins/pkg-plist << 'ab4057b42528a58201efe1bd363b764c' >Xlibexec/nagios/check_apt >Xlibexec/nagios/check_breeze >X%%SSH%%libexec/nagios/check_by_ssh >Xlibexec/nagios/check_clamd >Xlibexec/nagios/check_cluster >X%%DBI%%libexec/nagios/check_dbi >X@(,,04555) libexec/nagios/check_dhcp >Xlibexec/nagios/check_dig >Xlibexec/nagios/check_disk >Xlibexec/nagios/check_disk_smb >X%%CHECK_DNS%%libexec/nagios/check_dns >Xlibexec/nagios/check_dummy >Xlibexec/nagios/check_file_age >Xlibexec/nagios/check_flexlm >X%%FPING%%libexec/nagios/check_fping >Xlibexec/nagios/check_ftp >X%%QSTAT%%libexec/nagios/check_game >X%%NETSNMP%%libexec/nagios/check_hpjd >Xlibexec/nagios/check_http >X@(,,04555) libexec/nagios/check_icmp >Xlibexec/nagios/check_ifoperstatus >Xlibexec/nagios/check_ifstatus >Xlibexec/nagios/check_imap >Xlibexec/nagios/check_ircd >Xlibexec/nagios/check_jabber >X%%LDAP%%libexec/nagios/check_ldap >X%%LDAP%%libexec/nagios/check_ldaps >Xlibexec/nagios/check_load >Xlibexec/nagios/check_log >Xlibexec/nagios/check_mailq >Xlibexec/nagios/check_mrtg >Xlibexec/nagios/check_mrtgtraf >X%%MYSQL%%libexec/nagios/check_mysql >X%%MYSQL%%libexec/nagios/check_mysql_query >Xlibexec/nagios/check_nagios >Xlibexec/nagios/check_nntp >Xlibexec/nagios/check_nntps >Xlibexec/nagios/check_nt >Xlibexec/nagios/check_ntp >Xlibexec/nagios/check_ntp_peer >Xlibexec/nagios/check_ntp_time >Xlibexec/nagios/check_nwstat >Xlibexec/nagios/check_oracle >Xlibexec/nagios/check_overcr >X%%PGSQL%%libexec/nagios/check_pgsql >Xlibexec/nagios/check_ping >Xlibexec/nagios/check_pop >Xlibexec/nagios/check_procs >X%%RADIUS%%libexec/nagios/check_radius >Xlibexec/nagios/check_real >Xlibexec/nagios/check_rpc >Xlibexec/nagios/check_sensors >Xlibexec/nagios/check_simap >Xlibexec/nagios/check_smtp >X%%NETSNMP%%libexec/nagios/check_snmp >Xlibexec/nagios/check_spop >Xlibexec/nagios/check_ssh >Xlibexec/nagios/check_ssmtp >Xlibexec/nagios/check_swap >Xlibexec/nagios/check_tcp >Xlibexec/nagios/check_time >Xlibexec/nagios/check_udp >Xlibexec/nagios/check_ups >Xlibexec/nagios/check_users >Xlibexec/nagios/check_wave >Xlibexec/nagios/negate >Xlibexec/nagios/urlize >Xlibexec/nagios/utils.pm >Xlibexec/nagios/utils.sh >X%%NLS%%share/locale/fr/LC_MESSAGES/nagios-plugins.mo >X%%NLS%%share/locale/de/LC_MESSAGES/nagios-plugins.mo >ab4057b42528a58201efe1bd363b764c >exit >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 224926
: 189433 |
189434
|
189435