Procházet zdrojové kódy

Merge branch 'maint'

Conflicts:
	NEWS
abrist před 12 roky
rodič
revize
bb079a7620
65 změnil soubory, kde provedl 263 přidání a 173 odebrání
  1. 1 1
      FAQ
  2. 11 0
      NEWS
  3. 1 1
      NPTest.pm
  4. 23 15
      README
  5. 4 4
      SUPPORT
  6. 4 0
      THANKS.in
  7. 1 1
      configure.in
  8. 6 4
      nagios-plugins.spec.in
  9. 1 1
      pkg/solaris/pkginfo.in
  10. 1 1
      plugins-root/check_dhcp.c
  11. 1 1
      plugins-root/check_icmp.c
  12. 15 6
      plugins-scripts/check_file_age.pl
  13. 3 3
      plugins-scripts/check_ifoperstatus.pl
  14. 3 3
      plugins-scripts/check_ifstatus.pl
  15. 2 2
      plugins-scripts/check_mailq.pl
  16. 3 2
      plugins-scripts/check_mssql.pl
  17. 1 1
      plugins-scripts/check_oracle.sh
  18. 2 2
      plugins/check_apt.c
  19. 2 2
      plugins/check_by_ssh.c
  20. 1 1
      plugins/check_cluster.c
  21. 2 2
      plugins/check_dbi.c
  22. 2 2
      plugins/check_dig.c
  23. 3 3
      plugins/check_disk.c
  24. 2 2
      plugins/check_dns.c
  25. 1 1
      plugins/check_dummy.c
  26. 1 1
      plugins/check_fping.c
  27. 2 2
      plugins/check_game.c
  28. 1 1
      plugins/check_hpjd.c
  29. 7 7
      plugins/check_http.c
  30. 6 5
      plugins/check_ide_smart.c
  31. 2 2
      plugins/check_ldap.c
  32. 1 1
      plugins/check_load.c
  33. 1 1
      plugins/check_mrtg.c
  34. 1 1
      plugins/check_mrtgtraf.c
  35. 1 1
      plugins/check_mysql.c
  36. 9 2
      plugins/check_mysql_query.c
  37. 1 1
      plugins/check_nagios.c
  38. 38 15
      plugins/check_nt.c
  39. 5 3
      plugins/check_ntp.c
  40. 2 2
      plugins/check_ntp_peer.c
  41. 2 2
      plugins/check_ntp_time.c
  42. 2 2
      plugins/check_nwstat.c
  43. 2 2
      plugins/check_overcr.c
  44. 2 2
      plugins/check_pgsql.c
  45. 7 3
      plugins/check_ping.c
  46. 2 2
      plugins/check_procs.c
  47. 2 2
      plugins/check_radius.c
  48. 2 2
      plugins/check_real.c
  49. 2 2
      plugins/check_smtp.c
  50. 2 2
      plugins/check_snmp.c
  51. 4 2
      plugins/check_ssh.c
  52. 6 3
      plugins/check_swap.c
  53. 2 2
      plugins/check_tcp.c
  54. 2 2
      plugins/check_time.c
  55. 2 2
      plugins/check_ups.c
  56. 1 1
      plugins/check_users.c
  57. 2 2
      plugins/negate.c
  58. 1 1
      plugins/t/check_http.t
  59. 13 5
      plugins/t/check_tcp.t
  60. 1 1
      plugins/urlize.c
  61. 11 6
      plugins/utils.h
  62. 1 1
      po/Makevars
  63. 5 5
      po/de.po
  64. 8 8
      po/fr.po
  65. 5 5
      po/nagios-plugins.pot

+ 1 - 1
FAQ

@@ -88,4 +88,4 @@ A: You can make it available on NagiosExchange (http://nagiosexchange.org)
    where other people can find it for use.
 
    You can also get feedback on improving the plugin via the 
-   nagiosplug-devel@lists.sourceforge.net mailing list.
+   devel@nagios-plugins.org mailing list.

+ 11 - 0
NEWS

@@ -1,6 +1,17 @@
 This file documents the major additions and syntax changes between releases.
 
 1.6 ...
+	ENHANCEMENTS
+	Added performance data to check_mysql_query (sreinhardt)
+	New check_file_age option -i/--ignore-missing which returns OK if file is missing (waja)
+	Added performance data to check_nt UPTIME -l seconds|minutes|hours|days (abrist)
+
+	FIXES
+	Don't let e.g. check_http's -C option reset SSL version if e.g. -S 1 -C 5 is specified
+	check_ide_smart now defaults to nagios-compatible output (sreinhardt)
+	Fixed misleading timeout message for non-network plugins (sreinhardt)
+	check_swap now fails with 100% usage and a new status output when swap is disabled or missing (abrist)
+
 	WARNINGS
 	check_procs now ignores its parent process to avoid unexpected results when invoked via certain shells
 	utils.sh no longer defines ECHO

+ 1 - 1
NPTest.pm

@@ -347,7 +347,7 @@ sub getTestParameter
   }
 
   # Set "none" if no terminal attached (eg, tinderbox build servers when new variables set)
-  return "" unless (-t STDERR);
+  return "" unless (-t STDIN);
 
   my $userResponse = "";
 

+ 23 - 15
README

@@ -23,17 +23,18 @@ You can check for the latest plugins at:
 
 * <https://www.nagios-plugins.org/>
 
-Send an email to <nagiosplug-help@lists.sourceforge.net> 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@nagios-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 <nagiosplug-devel@lists.sourceforge.net> for developer
-discussions.
+Send an email to <devel@nagios-plugins.org> for developer discussions.
 
 For patch submissions and bug reports, please use the appropriate resources
-at <https://github.com/nagios-plugins/nagios-plugins>.
+at:
+
+* <https://github.com/nagios-plugins>
 
 
 Installation Instructions
