开发者

Nagios / check_mysql_query - show variables

开发者 https://www.devze.com 2022-12-31 19:30 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消