Friday, September 2, 2011

Apache RealTime Monitoring MOD_STATUS

There is number of tools available to monitor apache in realtime. Like Nagios,Cacti etc. But those tools are little difficult to configure for the first time (Experts Please excuse :-) ). Here I would like to introduce couple of simple tools which help the Webserver admin to monitor his Apache webserver in real time through Web and Console.

Status Module is a builtin module for apache for a default installation. First checkout whether this module is compiled with your Apache.

[] cat /etc/httpd/conf/httpd.conf | grep status_module

LoadModule status_module modules/

Make sure this line was not comment out. OK,Lets take the backup of your current configuration file

[]cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf_backup

[]vim /etc/httpd/conf/httpd.conf

Goto Last Line and Paste the following

SetHandler server-status
Order Deny,Allow
Allow from all
<\Location >

Search for the Line "ExtendedStatus". Normally this line is commented out. Uncomment it.

Save and Exit

Take your browser.

Take a look at the values,Its Realtime values from the Apache. To view this page continuously,I mean refreshing automatically
(This N is any number).