Apache monitoring script for Zabbix

Installation

CentOS 6.4/Zabbix 2.0 from EPEL repo

On the apache server:

Install files
sudo install -o root -g root -m 0755 zapache /var/lib/zabbixsrv/externalscripts/zapache
sudo install -d /etc/zabbix_agentd.conf.d
echo "Include=/etc/zabbix_agentd.conf.d/" | sudo tee -a /etc/zabbix_agentd.conf
sudo install -o root -g root -m 0644 userparameter_zapache.conf.sample /etc/zabbix_agentd.conf.d/userparameter_zapache.conf
sudo install -o root -g root -m 0644 httpd-server-status.conf.sample /etc/httpd/conf.d/httpd-server-status.conf
Restart
sudo service httpd restart
sudo service zabbix-agent restart
Check if it's working
sudo -u zabbix /var/lib/zabbixsrv/externalscripts/zapache Uptime
sudo -u zabbix zabbix_agentd -p | grep ^zapache
sudo -u zabbix zabbix_get -s localhost -k zapache[Uptime]

On Zabbix server

Now import zapache-template.xml and zapache-template-active.xml on Zabbix server and bind "Template App Apache Web Server zapache" OR "Template App Apache Web Server zapache Agent Active" template to Apache host.

Download