Apache Server Status

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
peakyblinder
Posts: 63
Joined: Tue Mar 25, 2014 4:39 am

Apache Server Status

Post by peakyblinder »

Hi,

Has anyone tried or using either of thees Apache Server Status plugins. Have tried contacting the owner but no joy.
http://nagios.frank4dd.com/howto/apache ... nagios.htm (check_apache_status.pl)
https://github.com/appfirst/nagios-plug ... us_auto.pl

Both pretty do much of the same thing. However both report my available slots open as 'open 1671/1920'. This equates to the 249 ThreadsPerChild setting on the Apache server. However, this value never changes no matter how many threads are in use. Also, when I set a warning or critical, its always say "Check warn and crit!".

Not sure if it makes any difference but its Windows Apache I am trying to monitor.

Just running the command './check_apachestatus_auto.pl -H IP' gives the standard output;
APACHE OK - 0.095 sec. response time, Busy/Idle 26/223, open 1671/1920, ReqPerSec 0.0, BytesPerReq 0, BytesPerSec 0|Idle=223 Busy=26 OpenSlots=1671 Slots=1920 Starting=0 Reading=0 Sending=8 Keepalive=15 DNS=0 Closing=3 Logging=0 Finishing=0 ReqPerSec=0.000000 BytesPerReq=0 BytesPerSec=0.000000 Accesses=0

Any help would be greatly appreciated.

Thanks,
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Apache Server Status

Post by tmcdonald »

Is there a Linux Apache server you could test against? It could be that there are differences in how the Windows and the Linux versions report metrics.
Former Nagios employee
peakyblinder
Posts: 63
Joined: Tue Mar 25, 2014 4:39 am

Re: Apache Server Status

Post by peakyblinder »

Hi,

Seems I was only testing with the warning flag thinking it would show something so when also used the critical flag I get a response. However, it doesn't matter what i set the warning flag to I always get 'Apache OK'.

Available slots = 1920
Open slots (always) 1671
Leaving 249

./check_apachestatus_auto.pl -H xx.xx.xx.xxx
APACHE OK - 0.065 sec. response time, Busy/Idle 19/230, open 1671/1920, ReqPerSec 10.8, BytesPerReq 58910, BytesPerSec 633416|Idle=230 Busy=19 OpenSlots=1671 Slots=1920 Starting=0 Reading=0 Sending=6 Keepalive=12 DNS=0 Closing=1 Logging=0 Finishing=0 ReqPerSec=10.752137 BytesPerReq=58910 BytesPerSec=633416.205128 Accesses=5032

./check_apachestatus_auto.pl -H xx.xx.xx.xxx -w 240 -c 100
APACHE OK - 0.070 sec. response time, Busy/Idle 25/224, open 1671/1920, ReqPerSec 9.7, BytesPerReq 54922, BytesPerSec 531443|Idle=224 Busy=25 OpenSlots=1671 Slots=1920 Starting=0 Reading=0 Sending=13 Keepalive=9 DNS=0 Closing=3 Logging=0 Finishing=0 ReqPerSec=9.676230 BytesPerReq=54922 BytesPerSec=531443.409836 Accesses=2361

The above should give me a warning when there are less than 240 available.

Thanks,
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Apache Server Status

Post by sreinhardt »

I would agree it should respond as warning if there are less than 200 open or critical if less than 100 open slots. However your output is showing OpenSlots=1671, which would mean there are far more than enough for an OK status. Maybe try checking for -w 1700
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
peakyblinder
Posts: 63
Joined: Tue Mar 25, 2014 4:39 am

Re: Apache Server Status

Post by peakyblinder »

Hi,

Still doesn't work, no matter what value I use.

When setting warning to 1700, critical to 1800 I get the message about "Check warn and crit!"
./check_apachestatus_auto.pl -H xx.xx.xx.xxx -w 1700 -c 1800
Check warn and crit!

The above is running against a Windows Apache. The below is running against AIX;

./check_apachestatus_auto.pl -H xx.xx.xx.xxx -w 99 -c 10
APACHE OK - 0.064 sec. response time, Busy/Idle 1/99, open 300/400, ReqPerSec 0.0, BytesPerReq 1024, BytesPerSec 28|Idle=99 Busy=1 OpenSlots=300 Slots=400 Starting=0 Reading=0 Sending=1 Keepalive=0 DNS=0 Closing=0 Logging=0 Finishing=0 ReqPerSec=0.027778 BytesPerReq=1024 BytesPerSec=28.444444 Accesses=1

Beginning to think that these are apache server-status plugins are giving false positives.

Thanks,
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Apache Server Status

Post by slansing »

That, or it just cant read Apache running on a Windows server properly. Have you looked into any other *windows* specific apache check plugins?
peakyblinder
Posts: 63
Joined: Tue Mar 25, 2014 4:39 am

Re: Apache Server Status

Post by peakyblinder »

Hi,

Yeah, they all seem to suffer from the same problem.

Thanks,
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Apache Server Status

Post by tmcdonald »

If you can get a similar check to work against a Linux Apache server then I would bet it's a Windows problem. I know Windows ports of Linux services need some workarounds to get them working, and this could break things.
Former Nagios employee
Locked