This program gathers data from Apache's built-in status page and sends it to Zabbix. The data is sent via the CLI tool zabbix_sender.
See http://www.zabbix.com/wiki/templates/apache for a detailed install guide
Add this to your Apache config file:
<Location /server-status>
SetHandler server-status
Allow from 127.0.0.1
Order deny,allow
Deny from all
</Location>
ExtendedStatus On # Optional. Must be in global scope and not in a virtual host
``kill -USR1
cat /var/run/httpd.pid ```` for zero downtimeNow continue with either Zabbix Agent Mode mode or Cron mode.
This method relies on your polling interval for an item called apache.status, and will honor any maintenance windows. The check will run on the host being monitored everytime time apache.status is polled. This item is defined as a UserParameter like this:
# returns a single integer, but uses zabbix_sender to populate trapper items
UserParameter=apache.status,/var/lib/zabbix/bin/check_apache --config /etc/zabbix_agentd.conf
Install on apache server to be monitored and connect to status page on localhost. Assumes zabbix-agent is installed.
grep Include /etc/zabbix_agentd.conf
This method can run remotely or locally via cron. This method relies on your cron scheduler to set the polling interval, and is unaware of any maintenance windows.
Install on Zabbix server or the host to monitor:
Repeat above cron lines to monitor multiple hosts. Use the -o option if these URL differs from the hostname.
GPLv2 - See LICENSE file