Page 5 of 6
Re: Plug-In Tutorials
Posted: Tue Feb 26, 2013 4:24 pm
by A.Cormack
slansing wrote:It looks like nobody mentioned when they uploaded their plugins that you you need mod status enabled to read the information from apache, one of the plugins says this and I was able to get check_apachestatus.pl working with Nagios now.
Check out this link:
http://httpd.apache.org/docs/2.2/mod/mod_status.html
You will need to edit /etc/httpd/conf/httpd.conf and add the following line to the bottom:
Code: Select all
<Location /server-status>
SetHandler server-status
#Order Deny,Allow
#Deny from all
#Allow from .example.com
</Location>
And then search for ExtendedStatus and un-comment its line so that it is set to on.
If you are using VI or VIM to edit, you can use the "/" followed by the text you need to search for and hit enter. This will take you to the line it is located on.
Ah that's very good to know! Thank You.
I added that section to the bottom of my file. However, I have no ExtendedStatus text in my config file.
Re: Plug-In Tutorials
Posted: Tue Feb 26, 2013 4:29 pm
by scottwilkerson
you likely can add the following just above the other info you added to the file
then
You should be able to view some information in your browser at
Code: Select all
http://<YOUR_IP>/server-status?auto
Re: Plug-In Tutorials
Posted: Tue Feb 26, 2013 4:35 pm
by A.Cormack
It doesn't appear to like the command. If i restart it with just the <Location......> then it restarts. But if i add
Then it fails to restart.
Re: Plug-In Tutorials
Posted: Tue Feb 26, 2013 4:38 pm
by slansing
What does it tell you when it fails to restart? It should give you some sort of configuration error.
Re: Plug-In Tutorials
Posted: Tue Feb 26, 2013 4:43 pm
by A.Cormack
It just says...
Code: Select all
The requested operation has failed
I checked the error log file of the log directory but there was no errors in there.
Im running Apache2.2 on Windows Server 2008
Re: Plug-In Tutorials
Posted: Tue Feb 26, 2013 4:46 pm
by A.Cormack
Ah ok, So i checked the EventView in windows (Should of done that before)
It says
Code: Select all
>>> Invalid command 'ExtendedStatus' perhaps mispelled or defined by a module included in the server configuration
Re: Plug-In Tutorials
Posted: Tue Feb 26, 2013 4:56 pm
by slansing
Okay, didn't know we were doing this on a Windows system, we have been walking you through this thinking you were trying to first monitor your localhost, and then a linux apache server sorry for the confusion. I've looked at a couple examples of httpd.conf files on windows apache server's at it looks like ExtendedStatus should be able to be added like this.. right above where we added the handler:
Code: Select all
ExtendedStatus On
<Location /server-status>
SetHandler server-status
#Order Deny,Allow
#Deny from all
#Allow from .nimsoft.no
</Location>
Re: Plug-In Tutorials
Posted: Tue Feb 26, 2013 5:07 pm
by A.Cormack
Sorry my appologies, I should have explained it better. I need to approach it in a fair approach, so first of all im trying it on a windows server and then ill be trying it on a Ubuntu.
Ok so I went into httpd.conf and the bottom of the file now looks like
Code: Select all
ExtendedStatus On
<Location /server-status>
SetHandler server-status
#Order Deny,Allow
#Deny from all
#Allow from .nimsoft.no
</Location>
But the error still occurs
Re: Plug-In Tutorials
Posted: Wed Feb 27, 2013 8:43 am
by scottwilkerson
not totally sure about on the windows system but you may also need to add the module, like
Code: Select all
LoadModule status_module modules/mod_status.so
Also, you will need to restart the windows service for apache
Re: Plug-In Tutorials
Posted: Wed Feb 27, 2013 12:50 pm
by A.Cormack
Once I uncommend "LoadModule" line, then Apache successfully booted up.
However, when running the test command
I still get the error message
Code: Select all
Argument "" isn't numeric in numeric ge (>=) at ./check_apacherequests.pl line 76.
OK - current apache requests | 'apache requests'=;2;3