nagios 监控笔记(三) 六、监控mysql服务
1)、在要监控mysql主机上面建立mysql用户,用作mysql监控服务使用。
grant all on *.* to test@'%' identified by 'test';
2)、在nagios监控服务器上安装check_mysql_health插件.
下载地址:http://www.consol.de/fileadmin/opensource/Nagios/check_mysql_health-2.0.3.tar.gz
tar zxvf check_mysql_health-2.0.3.tar.gz.rar
cd check_mysql_health
./configure --prefix=/usr/local/nagios
make && make install
yum install -y perl-DBD-MySQL.i386 perl-DBD-Pg.i386 # check_mysql_health使用需要这二个发安装包
在运行./check_mysql_health出现以下错误提示,
[root@file]# ./check_mysql_health
-bash: ./check_mysql_health: yes: bad interpreter: No such file or directory