分布式監控系統Zabbix-3.0.3-完整安裝記錄 -添加apache監控

來源:互聯網
上載者:User

標籤:監控指令碼   rate   default   https   mem   移除   ...   .so   agent   

 

前面介紹了zabbix3.0.3環境及相關監控項的添加,下面介紹下針對apache的監控配置:
1)在apache設定檔中開啟server-status狀態訪問功能(內建的)

[[email protected] ~]# /data/apache/bin/httpd -vServer version: Apache/2.4.25 (Unix)Server built:   Jun 19 2017 19:18:00[[email protected] ~]# cat /data/apache/conf/httpd.conf|grep status    //確保apache支援status查詢功能LoadModule status_module modules/mod_status.so [[email protected] ~]# cat /data/apache/conf/httpd.conf|grep httpd-info.conf       Include conf/extra/httpd-info.conf                //開啟這一行的注釋 [[email protected] ~]# cat /data/apache/conf/extra/httpd-info.conf.........<Location /server-status>    SetHandler server-status    Order deny,allow    Allow from all</Location> ## ExtendedStatus controls whether Apache will generate "full" status# information (ExtendedStatus On) or just basic information (ExtendedStatus# Off) when the "server-status" handler is called. The default is Off.#ExtendedStatus On [[email protected] ~]# /data/apache/bin/httpd -k restart      //重啟apache服務 然後就可以訪問apache的狀態頁面了[[email protected] ~]# curl http://localhost/server-status[[email protected] ~]# curl http://localhost/server-status?autolocalhostServerVersion: Apache/2.4.25 (Unix) OpenSSL/1.0.2l PHP/5.6.30ServerMPM: event...........ConnsTotal: 2ConnsAsyncWriting: 0ConnsAsyncKeepAlive: 1ConnsAsyncClosing: 1Scoreboard: ___________________________________________________________________________________________W________............................................................................................................................................................................................................................................................................................................TLSSessionCacheStatusCacheType: SHMCBCacheSharedMemory: 512000CacheCurrentEntries: 6.......

2)編寫apache狀態監控指令碼

[[email protected] ~]# ll /data/zabbix/monitor_scripts/zapache.sh-rwxr-xr-x 1 zabbix zabbix 6.0K 6月  25 01:47 /data/zabbix/monitor_scripts/zapache.sh[[email protected] ~]# cat /data/zabbix/etc/zabbix_agentd.conf|grep Include### Option: IncludeInclude=/data/zabbix/etc/zabbix_agentd.conf.d/[[email protected] ~]# cat /data/zabbix/etc/zabbix_agentd.conf.d/userparameter_zapache.conf ## This is a sample zabbix_agentd config file.# Put it to /etc/zabbix_agentd.conf.d or otherwise integrate into agent config.# Edit to your needs.#UserParameter=zapache[*],/data/zabbix/monitor_scripts/zapache.sh \$1[[email protected] ~]# /etc/init.d/zabbix_agentd restart

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

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

接著在“主機”的模組裡添加apache模組(對應模組的監控圖形可以自己根據需要進行添加或移除)

點擊“添加”,就能看到該監控項的所有圖形了。

分布式監控系統Zabbix-3.0.3-完整安裝記錄 -添加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.