summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Mortier <opensides@users.sourceforge.net>2006-06-15 12:52:25 +0000
committerBenoit 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 @@
21/* progname may be check_ldaps */ 21/* progname may be check_ldaps */
22char *progname = "check_ldap"; 22char *progname = "check_ldap";
23const char *revision = "$Revision$"; 23const char *revision = "$Revision$";
24const char *copyright = "2000-2004"; 24const char *copyright = "2000-2006";
25const char *email = "nagiosplug-devel@lists.sourceforge.net"; 25const char *email = "nagiosplug-devel@lists.sourceforge.net";
26 26
27#include "common.h" 27#include "common.h"
@@ -392,8 +392,8 @@ print_help (void)
392void 392void
393print_usage (void) 393print_usage (void)
394{ 394{
395 printf ("\ 395 printf (_("Usage:"));
396Usage: %s -H <host> -b <base_dn> [-p <port>] [-a <attr>] [-D <binddn>]\n\ 396 printf ("\%s -H <host> -b <base_dn> [-p <port>] [-a <attr>] [-D <binddn>]\n\
397 [-P <password>] [-w <warn_time>] [-c <crit_time>]\n\ 397 [-P <password>] [-w <warn_time>] [-c <crit_time>]\n\
398 [-t timeout]%s\n", 398 [-t timeout]%s\n",
399//(Note: all times are in seconds.)\n", 399//(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 @@
20 20
21const char *progname = "check_load"; 21const char *progname = "check_load";
22const char *revision = "$Revision$"; 22const char *revision = "$Revision$";
23const char *copyright = "1999-2004"; 23const char *copyright = "1999-2006";
24const char *email = "nagiosplug-devel@lists.sourceforge.net"; 24const char *email = "nagiosplug-devel@lists.sourceforge.net";
25 25
26#include "common.h" 26#include "common.h"
@@ -272,18 +272,19 @@ print_help (void)
272 printf ("Copyright (c) 1999 Felipe Gustavo de Almeida <galmeida@linux.ime.usp.br>\n"); 272 printf ("Copyright (c) 1999 Felipe Gustavo de Almeida <galmeida@linux.ime.usp.br>\n");
273 printf (COPYRIGHT, copyright, email); 273 printf (COPYRIGHT, copyright, email);
274 274
275 printf (_("This plugin tests the current system load average.\n\n")); 275 printf (_("This plugin tests the current system load average."));
276 276
277 printf ("\n\n");
278
277 print_usage (); 279 print_usage ();
278 280
279 printf (_(UT_HELP_VRSN)); 281 printf (_(UT_HELP_VRSN));
280 282
281 printf (_("\ 283 printf (" %s\n", "-w, --warning=WLOAD1,WLOAD5,WLOAD15");
282 -w, --warning=WLOAD1,WLOAD5,WLOAD15\n\ 284 printf (" %s\n", _("Exit with WARNING status if load average exceeds WLOADn"));
283 Exit with WARNING status if load average exceeds WLOADn\n\ 285 printf (" %s\n", "-c, --critical=CLOAD1,CLOAD5,CLOAD15");
284 -c, --critical=CLOAD1,CLOAD5,CLOAD15\n\ 286 printf (" %s\n", _("Exit with CRITICAL status if load average exceed CLOADn"));
285 Exit with CRITICAL status if load average exceed CLOADn\n\n\ 287 printf (" %s\n", _("the load average format is the same used by \"uptime\" and \"w\""));
286the load average format is the same used by \"uptime\" and \"w\"\n\n"));
287 288
288 printf (_(UT_SUPPORT)); 289 printf (_(UT_SUPPORT));
289} 290}
@@ -291,5 +292,6 @@ the load average format is the same used by \"uptime\" and \"w\"\n\n"));
291void 292void
292print_usage (void) 293print_usage (void)
293{ 294{
294 printf ("Usage: %s -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15\n", progname); 295 printf (_("Usage:"));
296 printf ("%s -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15\n", progname);
295} 297}
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)
305 printf ("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n"); 305 printf ("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n");
306 printf (COPYRIGHT, copyright, email); 306 printf (COPYRIGHT, copyright, email);
307 307
308 printf(_("\ 308 printf ("%s\n", _("This plugin will check either the average or maximum value of one of the"));
309This plugin will check either the average or maximum value of one of the\n\ 309 printf ("%s\n", _("two variables recorded in an MRTG log file."));
310two variables recorded in an MRTG log file.\n\n"));
311 310
311 printf ("\n\n");
312
312 print_usage (); 313 print_usage ();
313 314
314 printf (_(UT_HELP_VRSN)); 315 printf (_(UT_HELP_VRSN));
@@ -366,8 +367,7 @@ this plugin works well for monitoring that kind of data as well.\n\n"));
366void 367void
367print_usage (void) 368print_usage (void)
368{ 369{
369 printf ("\ 370 printf (_("Usage:"));
370Usage: %s -F log_file -a <AVG | MAX> -v variable -w warning -c critical\n\ 371 printf ("%s -F log_file -a <AVG | MAX> -v variable -w warning -c critical\n",progname);
371 [-l label] [-u units] [-e expire_minutes] [-t timeout]\n\ 372 printf ("[-l label] [-u units] [-e expire_minutes] [-t timeout] [-v]\n");
372 [-v]\n", progname);
373} 373}
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)
347 347
348 printf (_(COPYRIGHT), copyright, email); 348 printf (_(COPYRIGHT), copyright, email);
349 349
350 printf (_("This program tests connections to a mysql server\n")); 350 printf ("%s\n", _("This program tests connections to a mysql server"));
351 351
352 printf ("\n\n");
353
352 print_usage (); 354 print_usage ();
353 355
354 printf (_(UT_HELP_VRSN)); 356 printf (_(UT_HELP_VRSN));
355 357
356 printf (_(UT_HOST_PORT), 'P', myport); 358 printf (_(UT_HOST_PORT), 'P', myport);
357 359
358 printf (_("\ 360 printf (" %s\n", "-d, --database=STRING");
359 -d, --database=STRING\n\ 361 printf (" %s\n", _("Check database with indicated name"));
360 Check database with indicated name\n\ 362 printf (" %s\n", "-u, --username=STRING");
361 -u, --username=STRING\n\ 363 printf (" %s\n", _("Connect using the indicated username"));
362 Connect using the indicated username\n\ 364 printf (" %s\n", "-p, --password=STRING");
363 -p, --password=STRING\n\ 365 printf (" %s\n", _("Use the indicated password to authenticate the connection"));
364 Use the indicated password to authenticate the connection\n\ 366 printf (" %s\n", _("==> IMPORTANT: THIS FORM OF AUTHENTICATION IS NOT SECURE!!! <=="));
365 ==> IMPORTANT: THIS FORM OF AUTHENTICATION IS NOT SECURE!!! <==\n\ 367 printf (" %s\n", _("Your clear-text password will be visible as a process table entry"));
366 Your clear-text password will be visible as a process table entry\n\ 368 printf (" %s\n", "-S, --check-slave");
367 -S, --check-slave\n\ 369 printf (" %s\n", _("Check if the slave thread is running properly."));
368 Check if the slave thread is running properly.\n\ 370 printf (" %s\n", "-w, --warning");
369 -w, --warning\n\ 371 printf (" %s\n", _("Exit with WARNING status if slave server is more then INTEGER seconds behind master"));
370 Exit with WARNING status if slave server is more then INTEGER seconds behind master\n\ 372 printf (" %s\n", "-c, --critical");
371 -c, --critical\n\ 373 printf (" %s\n", _("Exit with CRITICAL status if slave server is more then INTEGER seconds behind master"));
372 Exit with CRITICAL status if slave server is more then INTEGER seconds behind master\n")); 374 printf (" %s\n", _("There are no required arguments. By default, the local database with"));
373 375 printf (_("a server listening on MySQL standard port %d will be checked\n"), MYSQL_PORT);
374 printf (_("\n\
375There are no required arguments. By default, the local database with\n\
376a server listening on MySQL standard port %d will be checked\n"), MYSQL_PORT);
377 376
378 printf (_(UT_SUPPORT)); 377 printf (_(UT_SUPPORT));
379} 378}
@@ -382,7 +381,6 @@ a server listening on MySQL standard port %d will be checked\n"), MYSQL_PORT);
382void 381void
383print_usage (void) 382print_usage (void)
384{ 383{
385 printf ("\ 384 printf (_("Usage:"));
386Usage: %s [-d database] [-H host] [-P port] [-u user] [-p password] [-S]\n", 385 printf ("%s [-d database] [-H host] [-P port] [-u user] [-p password] [-S]\n",progname);
387 progname);
388} 386}
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)
264 264
265 printf ("%s\n", _("This program checks a query result against threshold levels")); 265 printf ("%s\n", _("This program checks a query result against threshold levels"));
266 266
267 print_usage (); 267 printf ("\n\n");
268 268
269 print_usage ();
269 270
270 printf (_(UT_HELP_VRSN)); 271 printf (_(UT_HELP_VRSN));
271 printf (" -q, --query=STRING\n"); 272 printf (" -q, --query=STRING\n");
@@ -292,8 +293,7 @@ print_help (void)
292void 293void
293print_usage (void) 294print_usage (void)
294{ 295{
295 printf ("\ 296 printf (_("Usage:"));
296Usage: %s -q SQL_query [-w warn] [-c crit]\n\ 297 printf ("%s -q SQL_query [-w warn] [-c crit]\n",progname);
297 [-d database] [-H host] [-P port] [-u user] [-p password]\n", 298 printf ("[-d database] [-H host] [-P port] [-u user] [-p password]\n");
298 progname);
299} 299}
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 @@
20 20
21const char *progname = "check_nagios"; 21const char *progname = "check_nagios";
22const char *revision = "$Revision$"; 22const char *revision = "$Revision$";
23const char *copyright = "1999-2004"; 23const char *copyright = "1999-2006";
24const char *email = "nagiosplug-devel@lists.sourceforge.net"; 24const char *email = "nagiosplug-devel@lists.sourceforge.net";
25 25
26#include "common.h" 26#include "common.h"
@@ -262,27 +262,28 @@ print_help (void)
262 262
263 printf (_(COPYRIGHT), copyright, email); 263 printf (_(COPYRIGHT), copyright, email);
264 264
265 printf (_("\ 265 printf ("%s\n", _("This plugin checks the status of the Nagios process on the local machine"));
266This plugin checks the status of the Nagios process on the local\n\ 266 printf ("%s\n", _("The plugin will check to make sure the Nagios status log is no older than"));
267machine. The plugin will check to make sure the Nagios status log is no older\n\ 267 printf ("%s\n", _("the number of minutes specified by the expires option."));
268than the number of minutes specified by the expires option. It also\n\ 268 printf ("%s\n", _("It also checks the process table for a process matching the command argument."));
269checks the process table for a process matching the command argument.\n\n"));
270 269
270 printf ("\n\n");
271
271 print_usage (); 272 print_usage ();
272 273
273 printf (_(UT_HELP_VRSN)); 274 printf (_(UT_HELP_VRSN));
274 275
275 printf (_("\ 276 printf (" %s\n", "-F, --filename=FILE");
276 -F, --filename=FILE\n\ 277 printf (" %s\n", _("Name of the log file to check"));
277 Name of the log file to check\n\ 278 printf (" %s\n", "-e, --expires=INTEGER");
278 -e, --expires=INTEGER\n\ 279 printf (" %s\n", _("Minutes aging after which logfile is considered stale"));
279 Minutes aging after which logfile is considered stale\n\ 280 printf (" %s\n", "-C, --command=STRING");
280 -C, --command=STRING\n\ 281 printf (" %s\n", _("Substring to search for in process arguments"));
281 Substring to search for in process arguments\n")); 282 printf (_(UT_VERBOSE));
282 283 printf ("\n");
283 printf (_("\ 284 printf ("%s\n", _("Examples:"));
284Example:\n\ 285 printf (" %s\n", "check_nagios -e 5 -F /usr/local/nagios/var/status.log -C /usr/local/nagios/bin/nagios");
285 ./check_nagios -e 5 -F /usr/local/nagios/var/status.log -C /usr/local/nagios/bin/nagios\n")); 286 printf (_(UT_SUPPORT));
286} 287}
287 288
288 289
@@ -290,6 +291,6 @@ Example:\n\
290void 291void
291print_usage (void) 292print_usage (void)
292{ 293{
293 printf ("\ 294 printf (_("Usage:"));
294Usage: %s -F <status log file> -e <expire_minutes> -C <process_string>\n", progname); 295 printf ("%s -F <status log file> -e <expire_minutes> -C <process_string>\n", progname);
295} 296}