nagios mysql 数据库_Nagios使用check_mysql监控mysql

工作原理:

利用特定的用户定期访问指定的mysql数据库。当不能访问或连不通时则报警。

1、在生产库上安装nagios插件

备注:编译完显示一定要有mysql支持,不然没有check_mysql插件

check_mysql插件

nagios监控mysql使用的是 check_mysql 这个插件,需要在nagios服务器上先安装mysql-devel,然后再重新安装nagios-plugin,这样才会出现check_mysql。否则即使copy了一份,也照样用不了。

2、编译或重新编译 nagios-plugin[root@cloud src]# tar zxf nagios-plugins-2.1.1.tar.gz

[root@cloud src]# cd nagios-plugins-2.1.1

[root@cloud nagios-plugins-2.1.1]# ./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-user=nagios --with-command-group=nagcmd

[root@cloud nagios-plugins-2.1.1]# make

[root@cloud nagios-plugins-2.1.1]# make install

[root@cloud nagios-plugins-2.1.1]# chmod 755 /usr/local/nagios

3、查看 check_mysql# ls /usr/local/nagios/libexec/check_mysql

4、建立专用数据

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值