zabbix監控Apache

來源:互聯網
上載者:User

標籤:roo   code   img   查看   from   blog   zabbix監控   lan   location   

環境:zabbix 3.2  Apache/2.2.15

[[email protected] ~]# cat /etc/httpd/conf/httpd.conf  | grep status  #查看是否安裝mod_status.so模組
LoadModule status_module modules/mod_status.so  

修改httpd.conf

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Allow from all
</Location>

然後重啟一下httpd服務:/etc/init.d/httpd restart

訪問一下出現這個介面表示ok了

http://ip/server-status

編寫apache狀態監控指令碼

[[email protected] zabbix]#mkdir /etc/zabbix/monitor_scripts  #在zabbix目錄下建立監控指令碼目錄
[[email protected] zabbix]#vim /etc/zabbix/zabbix_agentd.conf  #Include=/etc/zabbix/zabbix_agentd.conf.d添加一行
[[email protected] zabbix]# cat /etc/zabbix/zabbix_agentd.conf.d/userparameter_zapache.conf  #建立一個設定檔,添加一行
UserParameter=zapache[*],/etc/zabbix/monitor_scripts/zapache.sh \$1
[[email protected] zabbix]# /etc/init.d/zabbix-agent restart  #重啟一下zabbix_agent

apache指令碼和監控模組:https://pan.baidu.com/s/1eRBKEcE          (提取密碼:nxs5)

在zabbix介面裡匯入apache監控模組

然後選擇下載好的模板上傳就可以了

配置--主機--編輯--添加模板--建立圖形

 

zabbix監控Apache

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.