[Nagiosplug-checkins] nagiosplug/plugins check_ldap.c, 1.30, 1.31 check_load.c, 1.30, 1.31 check_mrtg.c, 1.25, 1.26 check_mysql.c, 1.30, 1.31 check_mysql_query.c, 1.2, 1.3 check_nagios.c, 1.29, 1.30

Benoit Mortier opensides at users.sourceforge.net
Thu Jun 15 14:52:27 CEST 2006


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15673/plugins

Modified Files:
	check_ldap.c check_load.c check_mrtg.c check_mysql.c 
	check_mysql_query.c check_nagios.c 
Log Message:

cleaning help and usage



Index: check_mrtg.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_mrtg.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- check_mrtg.c	13 Oct 2005 09:58:12 -0000	1.25
+++ check_mrtg.c	15 Jun 2006 12:52:25 -0000	1.26
@@ -305,10 +305,11 @@
 	printf ("Copyright (c) 1999 Ethan Galstad <nagios at 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 @@
 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");
 }

Index: check_mysql.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_mysql.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- check_mysql.c	17 Mar 2006 14:07:34 -0000	1.30
+++ check_mysql.c	15 Jun 2006 12:52:25 -0000	1.31
@@ -347,33 +347,32 @@
 
 	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 @@
 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);
 }

Index: check_ldap.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ldap.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- check_ldap.c	25 Dec 2004 23:17:44 -0000	1.30
+++ check_ldap.c	15 Jun 2006 12:52:25 -0000	1.31
@@ -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 at lists.sourceforge.net";
 
 #include "common.h"
@@ -392,8 +392,8 @@
 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",

Index: check_load.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_load.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- check_load.c	14 Sep 2005 09:53:49 -0000	1.30
+++ check_load.c	15 Jun 2006 12:52:25 -0000	1.31
@@ -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 at lists.sourceforge.net";
 
 #include "common.h"
@@ -272,18 +272,19 @@
 	printf ("Copyright (c) 1999 Felipe Gustavo de Almeida <galmeida at 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 @@
 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);
 }

Index: check_nagios.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_nagios.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- check_nagios.c	2 Dec 2005 22:28:06 -0000	1.29
+++ check_nagios.c	15 Jun 2006 12:52:25 -0000	1.30
@@ -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 at lists.sourceforge.net";
 
 #include "common.h"
@@ -262,27 +262,28 @@
 
 	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 @@
 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);
 }

Index: check_mysql_query.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_mysql_query.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- check_mysql_query.c	17 Mar 2006 14:07:34 -0000	1.2
+++ check_mysql_query.c	15 Jun 2006 12:52:25 -0000	1.3
@@ -264,8 +264,9 @@
 
 	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 @@
 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");
 }





More information about the Commits mailing list