Environment: 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
Modify Httpd.conf
<Location/server-status>
SetHandler Server-status
Order Deny,allow
Allow from all
</Location>
And then restart the HTTPD service:/etc/init.d/httpd restart
Visit this interface to show the OK.
Http://ip/server-status
Writing Apache Status monitoring scripts
[[email protected] Zabbix] #mkdir/etc/zabbix/monitor_scripts #在zabbix目录下创建监控脚本目录
[[email protected] Zabbix] #vim/etc/zabbix/zabbix_agentd.conf Add a line #Include =/ETC/ZABBIX/ZABBIX_AGENTD.CONF.D
[[email protected] zabbix]# cat/etc/zabbix/zabbix_agentd.conf.d/userparameter_zapache.conf #新建一个配置文件, add a row
Userparameter=zapache[*],/etc/zabbix/monitor_scripts/zapache.sh \$1
[Email protected] zabbix]#/etc/init.d/zabbix-agent restart #重启一下zabbix_agent
Apache Script and Monitoring module: Https://pan.baidu.com/s/1eRBKEcE (extract password: NXS5)
Import Apache monitoring module in Zabbix interface
Then select the downloaded template to upload it.
Configuration--Host--edit--Add template--Create graphics
Zabbix surveillance Apache