[nagiosplug] check_dbi: Added simple regex example to help ...

"Nagios Plugin Development" <[email protected]> Wed, 4 Jul 2012 22:11:01 +0000
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
 Module: nagiosplug
 Branch: master
 Commit: 022ba7ea3abbc56f70c3310ae85278c5b8da40ac
 Author: Sebastian Harl <[email protected]>
   Date: Mon Apr 18 13:47:26 2011 +0200
    URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=022ba7e

check_dbi: Added simple regex example to help output.

---

 plugins/check_dbi.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/plugins/check_dbi.c b/plugins/check_dbi.c
index 1edc2e4..03ec9ce 100644
--- a/plugins/check_dbi.c
+++ b/plugins/check_dbi.c
@@ -595,6 +595,12 @@ print_help (void)
 	printf ("  Warning if connecting to the database takes more than half of a second;\n");
 	printf ("  critical if it takes more than 2 seconds.\n\n");
 
+	printf ("  check_dbi -d mysql -H localhost -o username=user \\\n");
+	printf ("    -q 'SELECT concat(@@version, \" \", @@version_comment)' \\\n");
+	printf ("    -r '^5\\.[01].*MySQL Enterprise Server'\n");
+	printf ("  Critical if the database server is not a MySQL enterprise server in either\n");
+	printf ("  version 5.0.x or 5.1.x.\n\n");
+
 	printf ("  check_dbi -d pgsql -u username=user -m SERVER_VERSION \\\n");
 	printf ("    -w 090000:090099 -c 090000:090199\n");
 	printf ("  Warn if the PostgreSQL server version is not 9.0.x; critical if the version\n");


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/