Click here to download the lastest version of upDateWebStats
NOTE: Please be careful in using this suite as it does move/delete and rename files. PLEASE REMEMBER TO MAKE BACKUPS OF YOUR FILES ON A REGULAR BASIS. Three Rivers Internet and Paul Didzerekis assume NO responsibility for misuse or abuse of this suite. There with that said let's get down to how this stuff works.
Features in a nutShell:
This suite will totally automate monthly rolling of your WebSTAR logs by compressing them with DNSLookUp and deleting the uncompressed copy, renaming them, run Analog with various different custom "config" files, and create a "List" page that has links to all of your Analog stats files with new months added as needed. This suite will only provide your customers with the current month's stats. What I mean is that it won't keep ongoing stats reports for every month for your customer's websites, only the current month it will keep ongoing monthly stats reports for one and only one of the Analog CFG files you setup. It is recommended that this be for all activity on your server.
What you will need:
Release History:
1.1.1This release fixes a problem with the date used for the rolled logs and analog output file names at the end of the year. Previous versions would not increment the year. This release also INCLUDES SOURCE CODE.
1.1 This release fixes a problem with the setup and runAll scripts. The problem was that DNSLookUp would not be run before rolling the logs at the end of the month. This would cause you to lose all the log entries for the last day of the month. Added error checking to make sure that even if the crontabs are not in the correct order to run DNSLookUp before the log rolling process starts then DNSLookUp gets run first anyway.
Added an "update" release for people that have already installed a previous version. This was needed so that people don't need to rerun the setup script.
1.0 Initial release!
Upgrading from a previous version:
You will find a folder named "upgrade stuff" in the uncompressed download that contains a desktop script named "Install Upgrade". Just double click on it and your version will be upgraded to the newest version.
SetUp:
This setup will take some time but it will be worth it in the end because you will NEVER again have to mess with manually updating your stats stuff and rolling your WebSTAR logs.
FIRST make sure that all the above software is installed correctly. To get all of this to work correctly you will need to create a new folder inside your webserver folder at the root level. Place DNSLookUp, Analog and all associated files inside this new folder. Also modify and place the file "template.txt" in this new folder (More on modifying this file later).
You will need to reassign WebSTAR's log file in the "misc. Settings" section of the admin to ":yourNewFolder:WebSTAR.log" not the default of ":WebSTAR.log" and then move your current log file to this New folder (NOTE: You will need to turn logging off in WebSTAR then do this and then turn logging back on).
You will only need one copy of manconf.cfg with the main defaults for Analog, but you will need copies of the analog.cfg which are each configured for the different websites on your server (i.e. /customerOne/, /customerTwo/, etc.) and named with the name of the website (i.e. customerOne.cfg, customerTwo.cfg, etc.). If you don't know how to setup the .cfg files to restrict analysis to one folder, please consult the Analog Docs. These should have a logfile setting of webstar.log.gz.
*Optional* You can also have one that will include ALL of your log files so you can keep a kinda generic stats report for the entire server. This last .cfg file should have a logfile setting of *.log.gz so that it will read ALL of the log files. If you run a busy multi-domain server than you probably don't want to create this file.
NOTE (THIS MUST BE DONE): As preparation for running the upDateWebStats setup script you will need to do an initial run of DNSLookUp. Just run it once after doing the initial setup outlined above. You will also need to do an initial run of Analog for the stats analysis output file that you will be rolling over every month. This will most likely be the one for your whole server. The name of this file MUST be "analog.cfg".
NOW you should be ready to run the upDateWebStats setup script which is located at suites.upDateWebStats.setup.setup Just open a "QuickScript" window and type
"suites.upDateWebStats.setup.setup ()"
without the quotes and then press the "ENTER" key on your keyboard.
You will be presented with a lot of questions to answer and if you have not completed ALL of the above steps the setup will not work and you will need to rerun it.
Let's go through the questions:
0 0 * * * suites.updateWebStats.runDNSLookUp()
30 0 * * * suites.updateWebStats.dailyStats()
0 0 1 * * suites.updateWebStats.RunAll()
Adding analog CFG files to be processed
These are the analog CFG files that you created as preparation to running the setup script. Analog will be run nightly using ALL of these config files you add. You can remove any of these by navigating to suites.updateWebStats.data.cfgFiles and simply delete the ones you don't want to be processed. You will most likely have more than one analog CFG file that you want processed and this is how you add them. Don't forget to add your main one named "analog.cfg".
Just open a "QuickScript" window and type
"suites.upDateWebStats.setup.addCfgFile ()"
without the quotes and then press the "ENTER" key on your keyboard.
You will be presented with a file dialog window asking you to "Select the Analog CFG file you wish to add?". Navigate to the new folder you created that has all of you Analog CFG files and select the first one. You will then be asked if you wish to add another one. Continue until all of your Analog CFG files have been added. You last one should be the one that runs using ALL of the log files.
The template.txt file
The template.txt file contains the framework for your list/directory page (i.e. the index.html file that has a list of all your output stats files). You should modify it so that it points at the various Analog CFG output files that will be created. And somewhere it MUST have <LIST> for placement of the links to the rolled statistic files. An example of this file is included with this distribution.
This version is FREEWARE and always will be. We will be making changes and additions to this suite and releasing a new version as shareware in the near future. The new version will be able to roll multiple statistic files to directories of your choice and will be able to do the rolling on a weekly basis instead of only monthly. Don't worry the price will be very reasonable. The reason we are going to have to ask for money is because we wrote this stuff for our use and we have spent a lot of time and effort in writting upDateWebStats. If you feel that this is not fair than you are free to write your own suite that does a better job.
If you have any suggestions for the next version or questions please send them to me.
Have fun,
Paul Didzerekis
hostmaster@3-rivers.com
Three Rivers Internet
http://www.3-rivers.com/