- 工信部備案號 滇ICP備05000110號-1
- 滇公安備案 滇53010302000111
- 增值電信業(yè)務(wù)經(jīng)營(yíng)許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯(lián)網(wǎng)協(xié)會(huì )理事單位
- 安全聯(lián)盟認證網(wǎng)站身份V標記
- 域名注冊服務(wù)機構許可:滇D3-20230001
- 代理域名注冊服務(wù)機構:新網(wǎng)數碼
Zabbix3.0監控Apache2.4服務(wù)器狀態(tài)
我們需要啟動(dòng)mod_status來(lái)監控apache,執行如下命令:
a2enmod status
然后找到status.conf來(lái)配置mod_status,如果使用的是Debian發(fā)行版本,status.conf文件應該在/etc/apache2/mods-enabled/status.conf,配置如下:
<IfModule mod_status.c> # # Allow server status reports generated by mod_status, # with the URL of http://www.tjdsmy.cn/server-status # Uncomment and change the ".example.com" to allow # access from other hosts. # ExtendedStatus On <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 </Location> Listen 61709 NameVirtualHost 127.0.0.1:61709 <VirtualHost 127.0.0.1:61709> </VirtualHost> </IfModule>
然后重啟apache
/etc/init.d/apache2 restart
并添加如下行到zabbix的/etc/zabbix/zabbix_agentd.conf:
# Apache Keys UserParameter=apache.status[*],wget -q -O /dev/null "http://www.tjdsmy.cn:61709/server-status?auto" && wget -q -O - "http://www.tjdsmy.cn:61709/server-status?auto" | awk '/$1: / {print $NF}'
現在重啟zabbix agent。
/etc/init.d/zabbix-agent restart
之后就可以在zabbix看到apache的監控數據了。
售前咨詢(xún)
售后咨詢(xún)
備案咨詢(xún)
二維碼
TOP