mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-21 14:19:30 -04:00
print_help and print_usage() cleanup
other misc cleanups git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@996 f882894a-f735-0410-b71e-b25c423dba1c
This commit is contained in:
parent
c6a18d714a
commit
5e3fc41c61
27 changed files with 217 additions and 214 deletions
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
const char *progname = "check_dig";
|
||||
const char *revision = "$Revision$";
|
||||
const char *copyright = "2002-2003";
|
||||
const char *copyright = "2002-2004";
|
||||
const char *email = "nagiosplug-devel@lists.sourceforge.net";
|
||||
|
||||
#include "common.h"
|
||||
|
|
@ -221,7 +221,7 @@ process_arguments (int argc, char **argv)
|
|||
print_help ();
|
||||
exit (STATE_OK);
|
||||
case 'V': /* version */
|
||||
print_revision (progname, "$Revision$");
|
||||
print_revision (progname, revision);
|
||||
exit (STATE_OK);
|
||||
case 'H': /* hostname */
|
||||
if (is_host (optarg)) {
|
||||
|
|
@ -318,7 +318,7 @@ print_help (void)
|
|||
printf ("Copyright (c) 2000 Karl DeBisschop <kdebisschop@users.sourceforge.net>\n");
|
||||
printf (COPYRIGHT, copyright, email);
|
||||
|
||||
printf (_("Test the DNS service on the specified host using dig\n"));
|
||||
printf (_("Test the DNS service on the specified host using dig\n\n"));
|
||||
|
||||
print_usage ();
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
const char *progname = "check_disk";
|
||||
const char *program_name = "check_disk"; // Required for coreutils libs
|
||||
const char *revision = "$Revision$";
|
||||
const char *copyright = "1999-2003";
|
||||
const char *copyright = "1999-2004";
|
||||
const char *email = "nagiosplug-devel@lists.sourceforge.net";
|
||||
|
||||
#include "common.h"
|
||||
|
|
@ -578,7 +578,7 @@ print_help (void)
|
|||
|
||||
printf (_("\
|
||||
This plugin checks the amount of used disk space on a mounted file system\n\
|
||||
and generates an alert if free space is less than one of the threshold values."));
|
||||
and generates an alert if free space is less than one of the threshold values.\n\n"));
|
||||
|
||||
print_usage ();
|
||||
|
||||
|
|
@ -638,5 +638,5 @@ print_usage (void)
|
|||
{
|
||||
printf ("\
|
||||
Usage: %s -w limit -c limit [-p path | -x device] [-t timeout] [-m] [-e]\n\
|
||||
[-v] [-q]\n", progname);
|
||||
[-v] [-q]\n", progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -395,6 +395,12 @@ print_help (void)
|
|||
printf ("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n");
|
||||
printf (COPYRIGHT, copyright, email);
|
||||
|
||||
printf (_("\
|
||||
This plugin uses the nslookup program to obtain the IP address\n\
|
||||
for the given host/domain query. A optional DNS server to use may\n\
|
||||
be specified. If no DNS server is specified, the default server(s)\n\
|
||||
specified in /etc/resolv.conf will be used.\n\n"));
|
||||
|
||||
print_usage ();
|
||||
|
||||
printf (_(UT_HELP_VRSN));
|
||||
|
|
@ -411,12 +417,6 @@ print_help (void)
|
|||
|
||||
printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT);
|
||||
|
||||
printf (_("\n\
|
||||
This plugin uses the nslookup program to obtain the IP address\n\
|
||||
for the given host/domain query. A optional DNS server to use may\n\
|
||||
be specified. If no DNS server is specified, the default server(s)\n\
|
||||
specified in /etc/resolv.conf will be used.\n"));
|
||||
|
||||
printf (_(UT_SUPPORT));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,14 +91,14 @@ print_help (void)
|
|||
printf ("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n");
|
||||
printf (COPYRIGHT, copyright, email);
|
||||
|
||||
printf (_("\
|
||||
This plugin will simply return the state corresponding to the numeric value\n\
|
||||
of the <state> argument with optional text.\n\n"));
|
||||
|
||||
print_usage ();
|
||||
|
||||
printf (_(UT_HELP_VRSN));
|
||||
|
||||
printf (_("\n\
|
||||
This plugin will simply return the state corresponding to the numeric value\n\
|
||||
of the <state> argument with optional text.\n"));
|
||||
|
||||
printf (_(UT_SUPPORT));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -356,15 +356,15 @@ void
|
|||
print_help (void)
|
||||
{
|
||||
|
||||
print_revision (progname, "$Revision$");
|
||||
print_revision (progname, revision);
|
||||
|
||||
printf ("Copyright (c) 1999 Didi Rieder <adrieder@sbox.tu-graz.ac.at>\n");
|
||||
printf (COPYRIGHT, copyright, email);
|
||||
|
||||
printf (_("\
|
||||
This plugin will use the /bin/fping command (from saint) to ping the\n\
|
||||
specified host for a fast check if the host is alive. Note that it is\n\
|
||||
necessary to set the suid flag on fping.\n\n"));
|
||||
This plugin will use the /bin/fping command to ping the specified host\n\
|
||||
for a fast check if the host is alive.\n\
|
||||
Note that it is necessary to set the suid flag on fping.\n\n"));
|
||||
|
||||
print_usage ();
|
||||
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ print_help (void)
|
|||
printf ("Copyright (c) 1999 Ian Cass, Knowledge Matters Limited\n");
|
||||
printf (_(COPYRIGHT), copyright, email);
|
||||
|
||||
printf (_("This plugin tests %s connections with the specified host."), progname);
|
||||
printf (_("This plugin tests game server connections with the specified host."), progname);
|
||||
|
||||
print_usage ();
|
||||
|
||||
|
|
@ -334,7 +334,7 @@ print_usage (void)
|
|||
{
|
||||
printf ("\
|
||||
Usage: %s <game> <ip_address> [-p port] [-gf game_field] [-mf map_field]\n\
|
||||
[-pf ping_field]\n", progname);
|
||||
[-pf ping_field]\n", progname);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
|
|||
|
|
@ -398,6 +398,5 @@ Net-snmp must be installed on the computer running the plugin.\n\n"));
|
|||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf (_("\
|
||||
Usage: %s -H host [-C community]\n"), progname);
|
||||
printf ("Usage: %s -H host [-C community]\n"), progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
const char *progname = "check_http";
|
||||
const char *revision = "$Revision$";
|
||||
const char *copyright = "1999-2001";
|
||||
const char *copyright = "1999-2004";
|
||||
const char *email = "nagiosplug-devel@lists.sourceforge.net";
|
||||
|
||||
#include "common.h"
|
||||
|
|
@ -1376,7 +1376,7 @@ print_help (void)
|
|||
This plugin tests the HTTP service on the specified host. It can test\n\
|
||||
normal (http) and secure (https) servers, follow redirects, search for\n\
|
||||
strings and regular expressions, check connection times, and report on\n\
|
||||
certificate expiration times.\n"));
|
||||
certificate expiration times.\n\n"));
|
||||
|
||||
print_usage ();
|
||||
|
||||
|
|
@ -1492,9 +1492,9 @@ print_usage (void)
|
|||
{
|
||||
printf (_("\
|
||||
Usage: %s -H <vhost> | -I <IP-address>) [-u <uri>] [-p <port>]\n\
|
||||
[-w <warn time>] [-c <critical time>] [-t <timeout>] [-L]\n\
|
||||
[-a auth] [-f <ok | warn | critcal | follow>] [-e <expect>]\n\
|
||||
[-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n\
|
||||
[-P string] [-m min_pg_size] [-4|-6] [-N] [-M <age>] [-A string]\n\
|
||||
[-k string]\n"), progname);
|
||||
[-w <warn time>] [-c <critical time>] [-t <timeout>] [-L]\n\
|
||||
[-a auth] [-f <ok | warn | critcal | follow>] [-e <expect>]\n\
|
||||
[-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n\
|
||||
[-P string] [-m min_pg_size] [-4|-6] [-N] [-M <age>]\n\
|
||||
[-A string] [-k string]\n"), progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,6 +146,125 @@ enum SmartCommand
|
|||
};
|
||||
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
char *device = NULL;
|
||||
int command = -1;
|
||||
int o, longindex;
|
||||
int retval = 0;
|
||||
|
||||
thresholds_t thresholds;
|
||||
values_t values;
|
||||
int fd;
|
||||
|
||||
static struct option longopts[] = {
|
||||
{"device", required_argument, 0, 'd'},
|
||||
{"immediate", no_argument, 0, 'i'},
|
||||
{"quiet-check", no_argument, 0, 'q'},
|
||||
{"auto-on", no_argument, 0, '1'},
|
||||
{"auto-off", no_argument, 0, '0'},
|
||||
{"net-saint", no_argument, 0, 'n'},
|
||||
{"help", no_argument, 0, 'h'},
|
||||
{"version", no_argument, 0, 'V'}, {0, 0, 0, 0}
|
||||
};
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
|
||||
while (1) {
|
||||
|
||||
o = getopt_long (argc, argv, "+d:iq10nhV", longopts, &longindex);
|
||||
|
||||
if (o == -1 || o == EOF)
|
||||
break;
|
||||
|
||||
switch (o) {
|
||||
case 'd':
|
||||
device = optarg;
|
||||
break;
|
||||
case 'q':
|
||||
command = 3;
|
||||
break;
|
||||
case 'i':
|
||||
command = 2;
|
||||
break;
|
||||
case '1':
|
||||
command = 1;
|
||||
break;
|
||||
case '0':
|
||||
command = 0;
|
||||
break;
|
||||
case 'n':
|
||||
command = 4;
|
||||
break;
|
||||
case 'h':
|
||||
print_help ();
|
||||
return STATE_OK;
|
||||
case 'V':
|
||||
print_revision (progname, revision);
|
||||
return STATE_OK;
|
||||
default:
|
||||
printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
|
||||
print_usage ();
|
||||
exit (STATE_UNKNOWN);
|
||||
}
|
||||
|
||||
if (optind < argc) {
|
||||
device = argv[optind];
|
||||
}
|
||||
|
||||
if (!device) {
|
||||
show_help ();
|
||||
show_version ();
|
||||
return -1;
|
||||
}
|
||||
|
||||
fd = open (device, O_RDONLY);
|
||||
|
||||
if (fd < 0) {
|
||||
printf (_("CRITICAL - Couldn't open device: %s\n"), strerror (errno));
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (smart_cmd_simple (fd, SMART_CMD_ENABLE, 0, TRUE)) {
|
||||
printf (_("CRITICAL - SMART_CMD_ENABLE\n"));
|
||||
return 2;
|
||||
}
|
||||
|
||||
switch (command) {
|
||||
case 0:
|
||||
retval = smart_cmd_simple (fd, SMART_CMD_AUTO_OFFLINE, 0, TRUE);
|
||||
break;
|
||||
case 1:
|
||||
retval = smart_cmd_simple (fd, SMART_CMD_AUTO_OFFLINE, 0xF8, TRUE);
|
||||
break;
|
||||
case 2:
|
||||
retval = smart_cmd_simple (fd, SMART_CMD_IMMEDIATE_OFFLINE, 0, TRUE);
|
||||
break;
|
||||
case 3:
|
||||
smart_read_values (fd, &values);
|
||||
smart_read_thresholds (fd, &thresholds);
|
||||
retval = values_not_passed (&values, &thresholds);
|
||||
break;
|
||||
case 4:
|
||||
smart_read_values (fd, &values);
|
||||
smart_read_thresholds (fd, &thresholds);
|
||||
retval = net_saint (&values, &thresholds);
|
||||
break;
|
||||
default:
|
||||
smart_read_values (fd, &values);
|
||||
smart_read_thresholds (fd, &thresholds);
|
||||
print_values (&values, &thresholds);
|
||||
break;
|
||||
}
|
||||
close (fd);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
|
||||
char *
|
||||
get_offline_text (int status)
|
||||
|
|
@ -371,19 +490,14 @@ smart_read_thresholds (int fd, thresholds_t * thresholds)
|
|||
|
||||
|
||||
void
|
||||
show_version ()
|
||||
print_help ()
|
||||
{
|
||||
printf ("check_ide-smart v.1 - FREE Software with NO WARRANTY\n");
|
||||
printf ("Nagios feature - Robert Dale <rdale@digital-mission.com>\n");
|
||||
print_revision (progname, revision);
|
||||
|
||||
printf ("Nagios feature - 1999 Robert Dale <rdale@digital-mission.com>\n");
|
||||
printf ("(C) 1999 Ragnar Hojland Espinosa <ragnar@lightside.dhis.org>\n");
|
||||
printf (COPYRIGHT, copyright, email);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
show_help ()
|
||||
{
|
||||
|
||||
printf (_("\
|
||||
Usage: %s [DEVICE] [OPTION]\n\
|
||||
-d, --device=DEVICE\n\
|
||||
|
|
@ -402,120 +516,8 @@ Usage: %s [DEVICE] [OPTION]\n\
|
|||
|
||||
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
void
|
||||
print_usage (void)
|
||||
{
|
||||
char *device = NULL;
|
||||
int command = -1;
|
||||
int o, longindex;
|
||||
int retval = 0;
|
||||
|
||||
thresholds_t thresholds;
|
||||
values_t values;
|
||||
int fd;
|
||||
|
||||
static struct option longopts[] = {
|
||||
{"device", required_argument, 0, 'd'},
|
||||
{"immediate", no_argument, 0, 'i'},
|
||||
{"quiet-check", no_argument, 0, 'q'},
|
||||
{"auto-on", no_argument, 0, '1'},
|
||||
{"auto-off", no_argument, 0, '0'},
|
||||
{"net-saint", no_argument, 0, 'n'},
|
||||
{"help", no_argument, 0, 'h'},
|
||||
{"version", no_argument, 0, 'V'}, {0, 0, 0, 0}
|
||||
};
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
|
||||
while (1) {
|
||||
|
||||
o = getopt_long (argc, argv, "+d:iq10nhV", longopts, &longindex);
|
||||
|
||||
if (o == -1 || o == EOF)
|
||||
break;
|
||||
|
||||
switch (o) {
|
||||
case 'd':
|
||||
device = optarg;
|
||||
break;
|
||||
case 'q':
|
||||
command = 3;
|
||||
break;
|
||||
case 'i':
|
||||
command = 2;
|
||||
break;
|
||||
case '1':
|
||||
command = 1;
|
||||
break;
|
||||
case '0':
|
||||
command = 0;
|
||||
break;
|
||||
case 'n':
|
||||
command = 4;
|
||||
break;
|
||||
case 'h':
|
||||
show_help ();
|
||||
return 0;
|
||||
case 'V':
|
||||
show_version ();
|
||||
return 0;
|
||||
default:
|
||||
printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
|
||||
print_usage ();
|
||||
exit (STATE_UNKNOWN);
|
||||
}
|
||||
|
||||
if (optind < argc) {
|
||||
device = argv[optind];
|
||||
}
|
||||
|
||||
if (!device) {
|
||||
show_help ();
|
||||
show_version ();
|
||||
return -1;
|
||||
}
|
||||
|
||||
fd = open (device, O_RDONLY);
|
||||
|
||||
if (fd < 0) {
|
||||
printf (_("CRITICAL - Couldn't open device: %s\n"), strerror (errno));
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (smart_cmd_simple (fd, SMART_CMD_ENABLE, 0, TRUE)) {
|
||||
printf (_("CRITICAL - SMART_CMD_ENABLE\n"));
|
||||
return 2;
|
||||
}
|
||||
|
||||
switch (command) {
|
||||
case 0:
|
||||
retval = smart_cmd_simple (fd, SMART_CMD_AUTO_OFFLINE, 0, TRUE);
|
||||
break;
|
||||
case 1:
|
||||
retval = smart_cmd_simple (fd, SMART_CMD_AUTO_OFFLINE, 0xF8, TRUE);
|
||||
break;
|
||||
case 2:
|
||||
retval = smart_cmd_simple (fd, SMART_CMD_IMMEDIATE_OFFLINE, 0, TRUE);
|
||||
break;
|
||||
case 3:
|
||||
smart_read_values (fd, &values);
|
||||
smart_read_thresholds (fd, &thresholds);
|
||||
retval = values_not_passed (&values, &thresholds);
|
||||
break;
|
||||
case 4:
|
||||
smart_read_values (fd, &values);
|
||||
smart_read_thresholds (fd, &thresholds);
|
||||
retval = net_saint (&values, &thresholds);
|
||||
break;
|
||||
default:
|
||||
smart_read_values (fd, &values);
|
||||
smart_read_thresholds (fd, &thresholds);
|
||||
print_values (&values, &thresholds);
|
||||
break;
|
||||
}
|
||||
close (fd);
|
||||
}
|
||||
return retval;
|
||||
printf ("Usage: %s \n"), progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -277,8 +277,6 @@ validate_arguments ()
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
print_help (void)
|
||||
{
|
||||
|
|
@ -334,7 +332,8 @@ print_usage (void)
|
|||
{
|
||||
printf ("\
|
||||
Usage: %s -H <host> -b <base_dn> [-p <port>] [-a <attr>] [-D <binddn>]\n\
|
||||
[-P <password>] [-w <warn_time>] [-c <crit_time>] [-t timeout]%s\n",
|
||||
[-P <password>] [-w <warn_time>] [-c <crit_time>]\n\
|
||||
[-t timeout]%s\n",
|
||||
//(Note: all times are in seconds.)\n",
|
||||
progname,
|
||||
#ifdef HAVE_LDAP_SET_OPTION
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ print_help (void)
|
|||
|
||||
printf(_("\
|
||||
This plugin will check either the average or maximum value of one of the\n\
|
||||
two variables recorded in an MRTG log file.\n"));
|
||||
two variables recorded in an MRTG log file.\n\n"));
|
||||
|
||||
print_usage ();
|
||||
|
||||
|
|
@ -377,5 +377,6 @@ print_usage (void)
|
|||
{
|
||||
printf ("\
|
||||
Usage: %s -F log_file -a <AVG | MAX> -v variable -w warning -c critical\n\
|
||||
[-l label] [-u units] [-e expire_minutes] [-t timeout] [-v]\n", progname);
|
||||
[-l label] [-u units] [-e expire_minutes] [-t timeout]\n\
|
||||
[-v]\n", progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -321,6 +321,14 @@ print_help (void)
|
|||
printf ("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n");
|
||||
printf (COPYRIGHT, copyright, email);
|
||||
|
||||
printf (_("\n\
|
||||
This plugin will check the incoming/outgoing transfer rates of a router,\n\
|
||||
switch, etc recorded in an MRTG log. If the newest log entry is older\n\
|
||||
than <expire_minutes>, a WARNING status is returned. If either the\n\
|
||||
incoming or outgoing rates exceed the <icl> or <ocl> thresholds (in\n\
|
||||
Bytes/sec), a CRITICAL status results. If either of the rates exceed\n\
|
||||
the <iwl> or <owl> thresholds (in Bytes/sec), a WARNING status results.\n\n"));
|
||||
|
||||
print_usage ();
|
||||
|
||||
printf (_(UT_HELP_VRSN));
|
||||
|
|
@ -337,14 +345,6 @@ print_help (void)
|
|||
-c, --critical\n\
|
||||
Critical threshold pair \"<incoming>,<outgoing>\"\n"));
|
||||
|
||||
printf (_("\n\
|
||||
This plugin will check the incoming/outgoing transfer rates of a router,\n\
|
||||
switch, etc recorded in an MRTG log. If the newest log entry is older\n\
|
||||
than <expire_minutes>, a WARNING status is returned. If either the\n\
|
||||
incoming or outgoing rates exceed the <icl> or <ocl> thresholds (in\n\
|
||||
Bytes/sec), a CRITICAL status results. If either of the rates exceed\n\
|
||||
the <iwl> or <owl> thresholds (in Bytes/sec), a WARNING status results.\n\n"));
|
||||
|
||||
printf (_("Notes:\n\
|
||||
- MRTG stands for Multi Router Traffic Grapher. It can be downloaded from\n\
|
||||
http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html\n\
|
||||
|
|
@ -363,6 +363,6 @@ void
|
|||
print_usage (void)
|
||||
{
|
||||
printf ("\
|
||||
Usage: %s -F <log_file> -a <AVG | MAX> -v <variable> -w <warning_pair> -c <critical_pair>\n\
|
||||
[-e expire_minutes] [-t timeout] [-v]\n", progname);
|
||||
Usage: %s -F <log_file> -a <AVG | MAX> -v <variable> -w <warning_pair>\n\
|
||||
-c <critical_pair> [-e expire_minutes] [-t timeout] [-v]\n", progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ This plugin attempts to check the status of the Nagios process on the local\n\
|
|||
machine. The plugin will check to make sure the Nagios status log is no older\n\
|
||||
than the number of minutes specified by the <expire_minutes> option. It also\n\
|
||||
uses the /bin/ps command to check for a process matching whatever you specify\n\
|
||||
by the <process_string> argument.\n"));
|
||||
by the <process_string> argument.\n\n"));
|
||||
|
||||
print_usage ();
|
||||
|
||||
|
|
|
|||
|
|
@ -608,11 +608,15 @@ void preparelist(char *string) {
|
|||
void print_help(void)
|
||||
{
|
||||
print_revision(progname,revision);
|
||||
printf (_("\
|
||||
Copyright (c) 2000 Yves Rubin (rubiyz@yahoo.com)\n\n\
|
||||
This plugin collects data from the NSClient service running on a\n\
|
||||
Windows NT/2000/XP server.\n\n"));
|
||||
|
||||
printf (_("Copyright (c) 2000 Yves Rubin (rubiyz@yahoo.com)\n"));
|
||||
printf (COPYRIGHT, copyright, email);
|
||||
|
||||
printf (_("This plugin collects data from the NSClient service running on a\n\
|
||||
Windows NT/2000/XP/2003 server.\n\n"));
|
||||
|
||||
print_usage();
|
||||
|
||||
printf (_("\nOptions:\n\
|
||||
-H, --hostname=HOST\n\
|
||||
Name of the host to check\n\
|
||||
|
|
@ -629,8 +633,8 @@ Windows NT/2000/XP server.\n\n"));
|
|||
-h, --help\n\
|
||||
Print this help screen\n\
|
||||
-V, --version\n\
|
||||
Print version information\n"),
|
||||
PORT, DEFAULT_SOCKET_TIMEOUT);
|
||||
Print version information\n"), PORT, DEFAULT_SOCKET_TIMEOUT);
|
||||
|
||||
printf (_("\
|
||||
-v, --variable=STRING\n\
|
||||
Variable to check. Valid variables are:\n"));
|
||||
|
|
@ -684,5 +688,5 @@ void print_usage(void)
|
|||
{
|
||||
printf("\
|
||||
Usage: %s -H host -v variable [-p port] [-w warning] [-c critical]\n\
|
||||
[-l params] [-d SHOWALL] [-t timeout]\n", progname);
|
||||
[-l params] [-d SHOWALL] [-t timeout]\n", progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -908,8 +908,8 @@ void print_help(void)
|
|||
printf (COPYRIGHT, copyright, email);
|
||||
|
||||
printf (_("\
|
||||
Usage: %s This plugin attempts to contact the MRTGEXT NLM running\n\
|
||||
on a Novell server to gather the requested system information.\n\n"),
|
||||
This plugin attempts to contact the MRTGEXT NLM running on a\n\
|
||||
Novell server to gather the requested system information.\n\n"),
|
||||
progname);
|
||||
|
||||
print_usage();
|
||||
|
|
@ -989,5 +989,5 @@ void print_usage(void)
|
|||
{
|
||||
printf ("\
|
||||
Usage: %s -H host [-p port] [-v variable] [-w warning] [-c critical]\n\
|
||||
[-t timeout].\n", progname);
|
||||
[-t timeout].\n", progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -465,5 +465,5 @@ print_usage (void)
|
|||
{
|
||||
printf ("\
|
||||
Usage: %s -H host [-p port] [-v variable] [-w warning] [-c critical]\n\
|
||||
[-t timeout]\n", progname);
|
||||
[-t timeout]\n", progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -391,7 +391,7 @@ print_help (void)
|
|||
|
||||
print_revision (progname, revision);
|
||||
|
||||
printf (_(COPYRIGHT), copyright, email);
|
||||
printf (COPYRIGHT, copyright, email);
|
||||
|
||||
printf (_("Test whether a PostgreSQL Database is accepting connections.\n\n"));
|
||||
|
||||
|
|
@ -443,5 +443,5 @@ print_usage (void)
|
|||
{
|
||||
printf ("\
|
||||
Usage: %s [-H <host>] [-P <port>] [-c <critical time>] [-w <warning time>]\n\
|
||||
[-t <timeout>] [-d <database>] [-l <logname>] [-p <password>]\n", progname);
|
||||
[-t <timeout>] [-d <database>] [-l <logname>] [-p <password>]\n", progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -751,6 +751,6 @@ print_usage (void)
|
|||
{
|
||||
printf ("\
|
||||
Usage: %s -w <range> -c <range> [-m metric] [-s state] [-p ppid]\n\
|
||||
[-u user] [-r rss] [-z vsz] [-P %%cpu] [-a argument-array]\n\
|
||||
[-C command] [-t timeout] [-v]\n", progname);
|
||||
[-u user] [-r rss] [-z vsz] [-P %%cpu] [-a argument-array]\n\
|
||||
[-C command] [-t timeout] [-v]\n", progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net";
|
|||
#include "common.h"
|
||||
#include "utils.h"
|
||||
#include "netutils.h"
|
||||
|
||||
#include <radiusclient.h>
|
||||
|
||||
int process_arguments (int, char **);
|
||||
|
|
@ -335,5 +336,5 @@ print_usage (void)
|
|||
{
|
||||
printf ("\
|
||||
Usage: %s -H host -F config_file -u username -p password [-n nas-id] [-P port]\n\
|
||||
[-t timeout] [-r retries] [-e expect]\n", progname);
|
||||
[-t timeout] [-r retries] [-e expect]\n", progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -438,5 +438,5 @@ print_usage (void)
|
|||
{
|
||||
printf ("\
|
||||
Usage: %s -H host [-e expect] [-p port] [-w warn] [-c crit]\n\
|
||||
[-t timeout] [-v]\n", progname);
|
||||
[-t timeout] [-v]\n", progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -422,8 +422,7 @@ print_help (void)
|
|||
printf ("Copyright (c) 1999-2001 Ethan Galstad <nagios@nagios.org>\n");
|
||||
printf (COPYRIGHT, copyright, email);
|
||||
|
||||
printf(_("\
|
||||
This plugin will attempt to open an SMTP connection with the host.\n\n"));
|
||||
printf(_("This plugin will attempt to open an SMTP connection with the host.\n\n"));
|
||||
|
||||
print_usage ();
|
||||
|
||||
|
|
@ -468,5 +467,5 @@ print_usage (void)
|
|||
{
|
||||
printf ("\
|
||||
Usage: %s -H host [-p port] [-e expect] [-C command] [-f from addr]\n\
|
||||
[-w warn] [-c crit] [-t timeout] [-n] [-v] [-4|-6]\n", progname);
|
||||
[-w warn] [-c crit] [-t timeout] [-n] [-v] [-4|-6]\n", progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -842,7 +842,7 @@ print_help (void)
|
|||
{
|
||||
print_revision (progname, revision);
|
||||
|
||||
printf (_(COPYRIGHT), copyright, email);
|
||||
printf (COPYRIGHT, copyright, email);
|
||||
|
||||
printf (_("\
|
||||
Check status of remote machines and obtain sustem information via SNMP\n\n"));
|
||||
|
|
@ -950,9 +950,9 @@ print_usage (void)
|
|||
{
|
||||
printf ("\
|
||||
Usage: %s -H <ip_address> -o <OID> [-w warn_range] [-c crit_range] \n\
|
||||
[-C community] [-s string] [-r regex] [-R regexi] [-t timeout]\n\
|
||||
[-l label] [-u units] [-p port-number] [-d delimiter]\n\
|
||||
[-D output-delimiter] [-m miblist] [-P snmp version]\n\
|
||||
[-L seclevel] [-U secname] [-a authproto] [-A authpasswd]\n\
|
||||
[-X privpasswd]\n", progname);
|
||||
[-C community] [-s string] [-r regex] [-R regexi] [-t timeout]\n\
|
||||
[-l label] [-u units] [-p port-number] [-d delimiter]\n\
|
||||
[-D output-delimiter] [-m miblist] [-P snmp version]\n\
|
||||
[-L seclevel] [-U secname] [-a authproto] [-A authpasswd]\n\
|
||||
[-X privpasswd]\n", progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ print_help (void)
|
|||
|
||||
printf (_(COPYRIGHT), copyright, email);
|
||||
|
||||
printf (_("Check swap space on local server.\n\n"));
|
||||
printf (_("Check swap space on local machine.\n\n"));
|
||||
|
||||
print_usage ();
|
||||
|
||||
|
|
@ -514,7 +514,7 @@ On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s.\n"));
|
|||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf ("Usage:\n\
|
||||
%s [-av] -w <percent_free>%% -c <percent_free>%%\n\
|
||||
%s [-av] -w <bytes_free> -c <bytes_free>\n", progname, progname);
|
||||
printf ("\
|
||||
Usage: %s [-av] -w <percent_free>%% -c <percent_free>%%\n\
|
||||
%s [-av] -w <bytes_free> -c <bytes_free>\n", progname, progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -739,8 +739,8 @@ print_help (void)
|
|||
{
|
||||
print_revision (progname, revision);
|
||||
|
||||
printf (_("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n"));
|
||||
printf (_(COPYRIGHT), copyright, email);
|
||||
printf ("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n"));
|
||||
printf (COPYRIGHT, copyright, email);
|
||||
|
||||
printf (_("This plugin tests %s connections with the specified host.\n\n"),
|
||||
SERVICE);
|
||||
|
|
@ -795,8 +795,8 @@ print_usage (void)
|
|||
{
|
||||
printf ("\
|
||||
Usage: %s -H host -p port [-w <warning time>] [-c <critical time>]\n\
|
||||
[-s <send string>] [-e <expect string>] [-q <quit string>]\n\
|
||||
[-m <maximum bytes>] [-d <delay>] [-t <timeout seconds>]\n\
|
||||
[-r <refuse state>] [-v] [-4|-6] [-j] [-D <days to cert expiry>]\n\
|
||||
[-S <use SSL>]\n", progname);
|
||||
[-s <send string>] [-e <expect string>] [-q <quit string>]\n\
|
||||
[-m <maximum bytes>] [-d <delay>] [-t <timeout seconds>]\n\
|
||||
[-r <refuse state>] [-v] [-4|-6] [-j] [-D <days to cert expiry>]\n\
|
||||
[-S <use SSL>]\n", progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -326,8 +326,7 @@ print_help (void)
|
|||
printf ("Copyright (c) 1999 Ethan Galstad\n");
|
||||
printf (COPYRIGHT, copyright, email);
|
||||
|
||||
printf (_("\
|
||||
This plugin will check the time on the specified host.\n\n"));
|
||||
printf (_("This plugin will check the time on the specified host.\n\n"));
|
||||
|
||||
print_usage ();
|
||||
|
||||
|
|
@ -359,5 +358,5 @@ print_usage (void)
|
|||
{
|
||||
printf ("\
|
||||
Usage: %s -H <host_address> [-p port] [-u] [-w variance] [-c variance]\n\
|
||||
[-W connect_time] [-C connect_time] [-t timeout]\n", progname);
|
||||
[-W connect_time] [-C connect_time] [-t timeout]\n", progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -264,5 +264,5 @@ print_usage (void)
|
|||
{
|
||||
printf ("\
|
||||
Usage: %s -H <host_address> [-p port] [-w warn_time] [-c crit_time]\n\
|
||||
[-e expect] [-s send] [-t to_sec] [-v]\n", progname);
|
||||
[-e expect] [-s send] [-t to_sec] [-v]\n", progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -592,7 +592,6 @@ print_help (void)
|
|||
printf ("Copyright (c) 2000 Tom Shields");
|
||||
printf ("Copyright (c) 2004 Alain Richard <alain.richard@equation.fr>\n");
|
||||
printf ("Copyright (c) 2004 Arnaud Quette <arnaud.quette@mgeups.com>\n");
|
||||
|
||||
printf (COPYRIGHT, copyright, email);
|
||||
|
||||
printf (_("This plugin tests the UPS service on the specified host.\n\
|
||||
|
|
@ -648,5 +647,5 @@ print_usage (void)
|
|||
{
|
||||
printf ("\
|
||||
Usage: %s -H host -u ups [-p port] [-v variable]\n\
|
||||
[-wv warn_value] [-cv crit_value] [-to to_sec] [-T]\n", progname);
|
||||
[-wv warn_value] [-cv crit_value] [-to to_sec] [-T]\n", progname);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue