SharePoint Statistics
Alpha version – Download! Don’t use it towards your production environment.
SharePoint statistics is a very simple statistic generator for SharePoint collaboartion sites.
- Only for collaboartion sites (everything where users are authenticated)
- Not for Office 365
- No local installation on SharePoint server (no wsp, no other files)
- Google charts are used with the current templates to render the reports
- One host with share access to the IIS logs is needed to run it
Quick-Start
- Download the file
- Ensure that the running account has access to all logs
- Update the Settings.xml
- Run the executable
Statistics Types
- Overall
- Unique users
- Hits
- By Country (Based on active directory attribute c)
- Unique users
- Hits
- By Department (Based on active directory attribute department)
- Unique users
- Hits
- Farm level only
- File Types
- Browsers
Statistics Availability
The statistics are available on the following levels
- SharePoint Farm
- Web Application
- Site Collection
- File
Technology
The software is created fully independent of SharePoint and can be run on a separate server.
- LogParser
A basic log parser is collecting the IIS log files from each frontend server and creates the statistic inside a file system cache.- Initially the parser runs a full parsing of the logs. Afterwards when the initial cache is built, it’s running an incremental parse each time you execute it.
Note: If there is a bug and it break you need to rerun a full parsing.
- Initially the parser runs a full parsing of the logs. Afterwards when the initial cache is built, it’s running an incremental parse each time you execute it.
- UserParser
The user parser collects the user information from your active directory - Processor
The processor pre-calculates the statistics and updates the local cache - Writer
The writer is generating statistic files per farm and site collection. The files are locally stored (where you run the application). The statistics data is stored inside the html / aspx (no code) file and contains the full statistics data as compressed string. This removed the database dependency. - Uploader
Optionally it’s possible to configure the automated upload of the statistics. This means the software is using the normal client API to upload the statistics files and JavaScript to SharePoint. It doesn’t change any files on your site collection.- CustomAction / Statistics Button
Optionally it’s possible to activate a statistics button on your SharePoint site and in the file drop-down menu. This is done by adding usercustomactions to your site. Again, no masterpages or any existing files are affected. Anyway, there is the risk that the javascript does have a bug and it could break your site.
Infrastructure
- CustomAction / Statistics Button
Performance
300 GB take around 3 days and require 5% local storage. Uploading the logs to the SharePoint depends on the number of site collections.
In general, it should be considered that the logs are transferred as plain-text (not compressed) from the server to the machine running the statistics. In case of an incremental crawl it accesses only the logs which have been created afterwards.
The statistics tool itself has cache for the users and queries each user only once.
Permissions Requirements
- Read-only on the configured log files
- Write permissions in the location where the executable is stored (the cache is generated there, 5% of the log file size)
- SharePoint permissions
- None – If reports are not uploaded
- Write on each site collection – If UploadToSharePoint is enabled
Commands
- Full parsing
- Ensure that there is no sub directory called cache (delete it) and no file called AnalyticsProcessorStatus.dat (delete it).
- Run Fiechter.SharePoint.Analytics.exe
- Incremental parsing
- Run Fiechter.SharePoint.Analytics.exe
Configuration (Settings.xml example in download)
- Settings
Attribute Value ParseBrowsers True = Browsers are parsed False = No browser statistics (it’s faster)
- Output
Attribute Value UploadToSharePoint True = Upload statistics to SharePoint (requires write access to each site collection) False = Leaves the aspx files in the js-tmp folder after processing (you can upload them manually)
CreateCustomAction True = Creates a custom action on each site collection, rendering the link to the statistics False = Does nothing
MaxSizeToUploadInMb 20 – Statistics bigger then this size will not be uploaded NumberOfTopSiteCollections 30 – the amount of top site collections that will be displayed NumberOfTopFiles 50 – the amount of top files that will be displayed Element Value JavaScriptLocation Folder where the javascript files to render the reports will be stored. Needs to be accessible by everyone. The upload will only happen when UploadToSharePoint=”True” CssLocation Folder where the css files to render the reports will be stored. Needs to be accessible by everyone. The upload will only happen when UploadToSharePoint=”True” FarmDataLocation Folder where the farm data will be stored. Needs to be accessible by administrators. The upload will only happen when UploadToSharePoint=”True” FarmReportTarget Folder where the farm report view will be stored. Needs to be accessible by administrators. The upload will only happen when UploadToSharePoint=”True” - IgnoreAccounts
This can be specfifc accounts or regular expresssions.- mydomain\\adrian will excluse this account
- ^mydomain\\adm- will exclude all account starting with adm-
- WebApplication
- ManagedPath is used identify site collecetions. If the manage path has a wildcard inclusion it needs to end with a slash (E.g. /sites/) if it’s a single site collection it needs to be without (E.g. /search)
- LogUncPaths contains all unc path to the log files
- Url add’s this url to the sites (E.g. https://sharepoint.fiechter.com)
- Name is the visual name in the reports (E.g. sharepoint
Feel free to contact me with further questions.