nagios监控slave(check_mysql_health插件)-创新互联-成都创新互联网站建设

关于创新互联

多方位宣传企业产品与服务 突出企业形象

公司简介 公司的服务 荣誉资质 新闻动态 联系我们

nagios监控slave(check_mysql_health插件)-创新互联

nagios 监控slave(check_mysql_health插件)

10年积累的成都网站制作、做网站、外贸营销网站建设经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先网站制作后付款的网站建设流程,更有肇州免费网站建设让你可以放心的选择与我们合作。

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

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


分享题目:nagios监控slave(check_mysql_health插件)-创新互联
网址分享:http://kswsj.cn/article/dgcjdo.html

其他资讯