summaryrefslogtreecommitdiffstats
path: root/plugins/check_mysql_query.c
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-05-07 10:02:42 (GMT)
committerThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-05-07 10:02:42 (GMT)
commit44f8455b2cf248c6f50c35bfc3510d2946084c5b (patch)
tree26b696c5d61872f1d41466be9fcc650c22d75aeb /plugins/check_mysql_query.c
parent4d157889e3018119e07bdcc7f48afde1422f7396 (diff)
downloadmonitoring-plugins-44f8455b2cf248c6f50c35bfc3510d2946084c5b.tar.gz
Added support for --extra-opts in all C plugins (disabled by default, see configure --help)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1991 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_mysql_query.c')
-rw-r--r--plugins/check_mysql_query.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c
index 171fc69..6c5e436 100644
--- a/plugins/check_mysql_query.c
+++ b/plugins/check_mysql_query.c
@@ -78,6 +78,9 @@ main (int argc, char **argv)
78 bindtextdomain (PACKAGE, LOCALEDIR); 78 bindtextdomain (PACKAGE, LOCALEDIR);
79 textdomain (PACKAGE); 79 textdomain (PACKAGE);
80 80
81 /* Parse extra opts if any */
82 argv=np_extra_opts (&argc, argv, progname);
83
81 if (process_arguments (argc, argv) == ERROR) 84 if (process_arguments (argc, argv) == ERROR)
82 usage4 (_("Could not parse arguments")); 85 usage4 (_("Could not parse arguments"));
83 86
@@ -294,6 +297,7 @@ print_help (void)
294 print_usage (); 297 print_usage ();
295 298
296 printf (_(UT_HELP_VRSN)); 299 printf (_(UT_HELP_VRSN));
300 printf (_(UT_EXTRA_OPTS));
297 printf (" -q, --query=STRING\n"); 301 printf (" -q, --query=STRING\n");
298 printf (" %s\n", _("SQL query to run. Only first column in first row will be read")); 302 printf (" %s\n", _("SQL query to run. Only first column in first row will be read"));
299 printf (_(UT_WARN_CRIT_RANGE)); 303 printf (_(UT_WARN_CRIT_RANGE));
@@ -313,6 +317,12 @@ print_help (void)
313 printf (" %s\n", _("A query is required. The result from the query should be numeric.")); 317 printf (" %s\n", _("A query is required. The result from the query should be numeric."));
314 printf (" %s\n", _("For extra security, create a user with minimal access.")); 318 printf (" %s\n", _("For extra security, create a user with minimal access."));
315 319
320#ifdef NP_EXTRA_OPTS
321 printf ("\n");
322 printf ("%s\n", _("Notes:"));
323 printf (_(UT_EXTRA_OPTS_NOTES));
324#endif
325
316 printf (_(UT_SUPPORT)); 326 printf (_(UT_SUPPORT));
317} 327}
318 328