aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Benoit Mortier <opensides@users.sourceforge.net> 2006-06-15 12:52:25 +0000
committerGravatar Benoit Mortier <opensides@users.sourceforge.net> 2006-06-15 12:52:25 +0000
commite5324624caefb201439012d795bebdf46966ec9c (patch)
tree0d94d5ab9044c1ac6aebf67906e7d7626135c1fb
parent180f20d60dde6e2584e2abda4e9f9e4fc6d8c1ae (diff)
downloadmonitoring-plugins-e5324624caefb201439012d795bebdf46966ec9c.tar.gz
cleaning help and usage
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1432 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--plugins/check_ldap.c6
-rw-r--r--plugins/check_load.c20
-rw-r--r--plugins/check_mrtg.c14
-rw-r--r--plugins/check_mysql.c44
-rw-r--r--plugins/check_mysql_query.c10
-rw-r--r--plugins/check_nagios.c39
6 files changed, 67 insertions, 66 deletions
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c
index 4f143280..7f8b7fd9 100644
--- a/plugins/check_ldap.c
+++ b/plugins/check_ldap.c
@@ -21,7 +21,7 @@
/* progname may be check_ldaps */
char *progname = "check_ldap";
const char *revision = "$Revision$";
-const char *copyright = "2000-2004";
+const char *copyright = "2000-2006";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
#include "common.h"
@@ -392,8 +392,8 @@ print_help (void)
void
print_usage (void)
{
- printf ("\
-Usage: %s -H <host> -b <base_dn> [-p <port>] [-a <attr>] [-D <binddn>]\n\
+ printf (_("Usage:"));
+ printf ("\%s -H <host> -b <base_dn> [-p <port>] [-a <attr>] [-D <binddn>]\n\
[-P <password>] [-w <warn_time>] [-c <crit_time>]\n\
[-t timeout]%s\n",
//(Note: all times are in seconds.)\n",
diff --git a/plugins/check_load.c b/plugins/check_load.c
index 191f6d30..145b9b01 100644
--- a/plugins/check_load.c
+++ b/plugins/check_load.c
@@ -20,7 +20,7 @@
const char *progname = "check_load";
const char *revision = "$Revision$";
-const char *copyright = "1999-2004";
+const char *copyright = "1999-2006";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
#include "common.h"
@@ -272,18 +272,19 @@ print_help (void)
printf ("Copyright (c) 1999 Felipe Gustavo de Almeida <galmeida@linux.ime.usp.br>\n");
printf (COPYRIGHT, copyright, email);
- printf (_("This plugin tests the current system load average.\n\n"));
+ printf (_("This plugin tests the current system load average."));
+ printf ("\n\n");
+
print_usage ();
printf (_(UT_HELP_VRSN));
- printf (_("\
- -w, --warning=WLOAD1,WLOAD5,WLOAD15\n\
- Exit with WARNING status if load average exceeds WLOADn\n\
- -c, --critical=CLOAD1,CLOAD5,CLOAD15\n\
- Exit with CRITICAL status if load average exceed CLOADn\n\n\
-the load average format is the same used by \"uptime\" and \"w\"\n\n"));
+ printf (" %s\n", "-w, --warning=WLOAD1,WLOAD5,WLOAD15");
+ printf (" %s\n", _("Exit with WARNING status if load average exceeds WLOADn"));
+ printf (" %s\n", "-c, --critical=CLOAD1,CLOAD5,CLOAD15");
+ printf (" %s\n", _("Exit with CRITICAL status if load average exceed CLOADn"));
+ printf (" %s\n", _("the load average format is the same used by \"uptime\" and \"w\""));
printf (_(UT_SUPPORT));
}
@@ -291,5 +292,6 @@ the load average format is the same used by \"uptime\" and \"w\"\n\n"));
void
print_usage (void)
{
- printf ("Usage: %s -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15\n", progname);
+ printf (_("Usage:"));
+ printf ("%s -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15\n", progname);
}
diff --git a/plugins/check_mrtg.c b/plugins/check_mrtg.c
index 6b08195b..f98239c7 100644
--- a/plugins/check_mrtg.c
+++ b/plugins/check_mrtg.c
@@ -305,10 +305,11 @@ print_help (void)
printf ("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n");
printf (COPYRIGHT, copyright, email);
- 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\n"));
+ printf ("%s\n", _("This plugin will check either the average or maximum value of one of the"));
+ printf ("%s\n", _("two variables recorded in an MRTG log file."));
+ printf ("\n\n");
+
print_usage ();
printf (_(UT_HELP_VRSN));
@@ -366,8 +367,7 @@ this plugin works well for monitoring that kind of data as well.\n\n"));
void
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]\n\
- [-v]\n", progname);
+ printf (_("Usage:"));
+ printf ("%s -F log_file -a <AVG | MAX> -v variable -w warning -c critical\n",progname);
+ printf ("[-l label] [-u units] [-e expire_minutes] [-t timeout] [-v]\n");
}
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index 9d547ddd..a47572d9 100644
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
@@ -347,33 +347,32 @@ print_help (void)
printf (_(COPYRIGHT), copyright, email);
- printf (_("This program tests connections to a mysql server\n"));
+ printf ("%s\n", _("This program tests connections to a mysql server"));
+ printf ("\n\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\
- -w, --warning\n\
- Exit with WARNING status if slave server is more then INTEGER seconds behind master\n\
- -c, --critical\n\
- Exit with CRITICAL status if slave server is more then INTEGER seconds behind master\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 (" %s\n", "-d, --database=STRING");
+ printf (" %s\n", _("Check database with indicated name"));
+ printf (" %s\n", "-u, --username=STRING");
+ printf (" %s\n", _("Connect using the indicated username"));
+ printf (" %s\n", "-p, --password=STRING");
+ printf (" %s\n", _("Use the indicated password to authenticate the connection"));
+ printf (" %s\n", _("==> IMPORTANT: THIS FORM OF AUTHENTICATION IS NOT SECURE!!! <=="));
+ printf (" %s\n", _("Your clear-text password will be visible as a process table entry"));
+ printf (" %s\n", "-S, --check-slave");
+ printf (" %s\n", _("Check if the slave thread is running properly."));
+ printf (" %s\n", "-w, --warning");
+ printf (" %s\n", _("Exit with WARNING status if slave server is more then INTEGER seconds behind master"));
+ printf (" %s\n", "-c, --critical");
+ printf (" %s\n", _("Exit with CRITICAL status if slave server is more then INTEGER seconds behind master"));
+ printf (" %s\n", _("There are no required arguments. By default, the local database with"));
+ printf (_("a server listening on MySQL standard port %d will be checked\n"), MYSQL_PORT);
printf (_(UT_SUPPORT));
}
@@ -382,7 +381,6 @@ a server listening on MySQL standard port %d will be checked\n"), MYSQL_PORT);
void
print_usage (void)
{
- printf ("\
-Usage: %s [-d database] [-H host] [-P port] [-u user] [-p password] [-S]\n",
- progname);
+ printf (_("Usage:"));
+ printf ("%s [-d database] [-H host] [-P port] [-u user] [-p password] [-S]\n",progname);
}
diff --git a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c
index b542fb44..404ca79f 100644
--- a/plugins/check_mysql_query.c
+++ b/plugins/check_mysql_query.c
@@ -264,8 +264,9 @@ print_help (void)
printf ("%s\n", _("This program checks a query result against threshold levels"));
- print_usage ();
+ printf ("\n\n");
+ print_usage ();
printf (_(UT_HELP_VRSN));
printf (" -q, --query=STRING\n");
@@ -292,8 +293,7 @@ print_help (void)
void
print_usage (void)
{
- printf ("\
-Usage: %s -q SQL_query [-w warn] [-c crit]\n\
- [-d database] [-H host] [-P port] [-u user] [-p password]\n",
- progname);
+ printf (_("Usage:"));
+ printf ("%s -q SQL_query [-w warn] [-c crit]\n",progname);
+ printf ("[-d database] [-H host] [-P port] [-u user] [-p password]\n");
}
diff --git a/plugins/check_nagios.c b/plugins/check_nagios.c
index 45514f1a..c7be780f 100644
--- a/plugins/check_nagios.c
+++ b/plugins/check_nagios.c
@@ -20,7 +20,7 @@
const char *progname = "check_nagios";
const char *revision = "$Revision$";
-const char *copyright = "1999-2004";
+const char *copyright = "1999-2006";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
#include "common.h"
@@ -262,27 +262,28 @@ print_help (void)
printf (_(COPYRIGHT), copyright, email);
- printf (_("\
-This plugin checks 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 expires option. It also\n\
-checks the process table for a process matching the command argument.\n\n"));
+ printf ("%s\n", _("This plugin checks the status of the Nagios process on the local machine"));
+ printf ("%s\n", _("The plugin will check to make sure the Nagios status log is no older than"));
+ printf ("%s\n", _("the number of minutes specified by the expires option."));
+ printf ("%s\n", _("It also checks the process table for a process matching the command argument."));
+ printf ("\n\n");
+
print_usage ();
printf (_(UT_HELP_VRSN));
- printf (_("\
- -F, --filename=FILE\n\
- Name of the log file to check\n\
- -e, --expires=INTEGER\n\
- Minutes aging after which logfile is considered stale\n\
- -C, --command=STRING\n\
- Substring to search for in process arguments\n"));
-
- printf (_("\
-Example:\n\
- ./check_nagios -e 5 -F /usr/local/nagios/var/status.log -C /usr/local/nagios/bin/nagios\n"));
+ printf (" %s\n", "-F, --filename=FILE");
+ printf (" %s\n", _("Name of the log file to check"));
+ printf (" %s\n", "-e, --expires=INTEGER");
+ printf (" %s\n", _("Minutes aging after which logfile is considered stale"));
+ printf (" %s\n", "-C, --command=STRING");
+ printf (" %s\n", _("Substring to search for in process arguments"));
+ printf (_(UT_VERBOSE));
+ printf ("\n");
+ printf ("%s\n", _("Examples:"));
+ printf (" %s\n", "check_nagios -e 5 -F /usr/local/nagios/var/status.log -C /usr/local/nagios/bin/nagios");
+ printf (_(UT_SUPPORT));
}
@@ -290,6 +291,6 @@ Example:\n\
void
print_usage (void)
{
- printf ("\
-Usage: %s -F <status log file> -e <expire_minutes> -C <process_string>\n", progname);
+ printf (_("Usage:"));
+ printf ("%s -F <status log file> -e <expire_minutes> -C <process_string>\n", progname);
}