Nagios 監控 Mysql

來源:互聯網
上載者:User

標籤:

  1. 被監控機的Mysql監控
    建立專用資料庫、專用資料庫賬戶
    mysql -uroot -p
    create database nagios_monitor;
    grant select on nagios_monitor.* to [email protected]‘%‘ identified by ‘nagiosMonitor‘;
    flush privileges;
    exit;
    測試check_mysql指令碼運行是否正常
    cd /usr/lib64/nagios/plugins
    ./check_mysql -unagios -pnagiosMonitor

    編輯nrpe.cfg檔案
    vi /usr/local/nagios/etc/nrpe.cfg 添加如下一行
    command[check_mysql]=/usr/lib64/nagios/plugins/check_mysql -unagios -pnagiosMonitor
    回到nagios監控伺服器
    修改services.cfg檔案
    vi /etc/nagios/objects/services.cfg
    添加如下代碼
    define service{        use                     generic-service        host_name               Nagios_Centos_Client1        service_description     Mysql Monitoring        check_command           check_nrpe!check_mysql        }
    check_mysql Code

    nagios -v nagios.cfg 檢查nagios設定檔是否正確
    重啟nagios服務即可






Nagios 監控 Mysql

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.