Nagios / check_mysql_query - show variables
I want to make sure all of the mysql servers have a certain configuration (max_connections>1000, innodb_file_per_table=on) and do regular checks via nagios.
However the nagios plugin check_mysql_query states
Only first column in first row will be read" ... "The result from the query should be numeric
Has anybody an idea how to setup the check_mysql_query plugin to read the output of
show variables like '%max_user_connections%;
...to produce:
+----------------------+-------+
| Variable_name 开发者_StackOverflow社区 | Value |
+----------------------+-------+
| max_connections | 1000 |
+----------------------+-------+
answering my own question -
mysql> SELECT @@max_connections; +-------------------+ | @@max_connections | +-------------------+ | 886 | +-------------------+ 1 row in set (0.03 sec)
does the trick
精彩评论