gpt4 book ai didi

mysql - Nagios/check_mysql_query - 显示变量

转载 作者:行者123 更新时间:2023-11-29 07:13:37 24 4
gpt4 key购买 nike

我想确保所有的 mysql 服务器都有特定的配置(max_connections>1000,innodb_file_per_table=on)并通过 nagios 进行定期检查。

但是 nagios 插件 check_mysql_query 状态

Only first column in first row will be read" ... "The result from the query should be numeric

有没有人知道如何设置 check_mysql_query 插件来读取

的输出
show variables like '%max_user_connections%;

...产生:

+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| max_connections | 1000 |
+----------------------+-------+

最佳答案

回答我自己的问题 -

mysql> SELECT @@max_connections;+-------------------+| @@max_connections |+-------------------+|               886 |+-------------------+1 row in set (0.03 sec)

成功了

关于mysql - Nagios/check_mysql_query - 显示变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2906106/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com