diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-01-21 16:07:38 +0100 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-01-21 16:07:38 +0100 |
commit | 7ee3525423f17cb8269a11e679355733867131e9 (patch) | |
tree | 6b68b8bddc3603925a5eb2b996859c94e0c06b46 | |
parent | 11cf54ca78185d820085a476cdbf7d8f9149c292 (diff) | |
parent | a3871201821d9abe8a12e637e7dd00d9d1dde2a5 (diff) | |
download | monitoring-plugins-7ee3525423f17cb8269a11e679355733867131e9.tar.gz |
Merge branch 'maint'
* maint:
check_ssh: Get rid of sshd: Read from socket failed: Connection reset by peer
fixed tests when there is no direct internet connection
NEWS: Mention fix for check_http's -S option
Fix for SSL Versioning when multiple options are used.
Fix #1217 spec file fails to build due to duplicate files and unused files
check_http: Don't let "-N" expect an argument
README: Change GitHub URL
README: Clarify license notice
Update URLs and mailing list addresses
Just using the posix conform extended regular expression grep
check_oracle: --db +ASM bad string matching check_oracle doesn't correctly check for pmon +ASM instance from at least Oracle 11 as the pmon proces was renamed from ora_pmon_.* to asm_pmon_.*. -- Just turning attached patch of github issue #1207 into a push request. (Closes #1207)
Update web site URLs
Conflicts:
FAQ
NEWS
README
SUPPORT
configure.in
monitoring-plugins.spec.in
pkg/solaris/pkginfo.in
plugins-root/check_dhcp.c
plugins-root/check_icmp.c
plugins-scripts/check_ifoperstatus.pl
plugins-scripts/check_mssql.pl
plugins/check_apt.c
plugins/check_by_ssh.c
plugins/check_cluster.c
plugins/check_dbi.c
plugins/check_dig.c
plugins/check_disk.c
plugins/check_dns.c
plugins/check_dummy.c
plugins/check_fping.c
plugins/check_game.c
plugins/check_hpjd.c
plugins/check_http.c
plugins/check_ide_smart.c
plugins/check_ldap.c
plugins/check_load.c
plugins/check_mrtg.c
plugins/check_mrtgtraf.c
plugins/check_mysql.c
plugins/check_mysql_query.c
plugins/check_nagios.c
plugins/check_nt.c
plugins/check_ntp.c
plugins/check_ntp_peer.c
plugins/check_ntp_time.c
plugins/check_nwstat.c
plugins/check_overcr.c
plugins/check_pgsql.c
plugins/check_ping.c
plugins/check_procs.c
plugins/check_radius.c
plugins/check_real.c
plugins/check_smtp.c
plugins/check_snmp.c
plugins/check_ssh.c
plugins/check_swap.c
plugins/check_tcp.c
plugins/check_time.c
plugins/check_ups.c
plugins/check_users.c
plugins/negate.c
plugins/urlize.c
plugins/utils.h
po/Makevars
po/de.po
po/fr.po
po/monitoring-plugins.pot
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | README | 36 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | monitoring-plugins.spec.in | 6 | ||||
-rwxr-xr-x | plugins-scripts/check_oracle.sh | 2 | ||||
-rw-r--r-- | plugins/check_http.c | 10 | ||||
-rw-r--r-- | plugins/check_ssh.c | 2 | ||||
-rw-r--r-- | plugins/t/check_http.t | 2 | ||||
-rw-r--r-- | plugins/t/check_tcp.t | 18 | ||||
-rw-r--r-- | plugins/utils.h | 11 | ||||
-rw-r--r-- | po/de.po | 12 | ||||
-rw-r--r-- | po/fr.po | 18 | ||||
-rw-r--r-- | po/monitoring-plugins.pot | 12 |
13 files changed, 79 insertions, 55 deletions
@@ -1,6 +1,9 @@ This file documents the major additions and syntax changes between releases. 1.6 ... + FIXES + Don't let e.g. check_http's -C option reset SSL version if e.g. -S 1 -C 5 is specified + WARNINGS check_procs now ignores its parent process to avoid unexpected results when invoked via certain shells utils.sh no longer defines ECHO @@ -23,17 +23,18 @@ You can check for the latest plugins at: * <https://www.monitoring-plugins.org/> -Send an email to <help@monitoring-plugins.org> for assistance. -Please include the OS type and version that you are using. Also, run the -plugin with the `-vvv` option and provide the resulting version information. -Of course, there may be additional diagnostic information required as well. -Use good judgment. +Send an email to <help@monitoring-plugins.org> for assistance. Please +include the OS type and version that you are using. Also, run the plugin +with the `-vvv` option and provide the resulting version information. Of +course, there may be additional diagnostic information required as well. Use +good judgment. -Send an email to <devel@monitoring-plugins.org> for developer -discussions. +Send an email to <devel@monitoring-plugins.org> for developer discussions. For patch submissions and bug reports, please use the appropriate resources -at <https://github.com/monitoring-plugins/monitoring-plugins>. +at: + +* <https://github.com/monitoring-plugins> Installation Instructions @@ -80,11 +81,18 @@ That's it! If you have any problems or questions, feel free to send an email to <help@monitoring-plugins.org>. -License Stuff -------------- +License Notice +-------------- + +You can redistribute and/or modify this software under the terms of the GNU +General Public License as published by the Free Software Foundation; either +version 3 of the License, or (at your option) any later version; with the +additional exemption that compiling, linking, and/or using OpenSSL is +allowed. -This software is released under the GNU General Public License, Version 3, -with the additional exemption that compiling, linking and/or using OpenSSL -is allowed. +This software is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. -See the `COPYING` file for the complete GPLv3 text. +See the `COPYING` file for the complete text of the GNU General Public +License, version 3. diff --git a/configure.in b/configure.in index 2cec17d9..c0506114 100644 --- a/configure.in +++ b/configure.in @@ -59,7 +59,7 @@ AC_SUBST(SCRIPT_TEST)dnl WARRANTY="The monitoring plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugins under the terms of the GNU General Public License.\nFor more information about these matters, see the file named COPYING.\n" AC_SUBST(WARRANTY) -SUPPORT="Send email to devel@monitoring-plugins.org if you have questions\nregarding use of this software. To submit patches or suggest improvements,\nsend email to devel@monitoring-plugins.org.\nPlease include version information with all correspondence (when possible,\nuse output from the --version option of the plugin itself).\n" +SUPPORT="Send email to help@monitoring-plugins.org if you have questions regarding use\nof this software. To submit patches or suggest improvements, send email to\ndevel@monitoring-plugins.org. Please include version information with all\ncorrespondence (when possible, use output from the --version option of the\nplugin itself).\n" AC_SUBST(SUPPORT) dnl CGIURL has changed for Nagios with 1.0 beta diff --git a/monitoring-plugins.spec.in b/monitoring-plugins.spec.in index 62e5e4fd..f0034982 100644 --- a/monitoring-plugins.spec.in +++ b/monitoring-plugins.spec.in @@ -163,8 +163,6 @@ fi %install rm -rf $RPM_BUILD_ROOT make AM_INSTALL_PROGRAM_FLAGS="" DESTDIR=${RPM_BUILD_ROOT} install -build-aux/install-sh -c -d ${RPM_BUILD_ROOT}%{_sysconfdir} -build-aux/install-sh -c -m 664 command.cfg ${RPM_BUILD_ROOT}%{_sysconfdir} %find_lang %{name} echo "%defattr(755,%{npusr},%{npgrp})" >> %{name}.lang comm -13 %{npdir}/ls-plugins-before %{npdir}/ls-plugins-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang @@ -174,6 +172,10 @@ echo "%defattr(755,%{npusr},%{npgrp})" >> %{name}.lang comm -13 %{npdir}/ls-plugins-scripts-before %{npdir}/ls-plugins-scripts-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang echo "%{_libexecdir}/utils.pm" >> %{name}.lang echo "%{_libexecdir}/utils.sh" >> %{name}.lang +echo "%{_libexecdir}/check_ldaps" >> %{name}.lang + +sed -i '/libnpcommon/d' %{name}.lang +sed -i '/monitoring-plugins.mo/d' %{name}.lang %clean rm -rf $RPM_BUILD_ROOT diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh index 73a19cff..b653372e 100755 --- a/plugins-scripts/check_oracle.sh +++ b/plugins-scripts/check_oracle.sh @@ -163,7 +163,7 @@ case "$cmd" in }' ;; --db) - pmonchk=`ps -ef | grep -v grep | grep -c "ora_pmon_${2}$"` + pmonchk=`ps -ef | grep -v grep | grep -E -c "(asm|ora)_pmon_${2}$"` if [ ${pmonchk} -ge 1 ] ; then echo "${2} OK - ${pmonchk} PMON process(es) running" exit $STATE_OK diff --git a/plugins/check_http.c b/plugins/check_http.c index d8b3f9c5..92861d97 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -57,7 +57,7 @@ enum { #ifdef HAVE_SSL int check_cert = FALSE; -int ssl_version; +int ssl_version = 0; int days_till_exp_warn, days_till_exp_crit; char *randbuff; X509 *server_cert; @@ -257,7 +257,7 @@ process_arguments (int argc, char **argv) } while (1) { - c = getopt_long (argc, argv, "Vvh46t:c:w:A:k:H:P:j:T:I:a:b:d:e:p:s:R:r:u:f:C:J:K:nlLS::m:M:N:E", longopts, &option); + c = getopt_long (argc, argv, "Vvh46t:c:w:A:k:H:P:j:T:I:a:b:d:e:p:s:R:r:u:f:C:J:K:nlLS::m:M:NE", longopts, &option); if (c == -1 || c == EOF) break; @@ -339,10 +339,10 @@ process_arguments (int argc, char **argv) case 'S': /* use SSL */ #ifdef HAVE_SSL enable_ssl: + /* ssl_version initialized to 0 as a default. Only set if it's non-zero. This helps when we include multiple + parameters, like -S and -C combinations */ use_ssl = TRUE; - if (optarg == NULL || c != 'S') - ssl_version = 0; - else { + if (c=='S' && optarg != NULL) { ssl_version = atoi(optarg); if (ssl_version < 1 || ssl_version > 3) usage4 (_("Invalid option - Valid values for SSL Version are 1 (TLSv1), 2 (SSLv2) or 3 (SSLv3)")); diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c index f4522e2b..5c75d278 100644 --- a/plugins/check_ssh.c +++ b/plugins/check_ssh.c @@ -250,6 +250,7 @@ ssh_connect (char *haddr, int hport, char *remote_version) printf (_("SSH WARNING - %s (protocol %s) version mismatch, expected '%s'\n"), ssh_server, ssh_proto, remote_version); + recv (sd, output, BUFF_SZ, 0); close(sd); exit (STATE_WARNING); } @@ -260,6 +261,7 @@ ssh_connect (char *haddr, int hport, char *remote_version) (_("SSH OK - %s (protocol %s) | %s\n"), ssh_server, ssh_proto, fperfdata("time", elapsed_time, "s", FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)socket_timeout)); + recv (sd, output, BUFF_SZ, 0); close(sd); exit (STATE_OK); } diff --git a/plugins/t/check_http.t b/plugins/t/check_http.t index a74220e2..2539a289 100644 --- a/plugins/t/check_http.t +++ b/plugins/t/check_http.t @@ -82,7 +82,7 @@ SKIP: { cmp_ok( $res->return_code, "==", 0, "And also when not found"); } SKIP: { - skip "No internet access", 11 if $internet_access eq "no"; + skip "No internet access", 16 if $internet_access eq "no"; $res = NPTest->testCmd( "./check_http --ssl www.verisign.com" diff --git a/plugins/t/check_tcp.t b/plugins/t/check_tcp.t index abb16aec..f996685d 100644 --- a/plugins/t/check_tcp.t +++ b/plugins/t/check_tcp.t @@ -12,7 +12,6 @@ BEGIN { use NPTest; $has_ipv6 = NPTest::has_ipv6(); $tests = $has_ipv6 ? 14 : 11; - plan tests => $tests; } @@ -25,20 +24,29 @@ my $host_nonresponsive = getTestParameter( "host_nonresponsive", "NP_HOST_NONRES my $hostname_invalid = getTestParameter( "hostname_invalid", "NP_HOSTNAME_INVALID", "nosuchhost", "An invalid (not known to DNS) hostname" ); +my $internet_access = getTestParameter( "NP_INTERNET_ACCESS", + "Is this system directly connected to the internet?", + "yes"); + my $successOutput = '/^TCP OK\s-\s+[0-9]?\.?[0-9]+ second response time on port [0-9]+/'; my $failedExpect = '/^TCP WARNING\s-\sUnexpected response from host/socket on port [0-9]+/'; my $t; +$tests = $tests - 4 if $internet_access eq "no"; +plan tests => $tests; + $t += checkCmd( "./check_tcp $host_tcp_http -p 80 -wt 300 -ct 600", 0, $successOutput ); $t += checkCmd( "./check_tcp $host_tcp_http -p 81 -wt 0 -ct 0 -to 1", 2 ); # use invalid port for this test $t += checkCmd( "./check_tcp $host_nonresponsive -p 80 -wt 0 -ct 0 -to 1", 2 ); $t += checkCmd( "./check_tcp $hostname_invalid -p 80 -wt 0 -ct 0 -to 1", 2 ); -$t += checkCmd( "./check_tcp -S -D 1 -H www.verisign.com -p 443", 0 ); -$t += checkCmd( "./check_tcp -S -D 9000,1 -H www.verisign.com -p 443", 1 ); -$t += checkCmd( "./check_tcp -S -D 9000 -H www.verisign.com -p 443", 1 ); -$t += checkCmd( "./check_tcp -S -D 9000,8999 -H www.verisign.com -p 443", 2 ); +if($internet_access ne "no") { + $t += checkCmd( "./check_tcp -S -D 1 -H www.verisign.com -p 443", 0 ); + $t += checkCmd( "./check_tcp -S -D 9000,1 -H www.verisign.com -p 443", 1 ); + $t += checkCmd( "./check_tcp -S -D 9000 -H www.verisign.com -p 443", 1 ); + $t += checkCmd( "./check_tcp -S -D 9000,8999 -H www.verisign.com -p 443", 2 ); +} # Need the \r\n to make it more standards compliant with web servers. Need the various quotes # so that perl doesn't interpret the \r\n and is passed onto command line correctly diff --git a/plugins/utils.h b/plugins/utils.h index c9fd68d2..1f376542 100644 --- a/plugins/utils.h +++ b/plugins/utils.h @@ -185,7 +185,8 @@ char *fperfdata (const char *, #ifdef NP_EXTRA_OPTS #define UT_EXTRA_OPTS _("\ --extra-opts=[section][@file]\n\ - Read options from an ini file. See http://monitoring-plugins.org/doc/extra-opts.html\n\ + Read options from an ini file. See\n\ + https://www.monitoring-plugins.org/doc/extra-opts.html\n\ for usage and examples.\n") #else #define UT_EXTRA_OPTS "" @@ -193,13 +194,13 @@ char *fperfdata (const char *, #define UT_THRESHOLDS_NOTES _("\ See:\n\ - http://monitoring-plugins.org/doc/guidelines.html#THRESHOLDFORMAT\n\ + https://www.monitoring-plugins.org/doc/guidelines.html#THRESHOLDFORMAT\n\ for THRESHOLD format and examples.\n") #define UT_SUPPORT _("\n\ -Send email to help@monitoring-plugins.org if you have questions\n\ -regarding use of this software. To submit patches or suggest improvements,\n\ -send email to devel@monitoring-plugins.org\n\n") +Send email to help@monitoring-plugins.org if you have questions regarding\n\ +use of this software. To submit patches or suggest improvements, send email\n\ +to devel@monitoring-plugins.org\n\n") #define UT_NOWARRANTY _("\n\ The monitoring plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\n\ @@ -5748,24 +5748,24 @@ msgstr "" #: plugins/utils.h:182 msgid "" " --extra-opts=[section][@file]\n" -" Read options from an ini file. See http://monitoring-plugins.org/doc/" -"extra-opts.html\n" +" Read options from an ini file. See\n" +" https://www.monitoring-plugins.org/doc/extra-opts.html\n" " for usage and examples.\n" msgstr "" #: plugins/utils.h:190 msgid "" " See:\n" -" http://monitoring-plugins.org/doc/guidelines.html#THRESHOLDFORMAT\n" +" https://www.monitoring-plugins.org/doc/guidelines.html#THRESHOLDFORMAT\n" " for THRESHOLD format and examples.\n" msgstr "" #: plugins/utils.h:195 msgid "" "\n" -"Send email to help@monitoring-plugins.org if you have questions\n" -"regarding use of this software. To submit patches or suggest improvements,\n" -"send email to devel@monitoring-plugins.org\n" +"Send email to help@monitoring-plugins.org if you have questions regarding\n" +"use of this software. To submit patches or suggest improvements, send email\n" +"to devel@monitoring-plugins.org\n" "\n" msgstr "" @@ -5891,24 +5891,24 @@ msgstr "" #, fuzzy msgid "" " --extra-opts=[section][@file]\n" -" Read options from an ini file. See http://monitoring-plugins.org/doc/" -"extra-opts.html\n" +" Read options from an ini file. See\n" +" https://www.monitoring-plugins.org/doc/extra-opts.html\n" " for usage and examples.\n" msgstr "" " --extra-opts=[section][@file]\n" -" Lire les options d'un fichier ini. Voir http://nagiosplugins.org/extra-" -"opts\n" +" Lire les options d'un fichier ini. Voir\n" +" https://www.monitoring-plugins.org/doc/extra-opts.html\n" " pour les instructions et examples.\n" #: plugins/utils.h:190 #, fuzzy msgid "" " See:\n" -" http://monitoring-plugins.org/doc/guidelines.html#THRESHOLDFORMAT\n" +" https://www.monitoring-plugins.org/doc/guidelines.html#THRESHOLDFORMAT\n" " for THRESHOLD format and examples.\n" msgstr "" " Voir:\n" -" http://nagiosplug.sourceforge.net/developer-guidelines." +" https://www.monitoring-plugins.org/doc/guidelines.html." "html#THRESHOLDFORMAT\n" " pour le format et examples des seuils (THRESHOLD).\n" @@ -5916,9 +5916,9 @@ msgstr "" #, fuzzy msgid "" "\n" -"Send email to help@monitoring-plugins.org if you have questions\n" -"regarding use of this software. To submit patches or suggest improvements,\n" -"send email to devel@monitoring-plugins.org\n" +"Send email to help@monitoring-plugins.org if you have questions regarding\n" +"use of this software. To submit patches or suggest improvements, send email\n" +"to devel@monitoring-plugins.org\n" "\n" msgstr "" "\n" diff --git a/po/monitoring-plugins.pot b/po/monitoring-plugins.pot index bfb6ea83..088d8c14 100644 --- a/po/monitoring-plugins.pot +++ b/po/monitoring-plugins.pot @@ -5595,24 +5595,24 @@ msgstr "" #: plugins/utils.h:182 msgid "" " --extra-opts=[section][@file]\n" -" Read options from an ini file. See http://monitoring-plugins.org/doc/" -"extra-opts.html\n" +" Read options from an ini file. See\n" +" https://www.monitoring-plugins.org/doc/extra-opts.html\n" " for usage and examples.\n" msgstr "" #: plugins/utils.h:190 msgid "" " See:\n" -" http://monitoring-plugins.org/doc/guidelines.html#THRESHOLDFORMAT\n" +" https://www.monitoring-plugins.org/doc/guidelines.html#THRESHOLDFORMAT\n" " for THRESHOLD format and examples.\n" msgstr "" #: plugins/utils.h:195 msgid "" "\n" -"Send email to help@monitoring-plugins.org if you have questions\n" -"regarding use of this software. To submit patches or suggest improvements,\n" -"send email to devel@monitoring-plugins.org\n" +"Send email to help@monitoring-plugins.org if you have questions regarding\n" +"use of this software. To submit patches or suggest improvements, send email\n" +"to devel@monitoring-plugins.org\n" "\n" msgstr "" |