This template uses a daemon to cache Apache mod_status values that will be then queried by a Zabbix script.Daemon will minimice monitorization resquests to the server caching results.Cache daemon should be used as a cron task per objecy server.
Apache Server Status Open Slot With No Current Process
Items
Tons of Apache Process at W (sending reply) status (https. Open slot with no current process. I don't really know, what's causing Apache to take that too much time to send a reply. Also, once it reaches that amount of load, it throws tons of error: Code.
Total Accesses
Total kBytes
CPU Load
Requests Per Second
Bytes Per Second
Bytes Per Request
Number of Busy Workers
Number of Idle Workers
Number of slots: Waiting for Connection
Number of slots: Starting up
Number of slots: Reading Request
Number of slots: Sending Reply
Number of slots: Keepalive (read)
Number of slots: DNS Lookup
Number of slots: Closing connection
Number of slots: Logging
Number of slots: Gracefully finishing
Number of slots: Idle cleanup of worker
Number of slots: Open slot with no current process
Triggers
######Recomend to create your how trigger to take care of 'Waiting for Connection' slot number. Match it to your 'MinSpareServer' from ' directive in httpd.conf
Graphs
- Workers Status
- Requests stats (Requests per second and Bytes per request)
- Accesses stats (Total accesses and Request per second)
Scripts
'fetch_apachestat.py' is a Python script that should act a cron task to download regularly mod_status values from server indicated and store it in a cache file.
'query_apachestat.py' will be executed as a Zabbix external script. Available metrics (any other will fail):
Installation
Download the scripts and move to your zabbix userscripts dir, i.e: /usr/lib/zabbix/externalscripts
Run chmod +x on the files
Add this to crontab: */5 * * * * /usr/bin/python /usr/lib/zabbix/externalscripts/fetch_apachestats.py &> /dev/null
Replace Webserver IP and Port with your configuration and set the cron task to be executed in the interval of your own. Recomended lowest interval for your Zabbix checks.
Add or uncomment this to your Apache config file:
Remember to change 127.0.0.1 with your Zabbix server/proxy IP if you are planning to use it centralized.
Restart/reload Apache or use kill -USR1
cat /var/run/httpd/httpd.pid
for zero downtimeLoad the azzbix template: Apache-Template.xml
Link the Template_Apache_HTTPd into the hosts in question. Remember that IP should match to configured in cron task
Ensure Zabbix user has right permission on log file
To use DNS names just modify the template to use DNS instead of {HOST.IP}.
License
Apache Open Slot With No Current Process
This template is distributed under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.