Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_apachestatus
141429
File | Description |
---|---|
check_apachestatus.pl | check_apachestatus.pl version 1.1 bug reported by baron42bba solved |
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!
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
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');
::Socket::SSL qw();
19,22c18
get('http://' . $o_host . ':' . $o_port . '/server-status');
148,152d130
erver-status');
byhaus, September 4, 2015
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";
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.
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.