System environment: centos6.3 x64
apache:httpd-2.4.4
zabbix:zabbix-2.06
First download the template on this machine: Https://github.com/rdvn/zabbix-templates/archive/master.zip
The ZIP package has Apache, Memcache, Redis, varnish templates, we unzipped the use of the Apache template
First, open the server-status of Apache:
# vi/usr/local/apache2/conf/httpd.conf
The last line adds the following:
---------------------
Extendedstatus on
<location/server-status>
SetHandler Server-status
Order Allow,deny
Allow from all
</location>
---------------------
Restart Apache for it to take effect:
#/usr/local/apache2/bin/apachectl Restart
Two. Zabbix Configuration:
Upload the apache_status.sh under the Apache directory in the downloaded ZIP package to the system/usr/local/bin/and give
Execute permissions
# chmod +x apache_status.sh
# ll/usr/local/bin/apache_status.sh
---------------
-rwxr-xr-x 1 root root 248 April apache_status.sh
---------------
To modify the zabbix_agentd.conf configuration:
# vi/usr/local/etc/zabbix_agentd.conf
The last line adds the following:
-------------
Userparameter=apache[*],/usr/local/bin/apache_status.sh $
-------------
Restart the Zabbix service
# Pkill Zabbix
#/ETC/INIT.D/ZABBIX_AGENTD Start