Enable mod_status
a2enmod status
Configure mod_status (/etc/apache2/mods-enabled/status.conf on Debian)
<IfModule mod_status.c> # # Allow server status reports generated by mod_status, # with the URL of http://servername/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>
Restart Apache
/etc/init.d/apache2 restart
Add the following to the end of /etc/zabbix/zabbix_agentd.conf
# Apache Keys UserParameter=apache.status[*],wget -q -O /dev/null "http://localhost:61709/server-status?auto" && wget -q -O - "http://localhost:61709/server-status?auto" | awk '/$1: / {print $NF}'
Restart the Zabbix agent
/etc/init.d/zabbix-agent restart