@@ -77,14 +78,21 @@ Installation Instructions
     	make install-root
 
 That's it!  If you have any problems or questions, feel free to send an
-email to <nagiosplug-help@lists.sourceforge.net>.
+email to <help@nagios-plugins.org>.
+
 
+License Notice
+--------------
 
-License Stuff
--------------
+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.

+ 4 - 4
SUPPORT

@@ -7,8 +7,8 @@ http://www.nagios.org/ to track the current status of commercial
 support offerings.
 
 There are two mailing lists associated with Nagios Plugin development:
-'help' (mailto:nagiosplug-help@lists.sourceforge.net), and 'devel'
-(mailto:nagiosplug-devel@lists.sourceforge.net). Unless you are fairly
+'help' (mailto:help@nagios-plugins.org), and 'devel'
+(mailto:devel@nagios-plugins.org). Unless you are fairly
 certain you have found a bug or that you are requesting a new feature,
 please direct support requests to 'help'.
 
@@ -48,8 +48,8 @@ REPORTING BUGS AND SUBMITTING PATCHES
 
 Bug reports, investigations of possible bugs, feature requests, and
 patch submissions should be submitted to the development list at
-mailto:nagiosplug-devel@lists.sourceforge.net. Please raise an issue first 
-in GitHub, otherwise your email is likely to be missed over time.
+mailto:devel@nagios-plugins.org. Please raise an issue first in
+GitHub, otherwise your email is likely to be missed over time.
 
 You should identify the version, preferably in the subject line. 
 However, to best use developer resources, it is suggested that you 

+ 4 - 0
THANKS.in

@@ -302,3 +302,7 @@ Sebastian Schmidt
 Simon Kainz
 Steve Weinreich
 Tim Laszlo
+Patric Wust
+Oskar Liljeblad
+Geoff Oakham
+Tilmann Bubeck

+ 1 - 1
configure.in

@@ -61,7 +61,7 @@ AC_SUBST(SCRIPT_TEST)dnl
 WARRANTY="The nagios 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 nagios-users@lists.sourceforge.net if you have questions\nregarding use of this software. To submit patches or suggest improvements,\nsend email to nagiosplug-devel@lists.sourceforge.net.\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@nagios-plugins.org if you have questions regarding use\nof this software. To submit patches or suggest improvements, send email to\ndevel@nagios-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

+ 6 - 4
nagios-plugins.spec.in

@@ -22,8 +22,8 @@ Summary: Host/service/network monitoring program plugins for Nagios
 
 Group: Applications/System
 License: GPL
-URL: http://nagiosplug.sourceforge.net/
-Source0: http://dl.sf.net/sourceforge/nagiosplug/%{name}-%{version}.tar.gz
+URL: https://www.nagios-plugins.org/
+Source0: https://www.nagios-plugins.org/download/%{name}-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %define npdir %{_builddir}/%{name}-%{version}
@@ -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 '/nagios-plugins.mo/d' %{name}.lang
 
 %clean
 rm -rf $RPM_BUILD_ROOT

+ 1 - 1
pkg/solaris/pkginfo.in

@@ -5,7 +5,7 @@ ARCH="@PKG_ARCH@"
 VERSION="@PACKAGE_VERSION@,REV=@REV_DATESTAMP@"
 CATEGORY="application"
 VENDOR="Nagios Plugin Development Team"
-EMAIL="nagiosplug-devel@lists.sourceforge.net"
+EMAIL="devel@nagios-plugins.org"
 PSTAMP="nag@REV_TIMESTAMP@"
 BASEDIR="/"
 CLASSES="none"

+ 1 - 1
plugins-root/check_dhcp.c

@@ -35,7 +35,7 @@
 
 const char *progname = "check_dhcp";
 const char *copyright = "2001-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "netutils.h"

+ 1 - 1
plugins-root/check_icmp.c

@@ -40,7 +40,7 @@
 /* char *progname = "check_icmp"; */
 char *progname;
 const char *copyright = "2005-2008";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 /** nagios plugins basic includes */
 #include "common.h"

+ 15 - 6
plugins-scripts/check_file_age.pl

@@ -18,8 +18,8 @@
 #
 # you should have received a copy of the GNU General Public License
 # along with this program (or with Nagios);  if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA
+# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+# Boston, MA 02110-1301, USA
 
 use strict;
 use English;
@@ -32,7 +32,7 @@ use utils qw (%ERRORS &print_revision &support);
 sub print_help ();
 sub print_usage ();
 
-my ($opt_c, $opt_f, $opt_w, $opt_C, $opt_W, $opt_h, $opt_V);
+my ($opt_c, $opt_f, $opt_w, $opt_C, $opt_W, $opt_h, $opt_V, $opt_i);
 my ($result, $message, $age, $size, $st);
 
 $PROGNAME="check_file_age";
