check_apaches - Monitoring Apache's busy/idle workers¶
Connect to Apache web server, get output of mod_status (also known as "server-status"), monitor busy workers
Command line options¶
% ./check_apaches.py --help
Usage: check_apaches.py [options]
Check Apache workers
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-H HOST Hostname/IP to check
-p PORT port to connect
-P PROTO protocol to use
-u URL path to "server-status"
-a HTTPAUTH HTTP Username and Password, separated by ":"
-w WARN warning thresold
-c CRIT warning thresold
--statistics Output worker statistics
-v, --verbose Verbosity, more for more ;-)
Example usage¶
Local Apache, no access restrictions (at least for connections from localhost), default URL /server-status:
% ./check_apaches.py -H 127.0.0.1
APACHE OK - 12 busy workers, 7 idle|busy=12;20;50;0.0; idle=7;;;;
Local Apache, login required, default URL /server-status:
% ./check_apaches.py -H 127.0.0.1 -a user:password
APACHE OK - 12 busy workers, 7 idle|busy=12;20;50;0.0; idle=7;;;;
Apache on 192.168.1.1 with HTTPS, login required, URL /hidden-server-status:
% ./check_apaches.py -H 192.168.1.1 -P https -a user:password -u /hidden-server-status
APACHE OK - 12 busy workers, 7 idle|busy=12;20;50;0.0; idle=7;;;;
Local Apache, extended statistics (for graphing, multiline output):
% ./check_apaches.py -H 127.0.0.1 --statistics
APACHE OK - 12 busy workers, 7 idle
7 waiting for connection
0 starting up
2 reading request
4 writing/sending reply
5 keepalive
0 looking up in DNS
1 closing connection
0 logging
0 gracefully finishing
0 idle cleanup of worker
237 open slots(up to ServerLimit)|busy=12;20;50;0.0; idle=7;;;;
Apache configuration¶
FIXME