网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

nagios监控slave(check_mysql_health插件)

nagios 监控slave(check_MySQL_health插件)

创新互联公司专注为客户提供全方位的互联网综合服务,包含不限于成都做网站、网站建设、准格尔网络推广、成都小程序开发、准格尔网络营销、准格尔企业策划、准格尔品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们最大的嘉奖;创新互联公司为所有大学生创业者提供准格尔建站搭建服务,24小时服务热线:028-86922220,官方网址:www.cdcxhl.com


http://labs.consol.de/wp-content/uploads/2011/08/check_mysql_health-2.1.7.tar.gz

 

# mount /dev/cdrom /media/cdrom
# rpm -ivh /media/cdrom/Server/perl-DBI-1.52-2.el5.i386.rpm
# rpm -ivh /media/cdrom/Server/perl-DBD-MsSQL-3.0007-2.el5.i386.rpm --nodeps

# tar zxf check_mysql_health-2.1.7.tar.gz
# cd check_mysql_health-2.1.7
# ./configure
# make && make install

 

# mysql -u root -p123456
> grant all on *.* to ming@'192.168.1.10' identified by '123456';
> quit
 


下面要借助于nrpe(nrpe安装步骤略)


# vi /usr/local/nagios/etc/nrpe.cfg

command[slave_io_running]=/usr/local/nagios/libexec/check_mysql_health --hostname 192.168.1.10 --port 3306 --username ming --password 123456 --mode slave-io-running --critical No

command[slave_io_running]=/usr/local/nagios/libexec/check_mysql_health --hostname 192.168.1.10 --port 3306 --username ming --password 123456 --mode slave-sql-running --critical No


:wq

重启nrpe:

# killall nrpe
# /usr/local/nagios/bin/nrpe  -c /usr/local/nagios/etc/nrpe.cfg -d


# vi /usr/local/nagios/etc/objects/ming.cfg                     (ming.cfg为监控主机的文件,自建的)


define service{
        use                             local-service         ; Name of service template to use
        host_name                       myhostname
        service_description             slave-io-running
        check_command                   check_nrpe!slave_io_running
        }

define service{
        use                             local-service         ; Name of service template to use
        host_name                       myhostname
        service_description             slave-sql-running
        check_command                   check_nrpe!slave_sql_running
        }


:wq


重启nagios


# service nagios restart

 


分享标题:nagios监控slave(check_mysql_health插件)
文章分享:http://bjjierui.cn/article/pijdpj.html

其他资讯