@@ -47,6 +47,7 @@ Getopt::Long::Configure('bundling');
 GetOptions(
 	"V"   => \$opt_V, "version"	=> \$opt_V,
 	"h"   => \$opt_h, "help"	=> \$opt_h,
+	"i"   => \$opt_i, "ignore-missing"	=> \$opt_i,
 	"f=s" => \$opt_f, "file"	=> \$opt_f,
 	"w=f" => \$opt_w, "warning-age=f" => \$opt_w,
 	"W=f" => \$opt_W, "warning-size=f" => \$opt_W,
@@ -72,8 +73,15 @@ if (! $opt_f) {
 
 # Check that file exists (can be directory or link)
 unless (-e $opt_f) {
-	print "FILE_AGE CRITICAL: File not found - $opt_f\n";
-	exit $ERRORS{'CRITICAL'};
+	if ($opt_i) {
+		$result = 'OK';
+		print "FILE_AGE $result: $opt_f doesn't exist, but ignore-missing was set\n";
+		exit $ERRORS{$result};
+
+	} else {
+		print "FILE_AGE CRITICAL: File not found - $opt_f\n";
+		exit $ERRORS{'CRITICAL'};
+	}
 }
 
 $st = File::stat::stat($opt_f);
@@ -95,7 +103,7 @@ exit $ERRORS{$result};
 
 sub print_usage () {
 	print "Usage:\n";
-	print "  $PROGNAME [-w <secs>] [-c <secs>] [-W <size>] [-C <size>] -f <file>\n";
+	print "  $PROGNAME [-w <secs>] [-c <secs>] [-W <size>] [-C <size>] [-i] -f <file>\n";
 	print "  $PROGNAME [-h | --help]\n";
 	print "  $PROGNAME [-V | --version]\n";
 }
@@ -105,6 +113,7 @@ sub print_help () {
 	print "Copyright (c) 2003 Steven Grimm\n\n";
 	print_usage();
 	print "\n";
+	print "  -i | --ignore-missing :  return OK if the file does not exist\n";
 	print "  <secs>  File must be no more than this many seconds old (default: warn 240 secs, crit 600)\n";
 	print "  <size>  File must be at least this many bytes long (default: crit 0 bytes)\n";
 	print "\n";

+ 3 - 3
plugins-scripts/check_ifoperstatus.pl

@@ -19,10 +19,10 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+# MA 02110-1301, USA
 #
-#
-# Report bugs to:  nagiosplug-help@lists.sourceforge.net
+# Report bugs to:  help@nagios-plugins.org
 #
 # 11.01.2000 Version 1.0
 #

+ 3 - 3
plugins-scripts/check_ifstatus.pl

@@ -22,8 +22,8 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+# MA 02110-1301, USA
 #
 # Report bugs to: ck@zet.net, nagiosplug-help@lists.sf.net
 # 
@@ -216,7 +216,7 @@ foreach $key (keys %ifStatus) {
 			$ifexclude,
 			$ifunused);
    }
-my $perfdata = sprintf("up=%d,down=%d,dormant=%d,excluded=%d,unused=%d",$ifup,$ifdown,$ifdormant,$ifexclude,$ifunused);
+my $perfdata = sprintf("up=%d down=%d dormant=%d excluded=%d unused=%d",$ifup,$ifdown,$ifdormant,$ifexclude,$ifunused);
 print ("$state: $answer |$perfdata\n");
 exit $ERRORS{$state};
 

+ 2 - 2
plugins-scripts/check_mailq.pl

@@ -20,8 +20,8 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+# MA 02110-1301, USA 
 #
 ############################################################################
 

+ 3 - 2
plugins-scripts/check_mssql.pl

@@ -19,9 +19,10 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+# MA 02110-1301, USA 
 #
-# Report bugs to: nagiosplug-help@lists.sourceforge.net
+# Report bugs to: help@nagios-plugins.org
 # 
 #
 

+ 1 - 1
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

+ 2 - 2
plugins/check_apt.c

@@ -31,7 +31,7 @@
 
 const char *progname = "check_apt";
 const char *copyright = "2006-2008";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "runcmd.h"
@@ -430,7 +430,7 @@ print_help (void)
   printf(UT_HELP_VRSN);
   printf(UT_EXTRA_OPTS);
 
-  printf(UT_TIMEOUT, timeout_interval);
+  printf(UT_PLUG_TIMEOUT, timeout_interval);
 
   printf (" %s\n", "-U, --upgrade=OPTS");
   printf ("    %s\n", _("[Default] Perform an upgrade.  If an optional OPTS argument is provided,"));

+ 2 - 2
plugins/check_by_ssh.c

@@ -28,7 +28,7 @@
 
 const char *progname = "check_by_ssh";
 const char *copyright = "2000-2008";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "utils.h"
@@ -428,7 +428,7 @@ print_help (void)
   printf (" %s\n","-q, --quiet");
   printf ("    %s\n", _("Tell ssh to suppress warning and diagnostic messages [optional]"));
 	printf (UT_WARN_CRIT);
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 	printf (UT_VERBOSE);
 	printf("\n");
   printf (" %s\n", _("The most common mode of use is to refer to a local identity file with"));

+ 1 - 1
plugins/check_cluster.c

@@ -24,7 +24,7 @@
 
 const char *progname = "check_cluster";
 const char *copyright = "2000-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "utils.h"

+ 2 - 2
plugins/check_dbi.c

@@ -31,7 +31,7 @@
 
 const char *progname = "check_dbi";
 const char *copyright = "2011";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "utils.h"
@@ -562,7 +562,7 @@ print_help (void)
 	printf ("                   %s\n", _("(ignore the query result)"));
 	printf ("\n");
 
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 
 	printf (UT_VERBOSE);
 

+ 2 - 2
plugins/check_dig.c

@@ -34,7 +34,7 @@
 
 const char *progname = "check_dig";
 const char *copyright = "2002-2008";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "netutils.h"
@@ -348,7 +348,7 @@ print_help (void)
   printf (" %s\n","-A, --dig-arguments=STRING");
   printf ("    %s\n",_("Pass STRING as argument(s) to dig"));
   printf (UT_WARN_CRIT);
-  printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+  printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
   printf (UT_VERBOSE);
 
   printf ("\n");

+ 3 - 3
plugins/check_disk.c

@@ -29,7 +29,7 @@
 const char *progname = "check_disk";
 const char *program_name = "check_disk";  /* Required for coreutils libs */
 const char *copyright = "1999-2008";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 
 #include "common.h"
@@ -877,7 +877,7 @@ print_help (void)
   printf (" %s\n", "-K, --icritical=PERCENT%");
   printf ("    %s\n", _("Exit with CRITICAL status if less than PERCENT of inode space is free"));
   printf (" %s\n", "-p, --path=PATH, --partition=PARTITION");
-  printf ("    %s\n", _("Path or partition (may be repeated)"));
+  printf ("    %s\n", _("Mounted path or partition (may be repeated)"));
   printf (" %s\n", "-x, --exclude_device=PATH <STRING>");
   printf ("    %s\n", _("Ignore device (only works if -p unspecified)"));
   printf (" %s\n", "-C, --clear");
@@ -911,7 +911,7 @@ print_help (void)
   printf ("    %s\n", _("Regular expression to ignore selected path/partition (case insensitive) (may be repeated)"));
   printf (" %s\n", "-i, --ignore-ereg-path=PATH, --ignore-ereg-partition=PARTITION");
   printf ("    %s\n", _("Regular expression to ignore selected path or partition (may be repeated)"));
-  printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+  printf (UT_PLUG_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
   printf (" %s\n", "-u, --units=STRING");
   printf ("    %s\n", _("Choose bytes, kB, MB, GB, TB (default: MB)"));
   printf (UT_VERBOSE);

+ 2 - 2
plugins/check_dns.c

@@ -31,7 +31,7 @@
 
 const char *progname = "check_dns";
 const char *copyright = "2000-2008";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "utils.h"
@@ -474,7 +474,7 @@ print_help (void)
   printf (" -c, --critical=seconds\n");
   printf ("    %s\n", _("Return critical if elapsed time exceeds value. Default off"));
 
-  printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+  printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 
   printf (UT_SUPPORT);
 }

+ 1 - 1
plugins/check_dummy.c

@@ -30,7 +30,7 @@
 
 const char *progname = "check_dummy";
 const char *copyright = "1999-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "utils.h"

+ 1 - 1
plugins/check_fping.c

@@ -31,7 +31,7 @@
 
 const char *progname = "check_fping";
 const char *copyright = "2000-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "popen.h"

+ 2 - 2
plugins/check_game.c

@@ -31,7 +31,7 @@
 
 const char *progname = "check_game";
 const char *copyright = "2002-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "utils.h"
@@ -312,7 +312,7 @@ print_help (void)
   printf (" %s\n", "-pf");
   printf ("    %s\n", _("Field number in raw qstat output that contains ping time"));
 
-  printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+  printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 
   printf ("\n");
   printf ("%s\n", _("Notes:"));

+ 1 - 1
plugins/check_hpjd.c

@@ -31,7 +31,7 @@
 
 const char *progname = "check_hpjd";
 const char *copyright = "2000-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "popen.h"

+ 7 - 7
plugins/check_http.c

@@ -35,7 +35,7 @@
 
 const char *progname = "check_http";
 const char *copyright = "1999-2013";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "netutils.h"
@@ -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)"));
@@ -1534,7 +1534,7 @@ print_help (void)
 
   printf (UT_WARN_CRIT);
 
-  printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+  printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 
   printf (UT_VERBOSE);
 

+ 6 - 5
plugins/check_ide_smart.c

@@ -35,7 +35,7 @@
 
 const char *progname = "check_ide_smart";
 const char *copyright = "1998-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 	
 #include "common.h"
 #include "utils.h"
@@ -281,11 +281,12 @@ main (int argc, char *argv[])
 		smart_read_values (fd, &values);
 		smart_read_thresholds (fd, &thresholds);
 		retval = nagios (&values, &thresholds);
+		printf( _("-n, This flag is depricated, and will be removed in a future release. Nagios output is now the default.\n") );
 		break;
 	default:
 		smart_read_values (fd, &values);
 		smart_read_thresholds (fd, &thresholds);
-		print_values (&values, &thresholds);
+		retval = nagios (&values, &thresholds);
 		break;
 	}
 	close (fd);
