Home Directory Plugins Web Servers Apache check_apachestatus

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_apachestatus

Rating
4 votes
Favoured:
1
Hits
141430
Files:
FileDescription
check_apachestatus.plcheck_apachestatus.pl version 1.1 bug reported by baron42bba solved
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
A Nagios plugin that parses the status page of an apache server, the plugin returns the response time, the amount of idle, busy and open slots. The perfdata returns the status of all slots. Optionally you can specify how much slots should be available.
Apache Monitor for Nagios version 1.1
GPL licence, (c)2006-2007 De Bodt Lieven

Usage: /usr/local/nagios/libexec/check_apachestatus.pl -H -p -t -w -c -V
-h, --help
print this help message
-H, --hostname=HOST
name or IP address of host to check
-p, --port=PORT
Http port
-t, --timeout=INTEGER
timeout in seconds (Default: 15)
-w, --warn=MIN
number of available slots that will cause a warning
-1 for no warning
-c, --critical=MIN
number of available slots that will cause an error
-V, --version
prints version number
Note :
The script will return

* Without warn and critical options:

OK if we are able to connect to the apache server's status page,
CRITICAL if we aren't able to connect to the apache server's status page,,

* With warn and critical options:

OK if we are able to connect to the apache server's status page and #available slots > ,
WARNING if we are able to connect to the apache server's status page and #available slots

Reviews (3)
bytreii28, May 11, 2018
14d13
::Socket::SSL qw();
19,22c18
get('http://' . $o_host . ':' . $o_port . '/server-status');
148,152d130
erver-status');
Users who did apt-get install nagios-nrpe-plugin will need to change this line in the check_apchestatus.pl file:

use lib "/usr/local/nagios/libexec";

to this:

use lib "/usr/lib/nagios/plugins";
byTozz, September 2, 2011
This plugin was exactly what I was looking for, because we sometimes have Apache machines that reached their MaxClients settings.

However, out of the box this plugin does not work as expected. The script counts the number of 'dots' on the /server-status/ page. The number of dots is the number of ServerLimit minus in use slots.

However, ServerLimit is 256 by default and MaxClients is 150 by default. So if your server is full (MaxClients reached) this module believes there are still 256-150 = 106 open slots available, but that is not true.

To resolve this you have to set your CRITICAL level to atleast 106 or adjust Apache.

Also, this module returns 'WARNING' when Apache is down. I believe this should be 'CRITICAL'. If your Apache is unresponsive due to MaxClients reached, the module will return WARNING instead of CRITICAL while your service is nonresponsive.