Module: check_mk
Branch: master
Commit: 22d28fd2f5a624eb69417a6ee34cae223f714356
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=22d28fd2f5a624…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jun 4 13:48:38 2014 +0200
MySQL agent: Preparation for monitoring slave state
---
agents/plugins/mk_mysql | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/agents/plugins/mk_mysql b/agents/plugins/mk_mysql
index de28d4c..8f9707f 100755
--- a/agents/plugins/mk_mysql
+++ b/agents/plugins/mk_mysql
@@ -31,5 +31,13 @@ then
mysqladmin --defaults-extra-file=$MK_CONFDIR/mysql.cfg ping 2>&1
mysql --defaults-extra-file=$MK_CONFDIR/mysql.cfg -sN \
- -e "select '<<<mysql>>>' ; show global status; show
global variables; select '<<<mysql_capacity>>>' ; SELECT
table_schema, sum( data_length + index_length ), sum( data_free ) FROM
information_schema.TABLES GROUP BY table_schema;"
+ -e "select '<<<mysql>>>' ;
+ show global status ; show global variables ;
+
+ select '<<<mysql_capacity>>>' ;
+ SELECT table_schema, sum(data_length + index_length), sum(data_free)
+ FROM information_schema.TABLES GROUP BY table_schema ;
+
+ SELECT '<<<mysql_slave>>>' ;
+ show slave status\G"
fi