Nagios监视mysql数据库大小

是否有一些插件监控数据库的大小在Nagios? 当然,我可以用这样的查询来写一些bash脚本:

SELECT table_schema \“DB Name \”,sum(data_length + index_length)/ 1024/1024 \“DB Size in MB \”FROM information_schema.TABLES GROUP BY table_schema

但也许有一些。

谢谢你的帮助。

看看check_mysql_query插件:

 check_mysql_query -H myserver -u mylogin -p mypassword -q "SELECT sum( data_length + index_length ) / 1024 / 1024 \"DB Size in MB\" FROM information_schema.TABLES GROUP BY table_schema" -w 200 -c 300 

SQL查询( -q )只能返回一个值,它必须是数字。