remove source-dist branch
This commit is contained in:
commit
27dcec3fa7
416 changed files with 128456 additions and 0 deletions
14
debian/patches/00list
vendored
Normal file
14
debian/patches/00list
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
06_checkircd
|
||||
10_config.h_debiandefaults.dpatch
|
||||
11_check_ups.c_perfdata_fix.dpatch
|
||||
12_check_mysql.c_mysql_options.dpatch
|
||||
13_subst.in_again.dpatch
|
||||
14_check_log_paths.dpatch
|
||||
15_check_mrtg_wtf_conditionals.dpatch
|
||||
16_check_smtp_protocolfix.dpatch
|
||||
17_check_smb_freespace.dpatch
|
||||
18_check_game_cmdline.dpatch
|
||||
19_check_disk_subdirs.dpatch
|
||||
20_check_ntp_lessbeastlyregex.dpatch
|
||||
21_de.po_fixes.dpatch
|
||||
22_check_smb_hostaddress.dpatch
|
33
debian/patches/02_utilspm.dpatch
vendored
Normal file
33
debian/patches/02_utilspm.dpatch
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh -e
|
||||
## 02_utilspm.dpatch by Guido Trotter <ultrotter@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Correct utils.pm script to begin with #!/usr/bin/perl
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
|
||||
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
|
||||
|
||||
case "$1" in
|
||||
-patch) patch $patch_opts -p1 < $0;;
|
||||
-unpatch) patch $patch_opts -p1 -R < $0;;
|
||||
*)
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad /home/ultrotter/docs/projects/deb/nagios/nagios-plugins-1.3.1/plugins-scripts/utils.pm.in nagios-plugins-1.3.1/plugins-scripts/utils.pm.in
|
||||
--- /home/ultrotter/docs/projects/deb/nagios/nagios-plugins-1.3.1/plugins-scripts/utils.pm.in 2003-02-03 21:29:55.000000000 +0100
|
||||
+++ nagios-plugins-1.3.1/plugins-scripts/utils.pm.in 2004-02-01 10:42:54.000000000 +0100
|
||||
@@ -1,3 +1,4 @@
|
||||
+#!/usr/bin/perl
|
||||
# Utility drawer for Nagios plugins.
|
||||
# $Id$
|
||||
#
|
45
debian/patches/06_checkircd.dpatch
vendored
Normal file
45
debian/patches/06_checkircd.dpatch
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
#! /bin/sh -e
|
||||
## 06_checkircd.dpatch by <ultrotter@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
|
||||
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
|
||||
|
||||
case "$1" in
|
||||
-patch) patch -p1 ${patch_opts} < $0;;
|
||||
-unpatch) patch -R -p1 ${patch_opts} < $0;;
|
||||
*)
|
||||
echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad /home/ultrotter/docs/projects/deb/nagios/new/nagios-plugins-1.3.1.0/plugins-scripts/check_ircd.pl nagios-plugins-1.3.1.0/plugins-scripts/check_ircd.pl
|
||||
--- /home/ultrotter/docs/projects/deb/nagios/new/nagios-plugins-1.3.1.0/plugins-scripts/check_ircd.pl 2002-05-07 07:35:49.000000000 +0200
|
||||
+++ nagios-plugins-1.3.1.0/plugins-scripts/check_ircd.pl 2004-08-12 15:54:50.000000000 +0200
|
||||
@@ -148,7 +148,6 @@
|
||||
my $proto = getprotobyname('tcp');
|
||||
my $sockaddr;
|
||||
my $this;
|
||||
- my $thisaddr = gethostbyname($in_hostname);
|
||||
my $that;
|
||||
my ($name, $aliases,$type,$len,$thataddr) = gethostbyname($in_remotehost);
|
||||
# ($name,$aliases,$type,$len,$thisaddr) = gethostbyname($in_hostname);
|
||||
@@ -158,7 +157,7 @@
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
$sockaddr = 'S n a4 x8';
|
||||
- $this = pack($sockaddr, AF_INET, 0, $thisaddr);
|
||||
+ $this = pack($sockaddr, AF_INET, 0, INADDR_ANY);
|
||||
$that = pack($sockaddr, AF_INET, $in_remoteport, $thataddr);
|
||||
if (!bind(ClientSocket, $this)) {
|
||||
print "IRCD UNKNOWN: Could not bind socket ($!)\n";
|
82
debian/patches/10_config.h_debiandefaults.dpatch
vendored
Executable file
82
debian/patches/10_config.h_debiandefaults.dpatch
vendored
Executable file
|
@ -0,0 +1,82 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 10_config.h_debiandefaults.dpatch by <seanius@localhost.localdomain>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad sid~/configure sid/configure
|
||||
--- sid~/configure 2005-09-30 15:56:02.000000000 +0200
|
||||
+++ sid/configure 2005-10-31 21:15:42.000000000 +0100
|
||||
@@ -7760,7 +7760,7 @@
|
||||
fi;
|
||||
|
||||
|
||||
-EXTRAS=
|
||||
+#EXTRAS=
|
||||
|
||||
LDFLAGS="$LDFLAGS -L."
|
||||
|
||||
diff -urNad sid~/np-debian.h sid/np-debian.h
|
||||
--- sid~/np-debian.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ sid/np-debian.h 2005-10-31 21:15:42.000000000 +0100
|
||||
@@ -0,0 +1,25 @@
|
||||
+#ifndef _NP_DEBIAN_H_
|
||||
+#define _NP_DEBIAN_H_
|
||||
+
|
||||
+#undef PATH_TO_MAILQ
|
||||
+#define PATH_TO_MAILQ "/usr/bin/mailq"
|
||||
+
|
||||
+#undef SSH_COMMAND
|
||||
+#define SSH_COMMAND "/usr/bin/ssh"
|
||||
+
|
||||
+#undef PATH_TO_FPING
|
||||
+#define PATH_TO_FPING "/usr/bin/fping"
|
||||
+
|
||||
+#undef PATH_TO_QSTAT
|
||||
+#define PATH_TO_QSTAT "/usr/bin/quakestat"
|
||||
+
|
||||
+#undef PATH_TO_SMBCLIENT
|
||||
+#define PATH_TO_SMBCLIENT "/usr/bin/smbclient"
|
||||
+
|
||||
+#undef PATH_TO_NTPDATE
|
||||
+#define PATH_TO_NTPDATE "/usr/sbin/ntpdate"
|
||||
+
|
||||
+#undef PATH_TO_NTPQ
|
||||
+#define PATH_TO_NTPQ "/usr/bin/ntpq"
|
||||
+
|
||||
+#endif /* _NP_DEBIAN_H_ */
|
||||
diff -urNad sid~/plugins/common.h sid/plugins/common.h
|
||||
--- sid~/plugins/common.h 2004-12-10 01:13:43.000000000 +0100
|
||||
+++ sid/plugins/common.h 2005-10-31 21:16:22.000000000 +0100
|
||||
@@ -33,6 +33,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
+#include "np-debian.h"
|
||||
|
||||
#ifdef HAVE_FEATURES_H
|
||||
#include <features.h>
|
||||
diff -urNad sid~/plugins-scripts/utils.pm.in sid/plugins-scripts/utils.pm.in
|
||||
--- sid~/plugins-scripts/utils.pm.in 2003-04-13 06:25:36.000000000 +0200
|
||||
+++ sid/plugins-scripts/utils.pm.in 2005-10-31 21:15:42.000000000 +0100
|
||||
@@ -35,13 +35,13 @@
|
||||
sub is_hostname;
|
||||
|
||||
## updated by autoconf
|
||||
-$PATH_TO_RPCINFO = "@PATH_TO_RPCINFO@" ;
|
||||
-$PATH_TO_NTPDATE = "@PATH_TO_NTPDATE@" ;
|
||||
-$PATH_TO_NTPDC = "@PATH_TO_NTPDC@" ;
|
||||
-$PATH_TO_NTPQ = "@PATH_TO_NTPQ@" ;
|
||||
+$PATH_TO_RPCINFO = "/usr/bin/rpcinfo";
|
||||
+$PATH_TO_NTPDATE = "/usr/sbin/ntpdate";
|
||||
+$PATH_TO_NTPDC = "/usr/bin/ntpdc";
|
||||
+$PATH_TO_NTPQ = "/usr/bin/ntpq";
|
||||
$PATH_TO_LMSTAT = "@PATH_TO_LMSTAT@" ;
|
||||
-$PATH_TO_SMBCLIENT = "@PATH_TO_SMBCLIENT@" ;
|
||||
-$PATH_TO_MAILQ = "@PATH_TO_MAILQ@";
|
||||
+$PATH_TO_SMBCLIENT = "/usr/bin/smbclient";
|
||||
+$PATH_TO_MAILQ = "/usr/bin/mailq";
|
||||
$PATH_TO_QMAIL_QSTAT = "@PATH_TO_QMAIL_QSTAT@";
|
||||
|
||||
## common variables
|
47
debian/patches/11_check_ups.c_perfdata_fix.dpatch
vendored
Executable file
47
debian/patches/11_check_ups.c_perfdata_fix.dpatch
vendored
Executable file
|
@ -0,0 +1,47 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 11_check_ups.c_perfdata_fix.dpatch by <seanius@localhost.localdomain>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad sid~/plugins/check_ups.c sid/plugins/check_ups.c
|
||||
--- sid~/plugins/check_ups.c 2005-03-04 22:58:40.000000000 +0100
|
||||
+++ sid/plugins/check_ups.c 2005-10-06 14:43:10.000000000 +0200
|
||||
@@ -98,6 +98,7 @@
|
||||
int result = STATE_UNKNOWN;
|
||||
char *message;
|
||||
char *data;
|
||||
+ char *tunits;
|
||||
char temp_buffer[MAX_INPUT_BUFFER];
|
||||
double ups_utility_deviation = 0.0;
|
||||
int res;
|
||||
@@ -281,10 +282,12 @@
|
||||
else {
|
||||
supported_options |= UPS_TEMP;
|
||||
if (temp_output_c) {
|
||||
+ tunits="degC";
|
||||
ups_temperature = atof (temp_buffer);
|
||||
asprintf (&message, "%sTemp=%3.1fC", message, ups_temperature);
|
||||
}
|
||||
else {
|
||||
+ tunits="degF";
|
||||
ups_temperature = (atof (temp_buffer) * 1.8) + 32;
|
||||
asprintf (&message, "%sTemp=%3.1fF", message, ups_temperature);
|
||||
}
|
||||
@@ -297,13 +300,13 @@
|
||||
result = max_state (result, STATE_WARNING);
|
||||
}
|
||||
asprintf (&data, "%s %s", data,
|
||||
- perfdata ("temp", (long)ups_temperature, "degF",
|
||||
+ perfdata ("temp", (long)ups_temperature, tunits,
|
||||
check_warn, (long)(1000*warning_value),
|
||||
check_crit, (long)(1000*critical_value),
|
||||
TRUE, 0, FALSE, 0));
|
||||
} else {
|
||||
asprintf (&data, "%s %s", data,
|
||||
- perfdata ("temp", (long)ups_temperature, "degF",
|
||||
+ perfdata ("temp", (long)ups_temperature, tunits,
|
||||
FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0));
|
||||
}
|
||||
}
|
356
debian/patches/12_check_mysql.c_mysql_options.dpatch
vendored
Executable file
356
debian/patches/12_check_mysql.c_mysql_options.dpatch
vendored
Executable file
|
@ -0,0 +1,356 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 12_check_mysql.c_mysql_options.dpatch by <seanius@localhost.localdomain>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad sid2~/plugins/check_mysql.c sid2/plugins/check_mysql.c
|
||||
--- sid2~/plugins/check_mysql.c 2005-05-26 04:13:19.000000000 +0200
|
||||
+++ sid2/plugins/check_mysql.c 2005-10-07 22:23:07.000000000 +0200
|
||||
@@ -65,6 +65,8 @@
|
||||
/* initialize mysql */
|
||||
mysql_init (&mysql);
|
||||
|
||||
+ mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"client");
|
||||
+
|
||||
/* establish a connection to the server and error checking */
|
||||
if (!mysql_real_connect(&mysql,db_host,db_user,db_pass,db,db_port,NULL,0)) {
|
||||
if (mysql_errno (&mysql) == CR_UNKNOWN_HOST)
|
||||
diff -urNad sid2~/plugins/check_mysql.c.orig sid2/plugins/check_mysql.c.orig
|
||||
--- sid2~/plugins/check_mysql.c.orig 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ sid2/plugins/check_mysql.c.orig 2005-05-26 04:13:19.000000000 +0200
|
||||
@@ -0,0 +1,333 @@
|
||||
+/******************************************************************************
|
||||
+*
|
||||
+* CHECK_MYSQL.C
|
||||
+*
|
||||
+* Program: Mysql plugin for Nagios
|
||||
+* License: GPL
|
||||
+* Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at)
|
||||
+* portions (c) 2000 Karl DeBisschop (kdebisschop@users.sourceforge.net)
|
||||
+*
|
||||
+* $Id$
|
||||
+*
|
||||
+* Description:
|
||||
+*
|
||||
+* This plugin is for testing a mysql server.
|
||||
+******************************************************************************/
|
||||
+
|
||||
+const char *progname = "check_mysql";
|
||||
+const char *revision = "$Revision$";
|
||||
+const char *copyright = "1999-2004";
|
||||
+const char *email = "nagiosplug-devel@lists.sourceforge.net";
|
||||
+
|
||||
+#define SLAVERESULTSIZE 40
|
||||
+
|
||||
+#include "common.h"
|
||||
+#include "utils.h"
|
||||
+#include "netutils.h"
|
||||
+
|
||||
+#include <mysql/mysql.h>
|
||||
+#include <mysql/errmsg.h>
|
||||
+
|
||||
+char *db_user = NULL;
|
||||
+char *db_host = NULL;
|
||||
+char *db_pass = NULL;
|
||||
+char *db = NULL;
|
||||
+unsigned int db_port = MYSQL_PORT;
|
||||
+int check_slave = 0;
|
||||
+
|
||||
+int process_arguments (int, char **);
|
||||
+int validate_arguments (void);
|
||||
+void print_help (void);
|
||||
+void print_usage (void);
|
||||
+
|
||||
+
|
||||
+
|
||||
+int
|
||||
+main (int argc, char **argv)
|
||||
+{
|
||||
+
|
||||
+ MYSQL mysql;
|
||||
+ MYSQL_RES *res;
|
||||
+ MYSQL_ROW row;
|
||||
+
|
||||
+ /* should be status */
|
||||
+
|
||||
+ char *result = NULL;
|
||||
+ char slaveresult[SLAVERESULTSIZE];
|
||||
+
|
||||
+ setlocale (LC_ALL, "");
|
||||
+ bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
+ textdomain (PACKAGE);
|
||||
+
|
||||
+ if (process_arguments (argc, argv) == ERROR)
|
||||
+ usage4 (_("Could not parse arguments"));
|
||||
+
|
||||
+ /* initialize mysql */
|
||||
+ mysql_init (&mysql);
|
||||
+
|
||||
+ /* establish a connection to the server and error checking */
|
||||
+ if (!mysql_real_connect(&mysql,db_host,db_user,db_pass,db,db_port,NULL,0)) {
|
||||
+ if (mysql_errno (&mysql) == CR_UNKNOWN_HOST)
|
||||
+ die (STATE_WARNING, "%s\n", mysql_error (&mysql));
|
||||
+ else if (mysql_errno (&mysql) == CR_VERSION_ERROR)
|
||||
+ die (STATE_WARNING, "%s\n", mysql_error (&mysql));
|
||||
+ else if (mysql_errno (&mysql) == CR_OUT_OF_MEMORY)
|
||||
+ die (STATE_WARNING, "%s\n", mysql_error (&mysql));
|
||||
+ else if (mysql_errno (&mysql) == CR_IPSOCK_ERROR)
|
||||
+ die (STATE_WARNING, "%s\n", mysql_error (&mysql));
|
||||
+ else if (mysql_errno (&mysql) == CR_SOCKET_CREATE_ERROR)
|
||||
+ die (STATE_WARNING, "%s\n", mysql_error (&mysql));
|
||||
+ else
|
||||
+ die (STATE_CRITICAL, "%s\n", mysql_error (&mysql));
|
||||
+ }
|
||||
+
|
||||
+ /* get the server stats */
|
||||
+ result = strdup (mysql_stat (&mysql));
|
||||
+
|
||||
+ /* error checking once more */
|
||||
+ if (mysql_error (&mysql)) {
|
||||
+ if (mysql_errno (&mysql) == CR_SERVER_GONE_ERROR)
|
||||
+ die (STATE_CRITICAL, "%s\n", mysql_error (&mysql));
|
||||
+ else if (mysql_errno (&mysql) == CR_SERVER_LOST)
|
||||
+ die (STATE_CRITICAL, "%s\n", mysql_error (&mysql));
|
||||
+ else if (mysql_errno (&mysql) == CR_UNKNOWN_ERROR)
|
||||
+ die (STATE_CRITICAL, "%s\n", mysql_error (&mysql));
|
||||
+ }
|
||||
+
|
||||
+ if(check_slave) {
|
||||
+ /* check the slave status */
|
||||
+ if (mysql_query (&mysql, "show slave status") != 0) {
|
||||
+ mysql_close (&mysql);
|
||||
+ die (STATE_CRITICAL, _("slave query error: %s\n"), mysql_error (&mysql));
|
||||
+ }
|
||||
+
|
||||
+ /* store the result */
|
||||
+ if ( (res = mysql_store_result (&mysql)) == NULL) {
|
||||
+ mysql_close (&mysql);
|
||||
+ die (STATE_CRITICAL, _("slave store_result error: %s\n"), mysql_error (&mysql));
|
||||
+ }
|
||||
+
|
||||
+ /* fetch the first row */
|
||||
+ if ( (row = mysql_fetch_row (res)) == NULL) {
|
||||
+ mysql_free_result (res);
|
||||
+ mysql_close (&mysql);
|
||||
+ die (STATE_CRITICAL, _("slave fetch row error: %s\n"), mysql_error (&mysql));
|
||||
+ }
|
||||
+
|
||||
+ if (mysql_field_count (&mysql) == 12) {
|
||||
+ /* mysql 3.23.x */
|
||||
+ snprintf (slaveresult, SLAVERESULTSIZE, _("Slave running: %s"), row[6]);
|
||||
+ if (strcmp (row[6], "Yes") != 0) {
|
||||
+ mysql_free_result (res);
|
||||
+ mysql_close (&mysql);
|
||||
+ die (STATE_CRITICAL, "%s\n", slaveresult);
|
||||
+ }
|
||||
+
|
||||
+ } else {
|
||||
+ /* mysql 4.x.x */
|
||||
+ int slave_io_field = -1 , slave_sql_field = -1, i, num_fields;
|
||||
+ MYSQL_FIELD* fields;
|
||||
+
|
||||
+ num_fields = mysql_num_fields(res);
|
||||
+ fields = mysql_fetch_fields(res);
|
||||
+ for(i = 0; i < num_fields; i++)
|
||||
+ {
|
||||
+ if (0 == strcmp(fields[i].name, "Slave_IO_Running"))
|
||||
+ {
|
||||
+ slave_io_field = i;
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (0 == strcmp(fields[i].name, "Slave_SQL_Running"))
|
||||
+ {
|
||||
+ slave_sql_field = i;
|
||||
+ continue;
|
||||
+ }
|
||||
+ }
|
||||
+ if ((slave_io_field < 0) || (slave_sql_field < 0) || (num_fields == 0))
|
||||
+ {
|
||||
+ mysql_free_result (res);
|
||||
+ mysql_close (&mysql);
|
||||
+ die (STATE_CRITICAL, "Slave status unavailable\n");
|
||||
+ }
|
||||
+
|
||||
+ snprintf (slaveresult, SLAVERESULTSIZE, "Slave IO: %s Slave SQL: %s", row[slave_io_field], row[slave_sql_field]);
|
||||
+ if (strcmp (row[slave_io_field], "Yes") != 0 || strcmp (row[slave_sql_field], "Yes") != 0) {
|
||||
+ mysql_free_result (res);
|
||||
+ mysql_close (&mysql);
|
||||
+ die (STATE_CRITICAL, "%s\n", slaveresult);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* free the result */
|
||||
+ mysql_free_result (res);
|
||||
+ }
|
||||
+
|
||||
+ /* close the connection */
|
||||
+ mysql_close (&mysql);
|
||||
+
|
||||
+ /* print out the result of stats */
|
||||
+ if (check_slave) {
|
||||
+ printf ("%s %s\n", result, slaveresult);
|
||||
+ } else {
|
||||
+ printf ("%s\n", result);
|
||||
+ }
|
||||
+
|
||||
+ return STATE_OK;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/* process command-line arguments */
|
||||
+int
|
||||
+process_arguments (int argc, char **argv)
|
||||
+{
|
||||
+ int c;
|
||||
+
|
||||
+ int option = 0;
|
||||
+ static struct option longopts[] = {
|
||||
+ {"hostname", required_argument, 0, 'H'},
|
||||
+ {"database", required_argument, 0, 'd'},
|
||||
+ {"username", required_argument, 0, 'u'},
|
||||
+ {"password", required_argument, 0, 'p'},
|
||||
+ {"port", required_argument, 0, 'P'},
|
||||
+ {"check-slave", no_argument, 0, 'S'},
|
||||
+ {"verbose", no_argument, 0, 'v'},
|
||||
+ {"version", no_argument, 0, 'V'},
|
||||
+ {"help", no_argument, 0, 'h'},
|
||||
+ {0, 0, 0, 0}
|
||||
+ };
|
||||
+
|
||||
+ if (argc < 1)
|
||||
+ return ERROR;
|
||||
+
|
||||
+ while (1) {
|
||||
+ c = getopt_long (argc, argv, "hVSP:p:u:d:H:", longopts, &option);
|
||||
+
|
||||
+ if (c == -1 || c == EOF)
|
||||
+ break;
|
||||
+
|
||||
+ switch (c) {
|
||||
+ case 'H': /* hostname */
|
||||
+ if (is_host (optarg)) {
|
||||
+ db_host = optarg;
|
||||
+ }
|
||||
+ else {
|
||||
+ usage2 (_("Invalid hostname/address"), optarg);
|
||||
+ }
|
||||
+ break;
|
||||
+ case 'd': /* hostname */
|
||||
+ db = optarg;
|
||||
+ break;
|
||||
+ case 'u': /* username */
|
||||
+ db_user = optarg;
|
||||
+ break;
|
||||
+ case 'p': /* authentication information: password */
|
||||
+ db_pass = optarg;
|
||||
+ break;
|
||||
+ case 'P': /* critical time threshold */
|
||||
+ db_port = atoi (optarg);
|
||||
+ break;
|
||||
+ case 'S':
|
||||
+ check_slave = 1; /* check-slave */
|
||||
+ break;
|
||||
+ case 'V': /* version */
|
||||
+ print_revision (progname, revision);
|
||||
+ exit (STATE_OK);
|
||||
+ case 'h': /* help */
|
||||
+ print_help ();
|
||||
+ exit (STATE_OK);
|
||||
+ case '?': /* help */
|
||||
+ usage2 (_("Unknown argument"), optarg);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ c = optind;
|
||||
+
|
||||
+ while ( argc > c ) {
|
||||
+
|
||||
+ if (strlen(db_host) == 0)
|
||||
+ if (is_host (argv[c])) {
|
||||
+ db_host = argv[c++];
|
||||
+ }
|
||||
+ else {
|
||||
+ usage2 (_("Invalid hostname/address"), optarg);
|
||||
+ }
|
||||
+ else if (strlen(db_user) == 0)
|
||||
+ db_user = argv[c++];
|
||||
+ else if (strlen(db_pass) == 0)
|
||||
+ db_pass = argv[c++];
|
||||
+ else if (strlen(db) == 0)
|
||||
+ db = argv[c++];
|
||||
+ else if (is_intnonneg (argv[c]))
|
||||
+ db_port = atoi (argv[c++]);
|
||||
+ else
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return validate_arguments ();
|
||||
+}
|
||||
+
|
||||
+
|
||||
+int
|
||||
+validate_arguments (void)
|
||||
+{
|
||||
+ if (db_user == NULL)
|
||||
+ db_user = strdup("");
|
||||
+
|
||||
+ if (db_host == NULL)
|
||||
+ db_host = strdup("");
|
||||
+
|
||||
+ if (db_pass == NULL)
|
||||
+ db_pass == strdup("");
|
||||
+
|
||||
+ if (db == NULL)
|
||||
+ db = strdup("");
|
||||
+
|
||||
+ return OK;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+void
|
||||
+print_help (void)
|
||||
+{
|
||||
+ char *myport;
|
||||
+ asprintf (&myport, "%d", MYSQL_PORT);
|
||||
+
|
||||
+ print_revision (progname, revision);
|
||||
+
|
||||
+ printf (_(COPYRIGHT), copyright, email);
|
||||
+
|
||||
+ printf (_("This program tests connections to a mysql server\n"));
|
||||
+
|
||||
+ print_usage ();
|
||||
+
|
||||
+ printf (_(UT_HELP_VRSN));
|
||||
+
|
||||
+ printf (_(UT_HOST_PORT), 'P', myport);
|
||||
+
|
||||
+ printf (_("\
|
||||
+ -d, --database=STRING\n\
|
||||
+ Check database with indicated name\n\
|
||||
+ -u, --username=STRING\n\
|
||||
+ Connect using the indicated username\n\
|
||||
+ -p, --password=STRING\n\
|
||||
+ Use the indicated password to authenticate the connection\n\
|
||||
+ ==> IMPORTANT: THIS FORM OF AUTHENTICATION IS NOT SECURE!!! <==\n\
|
||||
+ Your clear-text password will be visible as a process table entry\n\
|
||||
+ -S, --check-slave\n\
|
||||
+ Check if the slave thread is running properly.\n"));
|
||||
+
|
||||
+ printf (_("\n\
|
||||
+There are no required arguments. By default, the local database with\n\
|
||||
+a server listening on MySQL standard port %d will be checked\n"), MYSQL_PORT);
|
||||
+
|
||||
+ printf (_(UT_SUPPORT));
|
||||
+}
|
||||
+
|
||||
+
|
||||
+void
|
||||
+print_usage (void)
|
||||
+{
|
||||
+ printf ("\
|
||||
+Usage: %s [-d database] [-H host] [-P port] [-u user] [-p password] [-S]\n",
|
||||
+ progname);
|
||||
+}
|
64
debian/patches/13_subst.in_again.dpatch
vendored
Executable file
64
debian/patches/13_subst.in_again.dpatch
vendored
Executable file
|
@ -0,0 +1,64 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 13_subst.in_again.dpatch by <seanius@localhost.localdomain>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad sid2~/plugins-scripts/subst.in sid2/plugins-scripts/subst.in
|
||||
--- sid2~/plugins-scripts/subst.in 2005-08-31 00:11:42.000000000 +0200
|
||||
+++ sid2/plugins-scripts/subst.in 2005-10-07 22:37:45.000000000 +0200
|
||||
@@ -1,35 +1,9 @@
|
||||
#!/usr/bin/awk
|
||||
|
||||
-function which(c,path) {
|
||||
- cmd = "test -x " c;
|
||||
-
|
||||
- if (system(cmd)==0) {
|
||||
- return c;
|
||||
- }
|
||||
-
|
||||
- sub(/\/.*\//,"",c);
|
||||
- for (dir in path) {
|
||||
- cmd = "test -x " path[dir] "/" c;
|
||||
- if (system(cmd)==0) {
|
||||
- return path[dir] "/" c;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
-
|
||||
- return c;
|
||||
-}
|
||||
-
|
||||
# used to replace "use lib utils.pm" with "use lib @libexecdir"
|
||||
#
|
||||
function led() {
|
||||
- led1 = "@libexecdir@";
|
||||
- led2 = "@exec_prefix@";
|
||||
- led3 = "@prefix@";
|
||||
- if ( match(led1, /^\$\{exec_prefix\}/ ) != 0 ) {
|
||||
- return "\"" led3 "/libexec\" " ;
|
||||
-
|
||||
- }
|
||||
- return "\"" led1 "\"" ;
|
||||
+ return "\"/usr/lib/nagios/plugins\"" ;
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
@@ -58,16 +32,6 @@
|
||||
sub(/\=.*$/,"='@with_trusted_path@' # autoconf-derived");
|
||||
}
|
||||
|
||||
-# If a script contains a reference to a fully qualified command,
|
||||
-# subst will replace the fully qualified command with whatever is
|
||||
-# returned from the which subroutine
|
||||
-#
|
||||
-/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// {
|
||||
- match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/);
|
||||
- c=substr($0,RSTART,RLENGTH);
|
||||
- sub(c,which(c,path));
|
||||
-}
|
||||
-
|
||||
{
|
||||
print;
|
||||
}
|
26
debian/patches/14_check_log_paths.dpatch
vendored
Executable file
26
debian/patches/14_check_log_paths.dpatch
vendored
Executable file
|
@ -0,0 +1,26 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 14_check_log_paths.dpatch by <seanius@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad nagios-plugins~/plugins-scripts/check_log.sh nagios-plugins/plugins-scripts/check_log.sh
|
||||
--- nagios-plugins~/plugins-scripts/check_log.sh 2005-02-04 00:51:35.000000000 +0100
|
||||
+++ nagios-plugins/plugins-scripts/check_log.sh 2005-10-09 17:29:46.000000000 +0200
|
||||
@@ -62,12 +62,12 @@
|
||||
|
||||
ECHO="/bin/echo"
|
||||
GREP="/bin/grep"
|
||||
-DIFF="/bin/diff"
|
||||
-TAIL="/bin/tail"
|
||||
+DIFF="/usr/bin/diff"
|
||||
+TAIL="/usr/bin/tail"
|
||||
CAT="/bin/cat"
|
||||
RM="/bin/rm"
|
||||
|
||||
-PROGNAME=`/bin/basename $0`
|
||||
+PROGNAME=`/usr/bin/basename $0`
|
||||
PROGPATH=`echo $0 | /bin/sed -e 's,[\\/][^\\/][^\\/]*$,,'`
|
||||
REVISION=`echo '$Revision$' | /bin/sed -e 's/[^0-9.]//g'`
|
||||
|
92
debian/patches/15_check_mrtg_wtf_conditionals.dpatch
vendored
Executable file
92
debian/patches/15_check_mrtg_wtf_conditionals.dpatch
vendored
Executable file
|
@ -0,0 +1,92 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 14_check_log_paths.dpatch by <seanius@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad nagios-plugins~/plugins/check_mrtg.c nagios-plugins/plugins/check_mrtg.c
|
||||
--- nagios-plugins~/plugins/check_mrtg.c 2004-12-26 00:17:44.000000000 +0100
|
||||
+++ nagios-plugins/plugins/check_mrtg.c 2005-10-26 23:15:37.000000000 +0200
|
||||
@@ -43,13 +43,12 @@
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
- int result = STATE_UNKNOWN;
|
||||
+ int result = STATE_OK;
|
||||
FILE *fp;
|
||||
int line;
|
||||
char input_buffer[MAX_INPUT_BUFFER];
|
||||
char *temp_buffer;
|
||||
time_t current_time;
|
||||
- char* message;
|
||||
time_t timestamp = 0L;
|
||||
unsigned long average_value_rate = 0L;
|
||||
unsigned long maximum_value_rate = 0L;
|
||||
@@ -112,43 +111,37 @@
|
||||
|
||||
/* if we couldn't read enough data, return an unknown error */
|
||||
if (line <= 2) {
|
||||
- result = STATE_UNKNOWN;
|
||||
- asprintf (&message, _("Unable to process MRTG log file\n"));
|
||||
+ printf (_("Unable to process MRTG log file\n"));
|
||||
+ return STATE_UNKNOWN;
|
||||
}
|
||||
|
||||
/* make sure the MRTG data isn't too old */
|
||||
- if (result == STATE_OK) {
|
||||
- time (¤t_time);
|
||||
- if (expire_minutes > 0
|
||||
- && (current_time - timestamp) > (expire_minutes * 60)) {
|
||||
- result = STATE_WARNING;
|
||||
- asprintf (&message, _("MRTG data has expired (%d minutes old)\n"),
|
||||
- (int) ((current_time - timestamp) / 60));
|
||||
- }
|
||||
+ time (¤t_time);
|
||||
+ if (expire_minutes > 0
|
||||
+ && (current_time - timestamp) > (expire_minutes * 60)) {
|
||||
+ printf (_("MRTG data has expired (%d minutes old)\n"),
|
||||
+ (int) ((current_time - timestamp) / 60));
|
||||
+ return STATE_WARNING;
|
||||
}
|
||||
|
||||
/* else check the incoming/outgoing rates */
|
||||
- if (result == STATE_OK) {
|
||||
- if (use_average == TRUE)
|
||||
- rate = average_value_rate;
|
||||
- else
|
||||
- rate = maximum_value_rate;
|
||||
-
|
||||
- if (rate > value_critical_threshold)
|
||||
- result = STATE_CRITICAL;
|
||||
- else if (rate > value_warning_threshold)
|
||||
- result = STATE_WARNING;
|
||||
+ if (use_average == TRUE)
|
||||
+ rate = average_value_rate;
|
||||
+ else
|
||||
+ rate = maximum_value_rate;
|
||||
|
||||
- asprintf (&message, "%s. %s = %lu %s|%s",
|
||||
- (use_average == TRUE) ? _("Avg") : _("Max"),
|
||||
- label, rate, units,
|
||||
- perfdata(label, (long) rate, units,
|
||||
- (int) value_warning_threshold, (long) value_warning_threshold,
|
||||
- (int) value_critical_threshold, (long) value_critical_threshold,
|
||||
- 0, 0, 0, 0));
|
||||
- }
|
||||
+ if (rate > value_critical_threshold)
|
||||
+ result = STATE_CRITICAL;
|
||||
+ else if (rate > value_warning_threshold)
|
||||
+ result = STATE_WARNING;
|
||||
|
||||
- printf ("%s\n", message);
|
||||
+ printf("%s. %s = %lu %s|%s\n",
|
||||
+ (use_average == TRUE) ? _("Avg") : _("Max"),
|
||||
+ label, rate, units,
|
||||
+ perfdata(label, (long) rate, units,
|
||||
+ (int) value_warning_threshold, (long) value_warning_threshold,
|
||||
+ (int) value_critical_threshold, (long) value_critical_threshold,
|
||||
+ 0, 0, 0, 0));
|
||||
|
||||
return result;
|
||||
}
|
202
debian/patches/16_check_smtp_protocolfix.dpatch
vendored
Executable file
202
debian/patches/16_check_smtp_protocolfix.dpatch
vendored
Executable file
|
@ -0,0 +1,202 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 16_check_smtp_protocolfix.dpatch by <seanius@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad nagios-plugins~/plugins/check_smtp.c nagios-plugins/plugins/check_smtp.c
|
||||
--- nagios-plugins~/plugins/check_smtp.c 2005-10-10 09:52:49.000000000 +0200
|
||||
+++ nagios-plugins/plugins/check_smtp.c 2005-10-10 09:54:53.000000000 +0200
|
||||
@@ -59,10 +59,17 @@
|
||||
enum {
|
||||
SMTP_PORT = 25
|
||||
};
|
||||
-const char *SMTP_EXPECT = "220";
|
||||
-const char *SMTP_HELO = "HELO ";
|
||||
-const char *SMTP_QUIT = "QUIT\r\n";
|
||||
-const char *SMTP_STARTTLS = "STARTTLS\r\n";
|
||||
+#define SMTP_EXPECT "220"
|
||||
+#define SMTP_HELO "HELO "
|
||||
+#define SMTP_EHLO "EHLO "
|
||||
+#define SMTP_QUIT "QUIT\r\n"
|
||||
+#define SMTP_STARTTLS "STARTTLS\r\n"
|
||||
+
|
||||
+#ifndef HOST_MAX_BYTES
|
||||
+#define HOST_MAX_BYTES 255
|
||||
+#endif
|
||||
+
|
||||
+#define EHLO_SUPPORTS_STARTTLS 1
|
||||
|
||||
int process_arguments (int, char **);
|
||||
int validate_arguments (void);
|
||||
@@ -101,6 +108,9 @@
|
||||
int check_critical_time = FALSE;
|
||||
int verbose = 0;
|
||||
int use_ssl = FALSE;
|
||||
+short use_ehlo = FALSE;
|
||||
+short ssl_established = TRUE;
|
||||
+char *localhostname = NULL;
|
||||
int sd;
|
||||
char buffer[MAX_INPUT_BUFFER];
|
||||
enum {
|
||||
@@ -112,7 +122,7 @@
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
-
|
||||
+ short supports_tls=FALSE;
|
||||
int n = 0;
|
||||
double elapsed_time;
|
||||
long microsec;
|
||||
@@ -120,6 +130,7 @@
|
||||
char *cmd_str = NULL;
|
||||
char *helocmd = NULL;
|
||||
struct timeval tv;
|
||||
+ struct hostent *hp;
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
@@ -129,12 +140,26 @@
|
||||
usage4 (_("Could not parse arguments"));
|
||||
|
||||
/* initialize the HELO command with the localhostname */
|
||||
-#ifndef HOST_MAX_BYTES
|
||||
-#define HOST_MAX_BYTES 255
|
||||
-#endif
|
||||
- helocmd = malloc (HOST_MAX_BYTES);
|
||||
- gethostname(helocmd, HOST_MAX_BYTES);
|
||||
- asprintf (&helocmd, "%s%s%s", SMTP_HELO, helocmd, "\r\n");
|
||||
+ if(! localhostname){
|
||||
+ localhostname = malloc (HOST_MAX_BYTES);
|
||||
+ if(!localhostname){
|
||||
+ printf(_("malloc() failed!\n"));
|
||||
+ return STATE_CRITICAL;
|
||||
+ }
|
||||
+ if(gethostname(localhostname, HOST_MAX_BYTES)){
|
||||
+ printf(_("gethostname() failed!\n"));
|
||||
+ return STATE_CRITICAL;
|
||||
+ }
|
||||
+ hp = gethostbyname(localhostname);
|
||||
+ if(!hp) helocmd = localhostname;
|
||||
+ else helocmd = hp->h_name;
|
||||
+ } else {
|
||||
+ helocmd = localhostname;
|
||||
+ }
|
||||
+ if(use_ehlo)
|
||||
+ asprintf (&helocmd, "%s%s%s", SMTP_EHLO, helocmd, "\r\n");
|
||||
+ else
|
||||
+ asprintf (&helocmd, "%s%s%s", SMTP_HELO, helocmd, "\r\n");
|
||||
|
||||
/* initialize the MAIL command with optional FROM command */
|
||||
asprintf (&cmd_str, "%sFROM: %s%s", mail_command, from_arg, "\r\n");
|
||||
@@ -178,11 +203,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
- /* send the HELO command */
|
||||
+ /* send the HELO/EHLO command */
|
||||
send(sd, helocmd, strlen(helocmd), 0);
|
||||
|
||||
/* allow for response to helo command to reach us */
|
||||
- read (sd, buffer, MAXBUF - 1);
|
||||
+ if(read (sd, buffer, MAXBUF - 1) < 0){
|
||||
+ printf (_("recv() failed\n"));
|
||||
+ return STATE_WARNING;
|
||||
+ } else if(use_ehlo){
|
||||
+ buffer[MAXBUF-1]='\0';
|
||||
+ if(strstr(buffer, "250 STARTTLS") != NULL ||
|
||||
+ strstr(buffer, "250-STARTTLS") != NULL){
|
||||
+ supports_tls=TRUE;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if(use_ssl && ! supports_tls){
|
||||
+ printf(_("WARNING - TLS not supported by server\n"));
|
||||
+ send (sd, SMTP_QUIT, strlen (SMTP_QUIT), 0);
|
||||
+ return STATE_WARNING;
|
||||
+ }
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
if(use_ssl) {
|
||||
@@ -192,11 +232,14 @@
|
||||
recv(sd,buffer, MAX_INPUT_BUFFER-1, 0); /* wait for it */
|
||||
if (!strstr (buffer, server_expect)) {
|
||||
printf (_("Server does not support STARTTLS\n"));
|
||||
+ send (sd, SMTP_QUIT, strlen (SMTP_QUIT), 0);
|
||||
return STATE_UNKNOWN;
|
||||
}
|
||||
if(connect_STARTTLS() != OK) {
|
||||
printf (_("CRITICAL - Cannot create SSL context.\n"));
|
||||
return STATE_CRITICAL;
|
||||
+ } else {
|
||||
+ ssl_established = TRUE;
|
||||
}
|
||||
if ( check_cert ) {
|
||||
if ((server_cert = SSL_get_peer_certificate (ssl)) != NULL) {
|
||||
@@ -333,6 +376,7 @@
|
||||
{"timeout", required_argument, 0, 't'},
|
||||
{"port", required_argument, 0, 'p'},
|
||||
{"from", required_argument, 0, 'f'},
|
||||
+ {"fqdn", required_argument, 0, 'F'},
|
||||
{"command", required_argument, 0, 'C'},
|
||||
{"response", required_argument, 0, 'R'},
|
||||
{"nocommand", required_argument, 0, 'n'},
|
||||
@@ -359,7 +403,7 @@
|
||||
}
|
||||
|
||||
while (1) {
|
||||
- c = getopt_long (argc, argv, "+hVv46t:p:f:e:c:w:H:C:R:SD:",
|
||||
+ c = getopt_long (argc, argv, "+hVv46t:p:f:e:c:w:H:C:R:SD:F:",
|
||||
longopts, &option);
|
||||
|
||||
if (c == -1 || c == EOF)
|
||||
@@ -380,6 +424,10 @@
|
||||
else
|
||||
usage4 (_("Port must be a positive integer"));
|
||||
break;
|
||||
+ case 'F':
|
||||
+ /* localhostname */
|
||||
+ localhostname = strdup(optarg);
|
||||
+ break;
|
||||
case 'f': /* from argument */
|
||||
from_arg = optarg;
|
||||
smtp_use_dummycmd = 1;
|
||||
@@ -439,6 +487,7 @@
|
||||
case 'S':
|
||||
/* starttls */
|
||||
use_ssl = TRUE;
|
||||
+ use_ehlo = TRUE;
|
||||
break;
|
||||
case 'D':
|
||||
/* Check SSL cert validity */
|
||||
@@ -581,7 +630,7 @@
|
||||
|
||||
/* Initialize SSL context */
|
||||
SSLeay_add_ssl_algorithms ();
|
||||
- meth = SSLv2_client_method ();
|
||||
+ meth = SSLv23_client_method ();
|
||||
SSL_load_error_strings ();
|
||||
if ((ctx = SSL_CTX_new (meth)) == NULL)
|
||||
{
|
||||
@@ -602,11 +651,6 @@
|
||||
{
|
||||
printf (_("CRITICAL - Cannot initiate SSL handshake.\n"));
|
||||
}
|
||||
- /* this causes a seg faul
|
||||
- not sure why, being sloppy
|
||||
- and commenting it out */
|
||||
- /* SSL_free (ssl); */
|
||||
- SSL_CTX_free(ctx);
|
||||
my_close();
|
||||
|
||||
return STATE_CRITICAL;
|
||||
@@ -708,7 +752,7 @@
|
||||
my_close (void)
|
||||
{
|
||||
#ifdef HAVE_SSL
|
||||
- if (use_ssl == TRUE) {
|
||||
+ if (use_ssl == TRUE && ssl_established == TRUE) {
|
||||
SSL_shutdown (ssl);
|
||||
SSL_free (ssl);
|
||||
SSL_CTX_free (ctx);
|
104
debian/patches/17_check_smb_freespace.dpatch
vendored
Executable file
104
debian/patches/17_check_smb_freespace.dpatch
vendored
Executable file
|
@ -0,0 +1,104 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 17_check_smb_freespace.dpatch by <seanius@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad nagios-plugins~/plugins-scripts/check_disk_smb.pl nagios-plugins/plugins-scripts/check_disk_smb.pl
|
||||
--- nagios-plugins~/plugins-scripts/check_disk_smb.pl 2005-10-11 09:31:55.000000000 +0200
|
||||
+++ nagios-plugins/plugins-scripts/check_disk_smb.pl 2005-10-11 09:33:17.000000000 +0200
|
||||
@@ -87,18 +87,55 @@
|
||||
my $crit = $1 if ($opt_c =~ /^([0-9]{1,2}\%?|100\%?|[0-9]+[kMG])$/);
|
||||
($crit) || usage("Invalid critical threshold: $opt_c\n");
|
||||
|
||||
+# split the type from the unit value
|
||||
+#Check $warn and $crit for type (%/M/G) and set up for tests
|
||||
+#P = Percent, K = KBytes
|
||||
+my $warn_type;
|
||||
+my $crit_type;
|
||||
+
|
||||
+if ($opt_w =~ /^([0-9]+)\%?$/) {
|
||||
+ $warn = "$1";
|
||||
+ $warn_type = "P";
|
||||
+} elsif ($opt_w =~ /^([0-9]+)k$/) {
|
||||
+ $warn_type = "K";
|
||||
+ $warn = $1;
|
||||
+} elsif ($opt_w =~ /^([0-9]+)M$/) {
|
||||
+ $warn_type = "K";
|
||||
+ $warn = $1 * 1024;
|
||||
+} elsif ($opt_w =~ /^([0-9]+)G$/) {
|
||||
+ $warn_type = "K";
|
||||
+ $warn = $1 * 1048576;
|
||||
+}
|
||||
+if ($opt_c =~ /^([0-9]+)\%?$/) {
|
||||
+ $crit = "$1";
|
||||
+ $crit_type = "P";
|
||||
+} elsif ($opt_c =~ /^([0-9]+)k$/) {
|
||||
+ $crit_type = "K";
|
||||
+ $crit = $1;
|
||||
+} elsif ($opt_c =~ /^([0-9]+)M$/) {
|
||||
+ $crit_type = "K";
|
||||
+ $crit = $1 * 1024;
|
||||
+} elsif ($opt_c =~ /^([0-9]+)G$/) {
|
||||
+ $crit_type = "K";
|
||||
+ $crit = $1 * 1048576;
|
||||
+}
|
||||
+
|
||||
# check if both warning and critical are percentage or size
|
||||
-unless( ( ($opt_w =~ /([0-9]){1,2}$/ ) && ($opt_c =~ /([0-9]){1,2}$/ ) )|| (( $opt_w =~ /[kMG]/ ) && ($opt_c =~ /[kMG]/) ) ){
|
||||
+unless( ( $warn_type eq "P" && $crit_type eq "P" ) || ( $warn_type ne "P" && $crit_type ne "P" ) ){
|
||||
+ $opt_w =~ s/\%/\%\%/g;
|
||||
+ $opt_c =~ s/\%/\%\%/g;
|
||||
usage("Both warning and critical should be same type- warning: $opt_w critical: $opt_c \n");
|
||||
}
|
||||
|
||||
# verify warning is less than critical
|
||||
-if ( $opt_w =~ /[kMG]/) {
|
||||
+if ( $warn_type eq "K") {
|
||||
unless ( $warn > $crit) {
|
||||
usage("Disk size: warning ($opt_w) should be greater than critical ($opt_c) \n");
|
||||
}
|
||||
}else{
|
||||
unless ( $warn < $crit) {
|
||||
+ $opt_w =~ s/\%/\%\%/g;
|
||||
+ $opt_c =~ s/\%/\%\%/g;
|
||||
usage("Percentage: warning ($opt_w) should be less than critical ($opt_c) \n");
|
||||
}
|
||||
}
|
||||
@@ -147,35 +184,6 @@
|
||||
my ($capper) = int(($3/$1)*100);
|
||||
my ($mountpt) = "\\\\$host\\$share";
|
||||
|
||||
- #Check $warn and $crit for type (%/M/G) and set up for tests
|
||||
- #P = Percent, K = KBytes
|
||||
- my $warn_type;
|
||||
- my $crit_type;
|
||||
-
|
||||
- if ($opt_w =~ /^([0-9]+$)/) {
|
||||
- $warn_type = "P";
|
||||
- } elsif ($opt_w =~ /^([0-9]+)k$/) {
|
||||
- $warn_type = "K";
|
||||
- $warn = $1;
|
||||
- } elsif ($opt_w =~ /^([0-9]+)M$/) {
|
||||
- $warn_type = "K";
|
||||
- $warn = $1 * 1024;
|
||||
- } elsif ($opt_w =~ /^([0-9]+)G$/) {
|
||||
- $warn_type = "K";
|
||||
- $warn = $1 * 1048576;
|
||||
- }
|
||||
- if ($opt_c =~ /^([0-9]+$)/) {
|
||||
- $crit_type = "P";
|
||||
- } elsif ($opt_c =~ /^([0-9]+)k$/) {
|
||||
- $crit_type = "K";
|
||||
- $crit = $1;
|
||||
- } elsif ($opt_c =~ /^([0-9]+)M$/) {
|
||||
- $crit_type = "K";
|
||||
- $crit = $1 * 1024;
|
||||
- } elsif ($opt_c =~ /^([0-9]+)G$/) {
|
||||
- $crit_type = "K";
|
||||
- $crit = $1 * 1048576;
|
||||
- }
|
||||
|
||||
if (int($avail / 1024) > 0) {
|
||||
$avail = int($avail / 1024);
|
21
debian/patches/18_check_game_cmdline.dpatch
vendored
Executable file
21
debian/patches/18_check_game_cmdline.dpatch
vendored
Executable file
|
@ -0,0 +1,21 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 18_check_game_cmdline.dpatch by <seanius@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad nagios-plugins~/plugins/check_game.c nagios-plugins/plugins/check_game.c
|
||||
--- nagios-plugins~/plugins/check_game.c 2005-10-11 16:45:44.000000000 +0200
|
||||
+++ nagios-plugins/plugins/check_game.c 2005-10-11 16:47:07.000000000 +0200
|
||||
@@ -328,8 +328,8 @@
|
||||
print_usage (void)
|
||||
{
|
||||
printf ("\
|
||||
-Usage: %s <game> <ip_address> [-p port] [-gf game_field] [-mf map_field]\n\
|
||||
- [-pf ping_field]\n", progname);
|
||||
+Usage: %s [-hvV] [-P port] [-t timeout] [-g game_field] [-m map_field]\n\
|
||||
+ [-p ping_field] [-G game-time] [-H hostname] <game> <ip_address>\n", progname);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
156
debian/patches/19_check_disk_subdirs.dpatch
vendored
Executable file
156
debian/patches/19_check_disk_subdirs.dpatch
vendored
Executable file
|
@ -0,0 +1,156 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 19_check_disk_subdirs.dpatch by <seanius@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad nagios-plugins~/plugins/check_disk.c nagios-plugins/plugins/check_disk.c
|
||||
--- nagios-plugins~/plugins/check_disk.c 2005-10-11 11:48:33.000000000 +0200
|
||||
+++ nagios-plugins/plugins/check_disk.c 2005-10-11 11:49:34.000000000 +0200
|
||||
@@ -64,6 +64,7 @@
|
||||
{
|
||||
char *name;
|
||||
int found;
|
||||
+ int found_len;
|
||||
uintmax_t w_df;
|
||||
uintmax_t c_df;
|
||||
double w_dfp;
|
||||
@@ -166,26 +167,56 @@
|
||||
if (process_arguments (argc, argv) == ERROR)
|
||||
usage4 (_("Could not parse arguments"));
|
||||
|
||||
- for (me = mount_list; me; me = me->me_next) {
|
||||
+ /* if a list of paths has been selected, preseed the list with
|
||||
+ * the longest matching filesystem name by iterating across
|
||||
+ * the mountlist once ahead of time. this will allow a query on
|
||||
+ * "/var/log" to return information about "/var" if no "/var/log"
|
||||
+ * filesystem exists, etc. this is the default behavior already
|
||||
+ * with df-based checks, but for systems with their own space
|
||||
+ * checking routines, this should make them more consistent.
|
||||
+ */
|
||||
+ if(path_select_list){
|
||||
+ for (me = mount_list; me; me = me->me_next) {
|
||||
+ walk_name_list(path_select_list, me->me_mountdir);
|
||||
+ walk_name_list(path_select_list, me->me_devname);
|
||||
+ }
|
||||
+ /* now pretend we never saw anything, but keep found_len.
|
||||
+ * thus future searches will only match the best match */
|
||||
+ for (temp_list = path_select_list; temp_list; temp_list=temp_list->name_next){
|
||||
+ temp_list->found=0;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
+ /* for every mount entry */
|
||||
+ for (me = mount_list; me; me = me->me_next) {
|
||||
+ /* if there's a list of paths to select, the current mount
|
||||
+ * entry matches in path or device name, get fs usage */
|
||||
if (path_select_list &&
|
||||
(walk_name_list (path_select_list, me->me_mountdir) ||
|
||||
- walk_name_list (path_select_list, me->me_devname) ) )
|
||||
+ walk_name_list (path_select_list, me->me_devname) ) ) {
|
||||
get_fs_usage (me->me_mountdir, me->me_devname, &fsp);
|
||||
- else if (dev_select_list || path_select_list)
|
||||
+ /* else if there's a list of paths/devices to select (but
|
||||
+ * we didn't match above) skip to the next mount entry */
|
||||
+ } else if (dev_select_list || path_select_list) {
|
||||
continue;
|
||||
- else if (me->me_remote && show_local_fs)
|
||||
+ /* skip remote filesystems if we're not interested in them */
|
||||
+ } else if (me->me_remote && show_local_fs) {
|
||||
continue;
|
||||
- else if (me->me_dummy && !show_all_fs)
|
||||
+ /* skip pseudo fs's if we haven't asked for all fs's */
|
||||
+ } else if (me->me_dummy && !show_all_fs) {
|
||||
continue;
|
||||
- else if (fs_exclude_list && walk_name_list (fs_exclude_list, me->me_type))
|
||||
+ /* skip excluded fstypes */
|
||||
+ } else if (fs_exclude_list && walk_name_list (fs_exclude_list, me->me_type)) {
|
||||
continue;
|
||||
- else if (dp_exclude_list &&
|
||||
+ /* skip excluded fs's */
|
||||
+ } else if (dp_exclude_list &&
|
||||
(walk_name_list (dp_exclude_list, me->me_devname) ||
|
||||
- walk_name_list (dp_exclude_list, me->me_mountdir)))
|
||||
+ walk_name_list (dp_exclude_list, me->me_mountdir))) {
|
||||
continue;
|
||||
- else
|
||||
+ /* otherwise, get fs usage */
|
||||
+ } else {
|
||||
get_fs_usage (me->me_mountdir, me->me_devname, &fsp);
|
||||
+ }
|
||||
|
||||
if (fsp.fsu_blocks && strcmp ("none", me->me_mountdir)) {
|
||||
usp = (double)(fsp.fsu_blocks - fsp.fsu_bavail) * 100 / fsp.fsu_blocks;
|
||||
@@ -229,7 +260,7 @@
|
||||
/* Override result if paths specified and not found */
|
||||
temp_list = path_select_list;
|
||||
while (temp_list) {
|
||||
- if (temp_list->found != TRUE) {
|
||||
+ if (!temp_list->found) {
|
||||
asprintf (&output, _("%s [%s not found]"), output, temp_list->name);
|
||||
result = STATE_CRITICAL;
|
||||
}
|
||||
@@ -285,6 +316,8 @@
|
||||
se = (struct name_list *) malloc (sizeof (struct name_list));
|
||||
se->name = strdup ("iso9660");
|
||||
se->name_next = NULL;
|
||||
+ se->found = 0;
|
||||
+ se->found_len = 0;
|
||||
*fstail = se;
|
||||
fstail = &se->name_next;
|
||||
|
||||
@@ -388,6 +421,8 @@
|
||||
se->c_df = c_df;
|
||||
se->w_dfp = w_dfp;
|
||||
se->c_dfp = c_dfp;
|
||||
+ se->found = 0;
|
||||
+ se->found_len = 0;
|
||||
*pathtail = se;
|
||||
pathtail = &se->name_next;
|
||||
break;
|
||||
@@ -399,6 +434,8 @@
|
||||
se->c_df = 0;
|
||||
se->w_dfp = -1.0;
|
||||
se->c_dfp = -1.0;
|
||||
+ se->found = 0;
|
||||
+ se->found_len = 0;
|
||||
*dptail = se;
|
||||
dptail = &se->name_next;
|
||||
break;
|
||||
@@ -410,6 +447,8 @@
|
||||
se->c_df = 0;
|
||||
se->w_dfp = -1.0;
|
||||
se->c_dfp = -1.0;
|
||||
+ se->found = 0;
|
||||
+ se->found_len = 0;
|
||||
*fstail = se;
|
||||
fstail = &se->name_next;
|
||||
break;
|
||||
@@ -458,6 +497,8 @@
|
||||
se->c_df = c_df;
|
||||
se->w_dfp = w_dfp;
|
||||
se->c_dfp = c_dfp;
|
||||
+ se->found =0;
|
||||
+ se->found_len = 0;
|
||||
*pathtail = se;
|
||||
}
|
||||
|
||||
@@ -549,9 +590,16 @@
|
||||
int
|
||||
walk_name_list (struct name_list *list, const char *name)
|
||||
{
|
||||
+ int name_len;
|
||||
+ name_len = strlen(name);
|
||||
while (list) {
|
||||
- if (! strcmp(list->name, name)) {
|
||||
+ /* if the paths match up to the length of the mount path,
|
||||
+ * AND if the mount path name is longer than the longest
|
||||
+ * found match, we have a new winner */
|
||||
+ if (name_len >= list->found_len &&
|
||||
+ ! strncmp(list->name, name, name_len)) {
|
||||
list->found = 1;
|
||||
+ list->found_len = name_len;
|
||||
/* if required for name_lists that have not saved w_df, etc (eg exclude lists) */
|
||||
if (list->w_df) w_df = list->w_df;
|
||||
if (list->c_df) c_df = list->c_df;
|
19
debian/patches/20_check_ntp_lessbeastlyregex.dpatch
vendored
Executable file
19
debian/patches/20_check_ntp_lessbeastlyregex.dpatch
vendored
Executable file
|
@ -0,0 +1,19 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 20_check_ntp_lessbeastlyregex.dpatch by <seanius@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad nagios-plugins~/plugins-scripts/check_ntp.pl nagios-plugins/plugins-scripts/check_ntp.pl
|
||||
--- nagios-plugins~/plugins-scripts/check_ntp.pl 2005-05-25 16:05:41.000000000 +0200
|
||||
+++ nagios-plugins/plugins-scripts/check_ntp.pl 2005-10-11 16:57:37.000000000 +0200
|
||||
@@ -293,7 +293,7 @@
|
||||
}
|
||||
|
||||
# match sys.peer or pps.peer
|
||||
- if (/^(\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z_().]+)\s+([-0-9.]+)\s+([lumb-]+)\s+([-0-9hm.]+)\s+([-0-9.mh]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) {
|
||||
+ if (/^(\*|o)(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)/) {
|
||||
$syspeer = $2;
|
||||
$stratum = $4;
|
||||
$jitter = $11;
|
48
debian/patches/21_de.po_fixes.dpatch
vendored
Executable file
48
debian/patches/21_de.po_fixes.dpatch
vendored
Executable file
|
@ -0,0 +1,48 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 21_de.po_fixes.dpatch by <seanius@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad nagios-plugins~/po/de.po nagios-plugins/po/de.po
|
||||
--- nagios-plugins~/po/de.po 2005-10-13 11:00:06.000000000 +0200
|
||||
+++ nagios-plugins/po/de.po 2005-10-13 11:03:58.000000000 +0200
|
||||
@@ -717,7 +717,7 @@
|
||||
#: plugins/check_dns.c:190
|
||||
#, c-format
|
||||
msgid "server %s is not authoritative for %s"
|
||||
-msgstr "Server %s ist nicht authoritativ für %s"
|
||||
+msgstr "Server %s ist nicht autoritativ für %s"
|
||||
|
||||
#: plugins/check_dns.c:202 plugins/check_dummy.c:59 plugins/check_http.c:999
|
||||
#: plugins/check_http.c:1257 plugins/check_procs.c:282
|
||||
@@ -900,11 +900,11 @@
|
||||
|
||||
#: plugins/check_fping.c:291
|
||||
msgid "Packet size must be a positive integer"
|
||||
-msgstr "Packet size muss ein positiver Integer sein"
|
||||
+msgstr "Paketgröße muss ein positiver Integer sein"
|
||||
|
||||
#: plugins/check_fping.c:297
|
||||
msgid "Packet count must be a positive integer"
|
||||
-msgstr "Packet count muss ein positiver Integer sein"
|
||||
+msgstr "Paketanzahl muss ein positiver Integer sein"
|
||||
|
||||
#: plugins/check_fping.c:303 plugins/check_time.c:307 plugins/check_udp.c:207
|
||||
msgid "Hostname was not supplied"
|
||||
@@ -913,12 +913,12 @@
|
||||
#: plugins/check_fping.c:323
|
||||
#, c-format
|
||||
msgid "%s: Only one threshold may be packet loss (%s)\n"
|
||||
-msgstr "%s: Nur ein Wert darf für packet loss angegeben werden (%s)\n"
|
||||
+msgstr "%s: Nur ein Wert darf für paket loss angegeben werden (%s)\n"
|
||||
|
||||
#: plugins/check_fping.c:327
|
||||
#, c-format
|
||||
msgid "%s: Only one threshold must be packet loss (%s)\n"
|
||||
-msgstr "%s: Nur ein Wert darf für packet loss angegeben werden (%s)\n"
|
||||
+msgstr "%s: Nur ein Wert darf für paket loss angegeben werden (%s)\n"
|
||||
|
||||
#: plugins/check_fping.c:359
|
||||
msgid ""
|
90
debian/patches/22_check_smb_hostaddress.dpatch
vendored
Executable file
90
debian/patches/22_check_smb_hostaddress.dpatch
vendored
Executable file
|
@ -0,0 +1,90 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 22_check_smb_hostaddress.dpatch by <seanius@localhost.localdomain>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad sid~/plugins-scripts/check_disk_smb.pl sid/plugins-scripts/check_disk_smb.pl
|
||||
--- sid~/plugins-scripts/check_disk_smb.pl 2005-10-31 21:44:20.000000000 +0100
|
||||
+++ sid/plugins-scripts/check_disk_smb.pl 2005-10-31 21:44:41.000000000 +0100
|
||||
@@ -23,7 +23,7 @@
|
||||
use POSIX;
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
-use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $verbose);
|
||||
+use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $opt_a $verbose);
|
||||
use vars qw($PROGNAME);
|
||||
use lib utils.pm ;
|
||||
use utils qw($TIMEOUT %ERRORS &print_revision &support &usage);
|
||||
@@ -49,7 +49,8 @@
|
||||
"u=s" => \$opt_u, "username=s" => \$opt_u,
|
||||
"s=s" => \$opt_s, "share=s" => \$opt_s,
|
||||
"W=s" => \$opt_W, "workgroup=s" => \$opt_W,
|
||||
- "H=s" => \$opt_H, "hostname=s" => \$opt_H);
|
||||
+ "H=s" => \$opt_H, "hostname=s" => \$opt_H,
|
||||
+ "a=s" => \$opt_a, "address=s" => \$opt_a);
|
||||
|
||||
if ($opt_V) {
|
||||
print_revision($PROGNAME,'$Revision$'); #'
|
||||
@@ -65,7 +66,7 @@
|
||||
# Options checking
|
||||
|
||||
($opt_H) || ($opt_H = shift) || usage("Host name not specified\n");
|
||||
-my $host = $1 if ($opt_H =~ /^([-_.A-Za-z0-9]+\$?)$/);
|
||||
+my $host = $1 if ($opt_H =~ /^([-_.A-Za-z0-9 ]+\$?)$/);
|
||||
($host) || usage("Invalid host: $opt_H\n");
|
||||
|
||||
($opt_s) || ($opt_s = shift) || usage("Share volume not specified\n");
|
||||
@@ -142,6 +143,8 @@
|
||||
|
||||
my $workgroup = $1 if (defined($opt_W) && $opt_W =~ /(.*)/);
|
||||
|
||||
+my $address = $1 if (defined($opt_a) && $opt_a =~ /(.*)/);
|
||||
+
|
||||
# end of options checking
|
||||
|
||||
|
||||
@@ -160,10 +163,21 @@
|
||||
# Execute an "ls" on the share using smbclient program
|
||||
# get the results into $res
|
||||
if (defined($workgroup)) {
|
||||
- $res = qx/$smbclient \/\/$host\/$share -W $workgroup -U $user%$pass $smbclientoptions -c ls/;
|
||||
+ if (defined($address)) {
|
||||
+ print "$smbclient " . "\/\/$host\/$share" ." $pass -W $workgroup -U $user $smbclientoptions -I $address -c ls\n" if ($verbose);
|
||||
+ $res = qx/$smbclient "\/\/$host\/$share" $pass -W $workgroup -U $user $smbclientoptions -I $address -c ls/;
|
||||
+ } else {
|
||||
+ print "$smbclient " . "\/\/$host\/$share" ." $pass -W $workgroup -U $user $smbclientoptions -c ls\n" if ($verbose);
|
||||
+ $res = qx/$smbclient "\/\/$host\/$share" $pass -W $workgroup -U $user $smbclientoptions -c ls/;
|
||||
+ }
|
||||
} else {
|
||||
- print "$smbclient " . "\/\/$host\/$share" ." $pass -U $user $smbclientoptions -c ls\n" if ($verbose);
|
||||
- $res = qx/$smbclient \/\/$host\/$share -U $user%$pass $smbclientoptions -c ls/;
|
||||
+ if (defined($address)) {
|
||||
+ print "$smbclient " . "\/\/$host\/$share" ." $pass -U $user $smbclientoptions -I $address -c ls\n" if ($verbose);
|
||||
+ $res = qx/$smbclient "\/\/$host\/$share" $pass -U $user $smbclientoptions -I $address -c ls/;
|
||||
+ } else {
|
||||
+ print "$smbclient " . "\/\/$host\/$share" ." $pass -U $user $smbclientoptions -c ls\n" if ($verbose);
|
||||
+ $res = qx/$smbclient "\/\/$host\/$share" $pass -U $user $smbclientoptions -c ls/;
|
||||
+ }
|
||||
}
|
||||
#Turn off alarm
|
||||
alarm(0);
|
||||
@@ -239,7 +253,7 @@
|
||||
|
||||
sub print_usage () {
|
||||
print "Usage: $PROGNAME -H <host> -s <share> -u <user> -p <password>
|
||||
- -w <warn> -c <crit> [-W <workgroup>] [-P <port>]\n";
|
||||
+ -w <warn> -c <crit> [-W <workgroup>] [-P <port>] [-a <IP>]\n";
|
||||
}
|
||||
|
||||
sub print_help () {
|
||||
@@ -257,6 +271,8 @@
|
||||
Share name to be tested
|
||||
-W, --workgroup=STRING
|
||||
Workgroup or Domain used (Defaults to \"WORKGROUP\")
|
||||
+-a, --address=IP
|
||||
+ IP-address of HOST (only necessary if HOST is in another network)
|
||||
-u, --user=STRING
|
||||
Username to log in to server. (Defaults to \"guest\")
|
||||
-p, --password=STRING
|
Loading…
Add table
Add a link
Reference in a new issue