老熟女激烈的高潮_日韩一级黄色录像_亚洲1区2区3区视频_精品少妇一区二区三区在线播放_国产欧美日产久久_午夜福利精品导航凹凸

重慶分公司,新征程啟航

為企業提供網站建設、域名注冊、服務器等服務

nagios監控mysql(check_mysql_health插件)

nagios 監控MySQL(check_mysql_health插件)

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@'localhost' identified by '123456';
> quit
 
注:讓該用戶有訪問本地mysql的權限即可,可用mysql -u ming -p123456驗證,權限不一定給all

 
方式一(localhost監控):
 
# vi /usr/local/nagios/etc/objects/commands.cfg
 
define command{
        command_name    check_mysql_health
        command_line    $USER1$/check_mysql_health --hostname $ARG1$ --port $ARG2$ --username $ARG3$ --password $ARG4$ --mode $ARG5$
--warning $ARG6$ --critical $ARG7$
        }
:wq

# vi /usr/local/nagios/etc/objects/localhost.cfg

define service{
        use                             local-service         ; Name of service template to use
        host_name                       myhostname
        service_description             check_mysql_connections
        check_command                   check_mysql_health!192.168.1.10!3306!ming!123456!threads-connected!700!1000
        }

:wq
 

可先測試一下:
 
#./check_mysql_health --hostname 192.168.1.10 --port 3306 --username ming --password 123456 --mode threads-connected --warning 700 --critical 1000
 
注:在線程數(連接數)超過1000或無法連接時紅燈報警,線程數在700以內0以上為綠燈,700到1000之間為黃燈。
 
方式二(nrpe監控):
 
下面要借助于nrpe(nrpe安裝步驟略)

# vi /usr/local/nagios/etc/nrpe.cfg
command[check_mysql]=/usr/local/nagios/libexec/check_mysql_health --hostname 192.168.1.10 --port 3306 --username ming --password 123456 --mode threads-connected --warning 700 --critical 1500

: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             check_mysql
        check_command                   check_nrpe!check_mysql
        }

:wq
 
 
附:
利用check_mysql_health實現多種監控模式:
       connection-time          (Time to connect to the server)
       uptime                   (Time the server is running)
       threads-connected        (Number of currently open connections)線程數
       threadcache-hitrate      (Hit rate of the thread-cache)慢查詢
       slave-lag                (Seconds behind master)
       slave-io-running         (Slave io running: Yes)主從熱備
       slave-sql-running        (Slave sql running: Yes)主從熱備
       qcache-hitrate           (Query cache hitrate)
       qcache-lowmem-prunes     (Query cache entries pruned because of low memory)
       keycache-hitrate         (MyISAM key cache hitrate)
       bufferpool-hitrate       (InnoDB buffer pool hitrate)
       bufferpool-wait-free     (InnoDB buffer pool waits for clean page available)
       log-waits                (InnoDB log waits because of a too small log buffer)
       tablecache-hitrate       (Table cache hitrate)
       table-lock-contention    (Table lock contention)鎖表率
       index-usage              (Usage of indices)
       tmp-disk-tables          (Percent of temp tables created on disk)
       slow-queries             (Slow queries)
       long-running-procs       (long running processes)
       cluster-ndbd-running     (ndnd nodes are up and running)
       sql                      (any sql command returning a single number)

 

汝陽網站制作公司哪家好,找成都創新互聯!從網頁設計、網站建設、微信開發、APP開發、自適應網站建設等網站項目制作,到程序開發,運營維護。成都創新互聯2013年至今到現在10年的時間,我們擁有了豐富的建站經驗和運維經驗,來保證我們的工作的順利進行。專注于網站建設就選成都創新互聯


網站欄目:nagios監控mysql(check_mysql_health插件)
鏈接分享:http://www.xueling.net.cn/article/jseshp.html

其他資訊

在線咨詢
服務熱線
服務熱線:028-86922220
TOP
主站蜘蛛池模板: 亚洲日本高清 | www一片黄 | 亚洲毛片网站 | 九色porny视频黑人 | 少妇久久久久久久久久 | 婷婷伊人网 | av在线播放中字 | 五月婷婷久久综合 | 国产免费看又黄又大又污的胸 | 综合99| 国产精品一区二区免费在线观看 | 午夜资源| 亚洲视频一区二区在线观看 | 又爽又黄又无遮挡网站动态图 | 69视频免费在线观看 | 777yyy亚洲精品一区二区 | 国产卡一卡2卡三卡免费视频 | 色综合久久久久久久久久 | 亚洲国产天堂久久综合 | 国内精品久久久久久久影视红豆 | 国产性受xxxx黑人xyx性爽 | 国产a级黄色片 | 国产区91 | 99精品不卡一区二区三区 | 偷妻无码一区二区三区动漫 | 无套日出白浆17p | 色小妹av| 欧美性猛交xxxx乱大交喷浆 | 欧美日韩国产精品一区二区 | 伊人成人精品 | 人与动人物a级毛片在线 | 豪放女大兵在线播放 | 风流少妇BBWBBW69视频 | 国产免费一区二区三区四区 | 全职猎人1999在线动漫免费观看 | 久久高清片 | 黄色小毛片 | 美女视频免费是黄的网站高清 | 成人精品国产区在线观看 | 日韩毛片免费无码无毒视频观看 | 日日碰日日摸日日澡视频播放 |