@@ -368,7 +369,7 @@ values_not_passed (values_t * p, thresholds_t * t)
 	int i;
 	for (i = 0; i < NR_ATTRIBUTES; i++) {
 		if (value->id && threshold->id && value->id == threshold->id) {
-			if (value->value <= threshold->threshold) {
+			if (value->value < threshold->threshold) {
 				++failed;
 			}
 			else {
@@ -397,7 +398,7 @@ nagios (values_t * p, thresholds_t * t)
 	int i;
 	for (i = 0; i < NR_ATTRIBUTES; i++) {
 		if (value->id && threshold->id && value->id == threshold->id) {
-			if (value->value <= threshold->threshold) {
+			if (value->value < threshold->threshold) {
 				++failed;
 				if (value->status & 1) {
 					status = PREFAILURE;
@@ -454,7 +455,7 @@ print_value (value_t * p, threshold_t * t)
 	printf ("Id=%3d, Status=%2d {%s , %s}, Value=%3d, Threshold=%3d, %s\n",
 					p->id, p->status, p->status & 1 ? "PreFailure" : "Advisory   ",
 					p->status & 2 ? "OnLine " : "OffLine", p->value, t->threshold,
-					p->value > t->threshold ? "Passed" : "Failed");
+					p->value >= t->threshold ? "Passed" : "Failed");
 }
 
 

+ 2 - 2
plugins/check_ldap.c

@@ -29,7 +29,7 @@
 /* progname may be check_ldaps */
 char *progname = "check_ldap";
 const char *copyright = "2000-2008";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "netutils.h"
@@ -430,7 +430,7 @@ print_help (void)
 
 	printf (UT_WARN_CRIT);
 
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 
 	printf (UT_VERBOSE);
 

+ 1 - 1
plugins/check_load.c

@@ -30,7 +30,7 @@
 
 const char *progname = "check_load";
 const char *copyright = "1999-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "utils.h"

+ 1 - 1
plugins/check_mrtg.c

@@ -31,7 +31,7 @@
 
 const char *progname = "check_mrtg";
 const char *copyright = "1999-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "utils.h"

+ 1 - 1
plugins/check_mrtgtraf.c

@@ -34,7 +34,7 @@
 
 const char *progname = "check_mrtgtraf";
 const char *copyright = "1999-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 int process_arguments (int, char **);
 int validate_arguments (void);

+ 1 - 1
plugins/check_mysql.c

@@ -32,7 +32,7 @@
 
 const char *progname = "check_mysql";
 const char *copyright = "1999-2011";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #define SLAVERESULTSIZE 70
 

+ 9 - 2
plugins/check_mysql_query.c

@@ -31,7 +31,7 @@
 
 const char *progname = "check_mysql_query";
 const char *copyright = "1999-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "utils.h"
@@ -152,7 +152,14 @@ main (int argc, char **argv)
 	} else if (status == STATE_CRITICAL) {
 		printf("QUERY %s: ", _("CRITICAL"));
 	}
-	printf(_("'%s' returned %f"), sql_query, value);
+	printf(_("'%s' returned %f | %s"), sql_query, value,
+	 fperfdata("result", value, "",
+	 my_thresholds->warning?TRUE:FALSE, my_thresholds->warning?my_thresholds->warning->end:0,
+	 my_thresholds->critical?TRUE:FALSE, my_thresholds->critical?my_thresholds->critical->end:0,
+	 FALSE, 0,
+	 FALSE, 0)
+	);
+
 	printf("\n");
 
 	return status;

+ 1 - 1
plugins/check_nagios.c

@@ -34,7 +34,7 @@
 
 const char *progname = "check_nagios";
 const char *copyright = "1999-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "runcmd.h"

+ 38 - 15
plugins/check_nt.c

@@ -34,7 +34,7 @@
 
 const char *progname = "check_nt";
 const char *copyright = "2000-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "netutils.h"
@@ -197,19 +197,40 @@ int main(int argc, char **argv){
 
 	case CHECK_UPTIME:
 
-		xasprintf(&send_buffer, "%s&3", req_password);
-		fetch_data (server_address, server_port, send_buffer);
-		uptime=strtoul(recv_buffer,NULL,10);
-		updays = uptime / 86400;
-		uphours = (uptime % 86400) / 3600;
-		upminutes = ((uptime % 86400) % 3600) / 60;
-		xasprintf(&output_message,_("System Uptime - %u day(s) %u hour(s) %u minute(s)"),updays,uphours, upminutes);
-		if (check_critical_value==TRUE && uptime <= critical_value)
-			return_code=STATE_CRITICAL;
-		else if (check_warning_value==TRUE && uptime <= warning_value)
-			return_code=STATE_WARNING;
-		else
-			return_code=STATE_OK;
+		if (value_list == NULL) {
+			value_list = "minutes";
+		}
+		if (strncmp(value_list, "seconds", strlen("seconds") + 1 ) && 
+			strncmp(value_list, "minutes", strlen("minutes") + 1) && 
+			strncmp(value_list, "hours", strlen("hours") + 1) && 
+			strncmp(value_list, "days", strlen("days") + 1)) {
+
+			output_message = strdup (_("wrong -l argument"));
+		} else {
+			xasprintf(&send_buffer, "%s&3", req_password);
+			fetch_data (server_address, server_port, send_buffer);
+			uptime=strtoul(recv_buffer,NULL,10);
+			updays = uptime / 86400;
+			uphours = (uptime % 86400) / 3600;
+			upminutes = ((uptime % 86400) % 3600) / 60;
+
+			if (!strncmp(value_list, "minutes", strlen("minutes")))
+				uptime = uptime / 60;
+			else if (!strncmp(value_list, "hours", strlen("hours")))
+				uptime = uptime / 3600;
+			else if (!strncmp(value_list, "days", strlen("days")))
+				uptime = uptime / 86400;
+			/* else uptime in seconds, nothing to do */
+
+			xasprintf(&output_message,_("System Uptime - %u day(s) %u hour(s) %u minute(s) |uptime=%lu"),updays, uphours, upminutes, uptime);
+
+			if (check_critical_value==TRUE && uptime <= critical_value)
+				return_code=STATE_CRITICAL;
+			else if (check_warning_value==TRUE && uptime <= warning_value)
+				return_code=STATE_WARNING;
+			else
+				return_code=STATE_OK;
+		}
 		break;
 
 	case CHECK_USEDDISKSPACE:
@@ -713,7 +734,9 @@ void print_help(void)
 	printf ("  %s\n", "ie: -l 60,90,95,120,90,95");
 	printf (" %s\n", "UPTIME =");
 	printf ("  %s\n", _("Get the uptime of the machine."));
-	printf ("  %s\n", _("No specific parameters. No warning or critical threshold"));
+	printf ("  %s\n", _("-l <unit> "));
+	printf ("  %s\n", _("<unit> = seconds, minutes, hours, or days. (default: minutes)"));
+	printf ("  %s\n", _("Thresholds will use the unit specified above."));
 	printf (" %s\n", "USEDDISKSPACE =");
 	printf ("  %s\n", _("Size and percentage of disk use."));
 	printf ("  %s\n", _("Request a -l parameter containing the drive letter only."));

+ 5 - 3
plugins/check_ntp.c

@@ -32,7 +32,7 @@
 
 const char *progname = "check_ntp";
 const char *copyright = "2006-2008";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "netutils.h"
@@ -54,7 +54,9 @@ void print_help (void);
 void print_usage (void);
 
 /* number of times to perform each request to get a good average. */
+#ifndef AVG_NUM
 #define AVG_NUM 4
+#endif
 
 /* max size of control message data */
 #define MAX_CM_SIZE 468
@@ -480,7 +482,7 @@ double offset_request(const char *host, int *status){
 	} else {
 		/* finally, calculate the average offset */
 		for(i=0; i<servers[best_index].num_responses;i++){
-			avg_offset+=servers[best_index].offset[j];
+			avg_offset+=servers[best_index].offset[i];
 		}
 		avg_offset/=servers[best_index].num_responses;
 	}
@@ -858,7 +860,7 @@ void print_help(void){
 	printf ("    %s\n", _("Warning threshold for jitter"));
 	printf (" %s\n", "-k, --jcrit=THRESHOLD");
 	printf ("    %s\n", _("Critical threshold for jitter"));
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 	printf (UT_VERBOSE);
 
 	printf("\n");

+ 2 - 2
plugins/check_ntp_peer.c

@@ -37,7 +37,7 @@
 
 const char *progname = "check_ntp_peer";
 const char *copyright = "2006-2008";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "netutils.h"
@@ -686,7 +686,7 @@ void print_help(void){
 	printf ("    %s\n", _("Warning threshold for number of usable time sources (\"truechimers\")"));
 	printf (" %s\n", "-n, --tcrit=THRESHOLD");
 	printf ("    %s\n", _("Critical threshold for number of usable time sources (\"truechimers\")"));
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 	printf (UT_VERBOSE);
 
 	printf("\n");

+ 2 - 2
plugins/check_ntp_time.c

@@ -36,7 +36,7 @@
 
 const char *progname = "check_ntp_time";
 const char *copyright = "2006-2008";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "netutils.h"
@@ -614,7 +614,7 @@ void print_help(void){
 	printf ("    %s\n", _("Offset to result in warning status (seconds)"));
 	printf (" %s\n", "-c, --critical=THRESHOLD");
 	printf ("    %s\n", _("Offset to result in critical status (seconds)"));
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 	printf (UT_VERBOSE);
 
 	printf("\n");

+ 2 - 2
plugins/check_nwstat.c

@@ -31,7 +31,7 @@
 
 const char *progname = "check_nwstat";
 const char *copyright = "2000-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "netutils.h"
@@ -1664,7 +1664,7 @@ void print_help(void)
   printf (" %s\n", "-o, --osversion");
   printf ("    %s\n", _("Include server version string in results"));
 
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 
   printf ("\n");
   printf ("%s\n", _("Notes:"));

+ 2 - 2
plugins/check_overcr.c

@@ -31,7 +31,7 @@
 
 const char *progname = "check_overcr";
 const char *copyright = "2000-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "netutils.h"
@@ -442,7 +442,7 @@ print_help (void)
   printf ("    %s\n", _("NET<port>     = number of active connections on TCP port <port>"));
   printf ("    %s\n", _("UPTIME        = system uptime in seconds"));
 
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 
   printf (UT_VERBOSE);
 

+ 2 - 2
plugins/check_pgsql.c

@@ -30,7 +30,7 @@
 
 const char *progname = "check_pgsql";
 const char *copyright = "1999-2011";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "utils.h"
@@ -524,7 +524,7 @@ print_help (void)
 
 	printf (UT_WARN_CRIT);
 
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 
 	printf (" %s\n", "-q, --query=STRING");
 	printf ("    %s\n", _("SQL query to run. Only first column in first row will be read"));

+ 7 - 3
plugins/check_ping.c

@@ -30,7 +30,7 @@
 
 const char *progname = "check_ping";
 const char *copyright = "2000-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "netutils.h"
@@ -482,7 +482,11 @@ run_ping (const char *cmd, const char *addr)
 	/* check stderr, setting at least WARNING if there is output here */
 	/* Add warning into warn_text */
 	while (fgets (buf, MAX_INPUT_BUFFER - 1, child_stderr)) {
-		if (! strstr(buf,"WARNING - no SO_TIMESTAMP support, falling back to SIOCGSTAMP")) {
+		if (
+			! strstr(buf,"WARNING - no SO_TIMESTAMP support, falling back to SIOCGSTAMP")
+			&& ! strstr(buf,"Warning: time of day goes back")
+
+		) {
 			if (verbose >= 3) {
 				printf("Got stderr: %s", buf);
 			}
@@ -581,7 +585,7 @@ print_help (void)
   printf (" %s\n", "-L, --link");
   printf ("    %s\n", _("show HTML in the plugin output (obsoleted by urlize)"));
 
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 
   printf ("\n");
 	printf ("%s\n", _("THRESHOLD is <rta>,<pl>% where <rta> is the round trip average travel"));

+ 2 - 2
plugins/check_procs.c

@@ -34,7 +34,7 @@
 const char *progname = "check_procs";
 const char *program_name = "check_procs";  /* Required for coreutils libs */
 const char *copyright = "2000-2008";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "utils.h"
@@ -715,7 +715,7 @@ print_help (void)
 #if defined( __linux__ )
 	printf ("  %s\n", _("ELAPSED - time elapsed in seconds"));
 #endif /* defined(__linux__) */
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_PLUG_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 
 	printf (" %s\n", "-v, --verbose");
   printf ("    %s\n", _("Extra information. Up to 3 verbosity levels"));

+ 2 - 2
plugins/check_radius.c

@@ -30,7 +30,7 @@
 
 const char *progname = "check_radius";
 const char *copyright = "2000-2008";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "utils.h"
@@ -361,7 +361,7 @@ print_help (void)
   printf (" %s\n", "-r, --retries=INTEGER");
   printf ("    %s\n", _("Number of times to retry a failed connection"));
 
-	printf (UT_TIMEOUT, timeout_interval);
+	printf (UT_CONN_TIMEOUT, timeout_interval);
 
   printf ("\n");
   printf ("%s\n", _("This plugin tests a RADIUS server to see if it is accepting connections."));

+ 2 - 2
plugins/check_real.c

@@ -30,7 +30,7 @@
 
 const char *progname = "check_real";
 const char *copyright = "2000-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "netutils.h"
@@ -429,7 +429,7 @@ print_help (void)
 
 	printf (UT_WARN_CRIT);
 
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 
 	printf (UT_VERBOSE);
 

+ 2 - 2
plugins/check_smtp.c

@@ -30,7 +30,7 @@
 
 const char *progname = "check_smtp";
 const char *copyright = "2000-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "netutils.h"
@@ -822,7 +822,7 @@ print_help (void)
    
 	printf (UT_WARN_CRIT);
 
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 
 	printf (UT_VERBOSE);
 

+ 2 - 2
plugins/check_snmp.c

@@ -30,7 +30,7 @@
 
 const char *progname = "check_snmp";
 const char *copyright = "1999-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "runcmd.h"
@@ -1160,7 +1160,7 @@ print_help (void)
 	printf (" %s\n", "-D, --output-delimiter=STRING");
 	printf ("    %s\n", _("Separates output on multiple OID requests"));
 
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 	printf (" %s\n", "-e, --retries=INTEGER");
 	printf ("    %s\n", _("Number of retries to be used in the requests"));
 

+ 4 - 2
plugins/check_ssh.c

@@ -30,7 +30,7 @@
 
 const char *progname = "check_ssh";
 const char *copyright = "2000-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "netutils.h"
@@ -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);
 	}
@@ -291,7 +293,7 @@ print_help (void)
 
 	printf (UT_IPv46);
 
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 
 	printf (" %s\n", "-r, --remote-version=STRING");
   printf ("    %s\n", _("Warn if string doesn't match expected server version (ex: OpenSSH_3.9p1)"));

+ 6 - 3
plugins/check_swap.c

@@ -29,7 +29,7 @@
 
 const char *progname = "check_swap";
 const char *copyright = "2000-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "popen.h"
@@ -346,8 +346,11 @@ main (int argc, char **argv)
 # endif /* HAVE_SWAP */
 #endif /* HAVE_PROC_MEMINFO */
 
-	/* if total_swap_mb == 0, let's not divide by 0 */
-	if(total_swap_mb) {
+	/* if total_swap_mb == 0, swap is most likely missing or disabled and should go critical */
+	if(total_swap_mb == 0) {
+		percent_used = 100;
+		status = "- Swap is either disabled, not present, or of zero size. ";
+	} else if(total_swap_mb > 0) {
 		percent_used = 100 * ((double) used_swap_mb) / ((double) total_swap_mb);
 	} else {
 		percent_used = 0;

+ 2 - 2
plugins/check_tcp.c

@@ -30,7 +30,7 @@
 /* progname "check_tcp" changes depending on symlink called */
 char *progname;
 const char *copyright = "1999-2008";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include <ctype.h>
 
@@ -670,7 +670,7 @@ print_help (void)
 
 	printf (UT_WARN_CRIT);
 
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 
 	printf (UT_VERBOSE);
 

+ 2 - 2
plugins/check_time.c

@@ -30,7 +30,7 @@
 
 const char *progname = "check_time";
 const char *copyright = "1999-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "netutils.h"
@@ -358,7 +358,7 @@ print_help (void)
   printf (" %s\n", "-C, --critical-connect=INTEGER");
   printf ("   %s\n", _("Response time (sec.) necessary to result in critical status"));
 
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 
 	printf (UT_SUPPORT);
 }

+ 2 - 2
plugins/check_ups.c

@@ -34,7 +34,7 @@
 
 const char *progname = "check_ups";
 const char *copyright = "2000-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "netutils.h"
@@ -625,7 +625,7 @@ print_help (void)
 
 	printf (UT_WARN_CRIT);
 
-	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
+	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 
 /* TODO: -v clashing with -v/-variable. Commenting out help text since verbose
          is unused up to now */

+ 1 - 1
plugins/check_users.c

@@ -32,7 +32,7 @@
 
 const char *progname = "check_users";
 const char *copyright = "2000-2007";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "utils.h"

+ 2 - 2
plugins/negate.c

@@ -31,7 +31,7 @@
 
 const char *progname = "negate";
 const char *copyright = "2002-2008";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #define DEFAULT_TIMEOUT 11
 
@@ -252,7 +252,7 @@ print_help (void)
 
 	printf (UT_HELP_VRSN);
 
-	printf (UT_TIMEOUT, timeout_interval);
+	printf (UT_PLUG_TIMEOUT, timeout_interval);
 	printf ("    %s\n", _("Keep timeout longer than the plugin timeout to retain CRITICAL status."));
 	printf (" -T, --timeout-result=STATUS\n");
 	printf ("    %s\n", _("Custom result on Negate timeouts; see below for STATUS definition\n"));

+ 1 - 1
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"

+ 13 - 5
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

+ 1 - 1
plugins/urlize.c

@@ -32,7 +32,7 @@
 
 const char *progname = "urlize";
 const char *copyright = "2000-2006";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
+const char *email = "devel@nagios-plugins.org";
 
 #include "common.h"
 #include "utils.h"

+ 11 - 6
plugins/utils.h

@@ -173,14 +173,19 @@ char *fperfdata (const char *,
  -c, --critical=RANGE\n\
     Critical range\n")
 
-#define UT_TIMEOUT _("\
+#define UT_CONN_TIMEOUT _("\
  -t, --timeout=INTEGER\n\
     Seconds before connection times out (default: %d)\n")
 
+#define UT_PLUG_TIMEOUT _("\
+ -t, --timeout=INTEGER\n\
+    Seconds before plugin times out (default: %d)\n")
+
 #ifdef NP_EXTRA_OPTS
 #define UT_EXTRA_OPTS _("\
  --extra-opts=[section][@file]\n\
-    Read options from an ini file. See http://nagiosplugins.org/extra-opts\n\
+    Read options from an ini file. See\n\
+    https://www.nagios-plugins.org/doc/extra-opts.html\n\
     for usage and examples.\n")
 #else
 #define UT_EXTRA_OPTS ""
@@ -188,13 +193,13 @@ char *fperfdata (const char *,
 
 #define UT_THRESHOLDS_NOTES _("\
  See:\n\
- http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT\n\
+ https://www.nagios-plugins.org/doc/guidelines.html#THRESHOLDFORMAT\n\
  for THRESHOLD format and examples.\n")
 
 #define UT_SUPPORT _("\n\
-Send email to nagios-users@lists.sourceforge.net if you have questions\n\
-regarding use of this software. To submit patches or suggest improvements,\n\
-send email to nagiosplug-devel@lists.sourceforge.net\n\n")
+Send email to help@nagios-plugins.org if you have questions regarding use\n\
+of this software. To submit patches or suggest improvements, send email to\n\
+devel@nagios-plugins.org\n\n")
 
 #define UT_NOWARRANTY _("\n\
 The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\n\

+ 1 - 1
po/Makevars

@@ -25,5 +25,5 @@ COPYRIGHT_HOLDER = Nagios Plugin Development Group
 EXTRA_LOCALE_CATEGORIES =
 
 # Email address were to send bug report for the .po translation files
-PACKAGE_BUGREPORT = nagiosplug-devel@lists.sourceforge.net
+PACKAGE_BUGREPORT = devel@nagios-plugins.org
 

+ 5 - 5
po/de.po

@@ -8,7 +8,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: nagiosplug\n"
-"Report-Msgid-Bugs-To: nagiosplug-devel@lists.sourceforge.net\n"
+"Report-Msgid-Bugs-To: devel@nagios-plugins.org\n"
 "POT-Creation-Date: 2010-07-09 19:30-0400\n"
 "PO-Revision-Date: 2004-12-23 17:46+0100\n"
 "Last-Translator:  <>\n"
@@ -5455,7 +5455,7 @@ msgstr ""
 #: plugins/utils.h:192
 msgid ""
 " See:\n"
-" http://nagiosplug.sourceforge.net/developer-guidelines."
+" https://www.nagios-plugins.org/doc/guidelines.html."
 "html#THRESHOLDFORMAT\n"
 " for THRESHOLD format and examples.\n"
 msgstr ""
@@ -5463,9 +5463,9 @@ msgstr ""
 #: plugins/utils.h:197
 msgid ""
 "\n"
-"Send email to nagios-users@lists.sourceforge.net if you have questions\n"
-"regarding use of this software. To submit patches or suggest improvements,\n"
-"send email to nagiosplug-devel@lists.sourceforge.net\n"
+"Send email to help@nagios-plugins.org if you have questions regarding use\n"
+"of this software. To submit patches or suggest improvements, send email to\n"
+"devel@nagios-plugins.org\n"
 "\n"
 msgstr ""
 

+ 8 - 8
po/fr.po

@@ -9,7 +9,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: fr\n"
-"Report-Msgid-Bugs-To: nagiosplug-devel@lists.sourceforge.net\n"
+"Report-Msgid-Bugs-To: devel@nagios-plugins.org\n"
 "POT-Creation-Date: 2010-07-09 19:30-0400\n"
 "PO-Revision-Date: 2010-04-21 23:38-0400\n"
 "Last-Translator: Thomas Guyot-Sionnest <dermoth@aei.ca>\n"
@@ -5584,29 +5584,29 @@ msgstr ""
 #: plugins/utils.h:192
 msgid ""
 " See:\n"
-" http://nagiosplug.sourceforge.net/developer-guidelines."
+" https://www.nagios-plugins.org/doc/guidelines.html."
 "html#THRESHOLDFORMAT\n"
 " for THRESHOLD format and examples.\n"
 msgstr ""
 " Voir:\n"
-" http://nagiosplug.sourceforge.net/developer-guidelines."
+" https://www.nagios-plugins.org/doc/guidelines.html."
 "html#THRESHOLDFORMAT\n"
 " pour le format et examples des seuils (THRESHOLD).\n"
 
 #: plugins/utils.h:197
 msgid ""
 "\n"
-"Send email to nagios-users@lists.sourceforge.net if you have questions\n"
-"regarding use of this software. To submit patches or suggest improvements,\n"
-"send email to nagiosplug-devel@lists.sourceforge.net\n"
+"Send email to help@nagios-plugins.org if you have questions regarding use\n"
+"of this software. To submit patches or suggest improvements, send email to\n"
+"devel@nagios-plugins.org\n"
 "\n"
 msgstr ""
 "\n"
-"Envoyez un email à nagios-users@lists.sourceforge.net si vous avez des "
+"Envoyez un email à help@nagios-plugins.org si vous avez des "
 "questions\n"
 "reliées à l'utilisation de ce logiciel. Pour envoyer des patches ou suggérer "
 "des\n"
-"améliorations, envoyez un email à nagiosplug-devel@lists.sourceforge.net\n"
+"améliorations, envoyez un email à devel@nagios-plugins.org\n"
 "\n"
 
 #: plugins/utils.h:202

+ 5 - 5
po/nagios-plugins.pot

@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: nagiosplug-devel@lists.sourceforge.net\n"
+"Report-Msgid-Bugs-To: devel@nagios-plugins.org\n"
 "POT-Creation-Date: 2012-02-16 17:35-0600\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@@ -5307,7 +5307,7 @@ msgstr ""
 #: plugins/utils.h:192
 msgid ""
 " See:\n"
-" http://nagiosplug.sourceforge.net/developer-guidelines."
+" https://www.nagios-plugins.org/doc/guidelines.html."
 "html#THRESHOLDFORMAT\n"
 " for THRESHOLD format and examples.\n"
 msgstr ""
@@ -5315,9 +5315,9 @@ msgstr ""
 #: plugins/utils.h:197
 msgid ""
 "\n"
-"Send email to nagios-users@lists.sourceforge.net if you have questions\n"
-"regarding use of this software. To submit patches or suggest improvements,\n"
-"send email to nagiosplug-devel@lists.sourceforge.net\n"
+"Send email to help@nagios-plugins.org if you have questions regarding use\n"
+"of this software. To submit patches or suggest improvements, send email to\n"
+"devel@nagios-plugins.org\n"
 "\n"
 msgstr ""