监控端——nagios服务器
被监控端——mysql主从
- 在被监控端安装nagios-plugin、nrpe-3.2.0、和percona-monitoring-plugins插件,在监控端安装nagios-plugins和nrpe-3.2.0
nagios-plugins插件上篇文章已经讲过,在此不再重复,需要的可以去这里查看
http://blog.csdn.net/qq_34605594/article/details/74643592
安装nrpe
wget https://github.com/NagiosEnterprises/nrpe/releases/download/nrpe-3.2.0/nrpe-3.2.0.tar.gz
tar xf nrpe-3.2.0.tar.gz
cd nrpe-3.2.0
./configure
make all
make install
make install-plugin
make install-config
make install-init
make install-plugin安装percona插件
wget https://www.percona.com/downloads/percona-monitoring-plugins/percona-monitoring-plugins-1.1.7/binary/tarball/percona-monitoring-plugins-1.1.7.tar.gz
useradd nagios -s /sbin/nologin #添加nagios用户
tar xf tar xf percona-monitoring-plugins-1.1.7.tar.gz #解压文件
cd percona-monitoring-plugins-1.1.7
cd nagios/bin/
cp -ra * /usr/local/nagios/libexec/ #复制文件到插件目录
cd /usr/local/nagios/libexec/
chown nagios. * #修改所属用户和组
未完待续。。。。