ApacheStats v 0.4 - Copyright Rolf Poser - GNU Public License

INSTALLATION GUIDE:
====================

These are the steps you should follow (more or less) to install this version
of ApacheStats.

SCRIPT USAGE: 

perl ws_apachestats.pl <hostname>

You can optionally specify a hostname/ip address as a parameter, otherwise
"localhost" will be assumed. 

You can find this script in the scripts subdirectory.

If you need a high-speed version, please see TUNING.txt.

APACHE CONFIGURATION:

This script lives in $cacti_path/scripts, and then you will need to be
sure that the below config is set up correctly in your httpd.conf (you will
need to add support for mod_status). 

You may need to define additional ACLs for the "Allow from" statement 
to allow querying from a remote server. 

ExtendedStatus        on 

<Location /server-status> 
    SetHandler server-status 
    Order deny,allow 
    Deny from all 
    Allow from foobar.com
</Location> 

Which gives you access from your domain - see the Apache documentation for
additional ideas on securing it.

Getting access from the localhost can be more complex than you think.

If adding it to the above in the following way:

    Allow from foobar.com
    Allow from localhost

still gives you an error then try to experiment with the following
virtualhost definition which seemed to work well for me:

<VirtualHost localhost>
	ServerAlias 127.0.0.1
	<Location /server-status>
		SetHandler server-status
		Order deny, allow
		Deny from all
		Allow from all
	</Location>
</VirtualHost>

This would need to be defined if the first <Location> directive will only
match the hostname and not localhost.

Your mileage may of course vary, and all of this seems to be highly dependant 
on what you've defined as "ServerName" and "Listen". You may need to experiment
somewhat before it will work for localhost and remote access.

You should test that everything is working by running the script from
the command line. You should get something that looks like this:

perl ws_apachestats.pl localhost
apache_total_hits:2134 apache_total_kbytes:5554 apache_busy_workers:1 apache_idle_workers:7

If so, continue with the cacti configuration, if not check paths in the
script, permissions and the apache configuration. You may need to check
that you uncomment the correct name for the threads in your version of 
apache too. 

CACTI CONFIGURATION:

You can now simply import the host template XML file that includes all
of the necessary dependencies to get you up and running.

You will be able to do that from the "Import" menu.

Then go to "New Graphs" and you should be able to select and create the graphs. 
You can change any of the titles of the graphs if you want.


If you get stuck you are welcome to email me on rolf@stasolutions.co.za or
to post your question to the www.raxnet.net/board message board.
