summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Harl <sh@teamix.net>2011-04-15 15:02:48 +0200
committerSebastian Harl <sh@teamix.net>2012-06-06 14:10:55 +0200
commiteda2fe7f40810a03e1c9c32701916387fdf86165 (patch)
treeeda7a5608ef1b715ba6bbb6c2400a96a7592bc12
parent4ad6e441b68cca4b2f283af3f783794279fbb11c (diff)
downloadmonitoring-plugins-eda2fe7f40810a03e1c9c32701916387fdf86165.tar.gz
check_dbi: Added some examples to the help output.
-rw-r--r--plugins/check_dbi.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/plugins/check_dbi.c b/plugins/check_dbi.c
index 4a0a4d69..eefcf02a 100644
--- a/plugins/check_dbi.c
+++ b/plugins/check_dbi.c
@@ -455,7 +455,22 @@ print_help (void)
455 455
456 printf (" %s\n", _("The number and type of required DBI driver options depends on the actual")); 456 printf (" %s\n", _("The number and type of required DBI driver options depends on the actual"));
457 printf (" %s\n", _("driver. See its documentation at http://libdbi-drivers.sourceforge.net/")); 457 printf (" %s\n", _("driver. See its documentation at http://libdbi-drivers.sourceforge.net/"));
458 printf (" %s\n", _("for details.")); 458 printf (" %s\n\n", _("for details."));
459
460 printf (" %s\n", _("Examples:"));
461 printf (" check_dbi -d pgsql -o username=postgres -m QUERY_RESULT \\\n");
462 printf (" -q 'SELECT COUNT(*) FROM pg_stat_activity' -w 5 -c 10\n");
463 printf (" Warning if more than five connections; critical if more than ten.\n\n");
464
465 printf (" check_dbi -d mysql -H localhost -o username=user -o password=secret \\\n");
466 printf (" -q 'SELECT COUNT(*) FROM logged_in_users -w 5:20 -c 0:50\n");
467 printf (" Warning if less than 5 or more than 20 users are logged in; critical\n");
468 printf (" if more than 50 users.\n\n");
469
470 printf (" check_dbi -d firebird -o username=user -o password=secret -o dbname=foo \\\n");
471 printf (" -m CONN_TIME -w 0.5 -c 2\n");
472 printf (" Warning if connecting to the database takes more than half of a second;\n");
473 printf (" critical if it takes more than 2 seconds.\n");
459 474
460 printf (UT_SUPPORT); 475 printf (UT_SUPPORT);
461} 476}