- Windows NT 4.0 Workstation
- Windows 2000 Professional
- Windows XP
- Windows NT 4.0 Server
- Windows 2000 Server
- Windows Server 2003, R2
- Windows Server 2008, R2
- Windows Server 2012
- Internet Information Services 4.0, 5.0, 5.1, 6.0, 7.0, 7.5, 8.0
- Analog C:Amie Edition
This article discusses how to automate the dissemination of statistics data to multiple web site clients on a typical, single instance production IIS web server. The article discusses the configuration of Analog and the file system considerations required to automate the delivery of statistics to all IIS web sites hosted on the server instance.
In the Analog C:Amie Edition example config file provided at first installation and provided through the Configuration File Generator, Analog is configured to support a single web site through a single instance of the Analog executive.
In a larger IIS web host production environment, a single IIS server may potentially host hundreds or even thousands of individual web sites for separate clients who buy services from the server. In this model, it is necessary to optimise the configuration of Analog to act in a single instance, multi-target model instead of the default single instance, single target model.
The how-to is split into the following sections:
- What is not covered here
- File System Considerations
- Prepare Analog
- Configure the Analog Server Settings
- Configure the Analog Site Settings
- Running Analog on a Schedule
What is not covered here
This guide is specifically written to demonstrate the configuration of Analog. To that end it does not cover the installation, setup or configuration of IIS in either a manual or an automatic capacity.
This guide will provide you with a scalable solution towards running Analog on a production IIS server, however most administrators will wish to automate the creation of IIS web site as well as automate the creation of Analog Site Setting configuration files (see ‘Configure the Analog Site Settings’).
If you are using UAC on your server, you will need to ensure that scripts run with appropriate permissions and with the necessary elevation.
You must ensure that the account or service account that Analog will use has appropriate permissions to be able to write to the output folders on your web server.
File System Considerations
By default, under IIS there is a separation between the hosted sites web root and the logs associated with that web site instance. By default IIS bases its web site root under c:\inetpub and the log files necessary for Analog to function are stored under c:\windows\system32\LogFiles\<Instance>.
It is suggested that as a hosting provider, you move these files to a different location, one that is preferably separate from the operating system volume. How you wish to do this will depend primarily on whether you want your client users to gain access to the logs or not.
A suggestion for how to structure your web sites on disk in both scenarios is shown below. In both examples the client would FTP directly into d:\sites\<domain> to upload or download content.
|User has access to Logs||User does not have access to Logs|
|In this example the client has access to their own log files, presumably over FTP. This allows them to download their logs for offline analysis, however you will also generate an Analog report for them into the \stats folder under their web site root folder (\web).||In this example, log files are available for internal user only, you plan to use these to generate a report for the client using Analog into the \stats folder.|
To fit in with the file-system structure outlined above, this guide will assume that the following file system structure is in use:
Copy the contents of the Analog.cx Analog 6.0 redistributable into d:\parser\Analog
Copy the latest version of Analog C:Amie Edition over the top of the original Analog files, overwriting when prompted
Configure the Analog Server Settings
Analog’s local analog.cfg file should now be configured to be site independent. This is achieved by removing all references to a particular web site to create an established Analog baseline configuration. In essence, you are removing all settings that relate specifically to a particular web site or any options that you may want the end-user to be able to configure themselves.
Open the analog.cfg file in notepad.
Using the Analog C:Amie Edition Configuration File Generator output as an example, you should remove the highlighted lines to form a baseline configuration.
To save time, disk space and bandwidth it is recommended that you edit the style sheet location inside the baseline configuration to point to a common location
For example, you could create an administrative resource on a separate web to host these resources e.g.
Note: This shared resource site will be equally useful if configuring Report Magic along with Analog to support you end-users (not covered in this guide).
Configure the Analog Site Settings
Now that you have created a common baseline for Analog to run against, the next step is to configure Analog for each of your sites.
Navigating to d:\sites\www.domain.com create a file called analog.cfg
Open this configuration file and this time enter only the information that you removed from the baseline configuration, ensuring that you tailor the settings to this particular web site For example:
You should automate the creation of this configuration file as part of your site creation activities. The fastest way to achieve this is to write the configuration file to the d:\sites\<web site>\analog.cfg location at creation time as part of an automated site creation script.
In the above example, a default Analog C:Amie Edition HTML report will be generated in(http://www.domain.com/stats/ to the user).
Ensure that you repeat the creation of this file for all web sites on your server.
Running Analog on a Schedule
Now that Analog has been configured, the last step is to schedule it to run. The most simple way to do this is using a batch script and the Windows task scheduler.
With some creative scripting (exampled below) you can configure the scheduled job to crawl through the d:\sites folder looking for site-level analog.cfg files to parse through to the Analog C:Amie Edition executable.
The example below should be saved via Windows Notepad as d:\parser\GenerateStats.cmd
This script searches all sub-folders offor the presence of an analog.cfg file e.g. d:\sites\www.mydomain.com\analog.cfg. If it finds one it ensures that there is an appropriate output directory (\web\stats) and then runs the Analog C:Amie Edition executable using the baseline configuration (this is implicit) and the local site-level analog.cfg configuration file (explicit) to produce the report.
The report will be output as specified in the site-level analog.cfg.
Any Analog parser errors will be written into the d:\sites\www.mydomain.com folder as analog.log, allowing for analysis by the client.
In Windows Task Scheduler (found on the start menu) simply create a basic task that will run d:\parser\GenerateStats.cmd ever day, 12 hours, 6 hours (or at whatever interval you require)
Once complete, as you add new web sites (and their associated site-level analog.cfg files) or remove old ones they will automatically be picked-up and parsed through the statistics engine without any administrative intervention.