Search Directory
Login
Twitter Updates
check_apache2.sh
Current Version
1.3
Last Release Date
2009-09-09
E-mail
Website
Hits
2426
Compatible With
- Nagios 2.x
- Nagios 3.x
Files:
| File | Description |
|---|---|
| check_apache2.sh | check_apache2.sh |
| LICENSE | LICENSE |
| check_apache2.php | check_apache2.php |
Description:
check_apache2.sh is a Nagios plugin to check the Apache's server status.
It monitors requests per second, bytes per second/request,
amount of busy/idle workers and its CPU load.
Let me know when it's not working for you via Mail or in my blog and I'll solve the problem.
Example call:
./check_apache2.sh -H localhost -P 80 -t 3 -b /usr/sbin -p /var/run
-n apache2.pid -s status_page [-S] [-R] [-wr] 100 [-cr] 250
Options:
-H|--hostname)
Sets the hostname. Default is: localhost
-P|--port)
Sets the port. Default is: 80
-t|--timeout)
Sets a timeout within the server's status page must've been accessed. Otherwise the check will go into an error state.
Default is: 3
-b|--binary-path)
Sets the path to the apache binary. Used for getting Apache's CPU load. Default is: /usr/sbin
-p|--pid-path)
Path to Apache's pid file. Default is: /var/run
-n|--pid-name)
Name of Apache's pid file. Default is: apache2.pid
-s|--status-page)
Defines the name of the status page. Default is: server-status
-R|--remote-server)
Disabled the pid check so that remote Apaches can be queried. Default is: off
-S|--secure)
Enables HTTPS (no certificate check though). Default is: off
-wr|--warning-req)
Sets a warning level for requests per second. Default is: off
-cr|--critical-req)
Sets a critical level for requests per second. Default is: off
Changelog
* 2009-09-09 (Version 1.3)
* Released revised version of check_apache2.sh with many improvements (no temporary files anymore, cleaner script)
* Added appropriate PNP template
* 2009-05-14 (Version 1.2)
* Small bugfix related to the exit codes
* 2009-04-27 (Version 1.2)
* Added possibility to check server-status via HTTPS (no verification of certificate though)
* 2009-03-20 (Version 1.1)
* Added options to set warning/critical thresholds for requests per second (fully optional as seen above in the description)
* Moved servers uptime to the extended info option's perfdata output
* 2009-03-16:
* did some slight improvements to the get_processes and check_processes function. In the near future I'll change this so that the script looks after the pid file instead of doing ps ax|grep -c xyz
check_apache2.sh is a Nagios plugin to check the Apache's server status.
It monitors requests per second, bytes per second/request,
amount of busy/idle workers and its CPU load.
Let me know when it's not working for you via Mail or in my blog and I'll solve the problem.
Example call:
./check_apache2.sh -H localhost -P 80 -t 3 -b /usr/sbin -p /var/run
-n apache2.pid -s status_page [-S] [-R] [-wr] 100 [-cr] 250
Options:
-H|--hostname)
Sets the hostname. Default is: localhost
-P|--port)
Sets the port. Default is: 80
-t|--timeout)
Sets a timeout within the server's status page must've been accessed. Otherwise the check will go into an error state.
Default is: 3
-b|--binary-path)
Sets the path to the apache binary. Used for getting Apache's CPU load. Default is: /usr/sbin
-p|--pid-path)
Path to Apache's pid file. Default is: /var/run
-n|--pid-name)
Name of Apache's pid file. Default is: apache2.pid
-s|--status-page)
Defines the name of the status page. Default is: server-status
-R|--remote-server)
Disabled the pid check so that remote Apaches can be queried. Default is: off
-S|--secure)
Enables HTTPS (no certificate check though). Default is: off
-wr|--warning-req)
Sets a warning level for requests per second. Default is: off
-cr|--critical-req)
Sets a critical level for requests per second. Default is: off
Changelog
* 2009-09-09 (Version 1.3)
* Released revised version of check_apache2.sh with many improvements (no temporary files anymore, cleaner script)
* Added appropriate PNP template
* 2009-05-14 (Version 1.2)
* Small bugfix related to the exit codes
* 2009-04-27 (Version 1.2)
* Added possibility to check server-status via HTTPS (no verification of certificate though)
* 2009-03-20 (Version 1.1)
* Added options to set warning/critical thresholds for requests per second (fully optional as seen above in the description)
* Moved servers uptime to the extended info option's perfdata output
* 2009-03-16:
* did some slight improvements to the get_processes and check_processes function. In the near future I'll change this so that the script looks after the pid file instead of doing ps ax|grep -c xyz
Reviews (0)
Be the first to review this listing!


New Listings



