Audit Log Reports
January 2, 2008 Leave a comment
I had a forced introduction to Auditing Reports, a subject which isn't very well convered pretty much anywhere.
What is it? A history of all actions taken on a site collection since the creation of the site collection.
Where is it stored? Dbo.auditData
What does it look like? Heres a row from the table
|Site Id||Item Id||Item Type||User Id||Machine Name||Machine IP||Document Location||Location Type||Occurred (GMT)||Event||Custom Event Name||Event Source||Source Name||Event Data|
|ed91340f-e335-45d2-82f3-c6521eb23fc0||59af845e-b604-436e-9c08-0a948a27d996||Document||NT AUTHORITYlocal service||_catalogs/masterpage/Editing Menu/CustomSiteAction.xml||URL||2008-01-02T00:44:43||View||SharePoint||
How do you get to it? http://server/sitecollection/_layouts/Reporting.aspx?Category=Auditing or alternatively Site Settings > Site Collection Administratoin > Audit Log Reports
First issue you might come across starts here. The feature has to be enabled on your site, fairly easy to do :
stsadm -o activatefeature -name Reporting -url http://server/sitecollection/ -force
That will enable the feature on your site collection, allowing you to view the URL listed above.
The usage of this page is pretty straight forward, you can view all of the audit data for your site, or if need be create a custom report. If you do create a custom report, make sure you do not click "OK" to return to home, you'll miss your report and some of them can take a little while (minutes) to generate, especially if your site has 6 months or more of auditing data. Even on a site with light usage your auditData table can get big very quickly, for instance one of ours hit 47,000 rows and a content viewing report was over 50 meg being generated. This was causing timeouts from the site.
The reports will look like XML unless you have Excel installed in which case you will get a look like this :
|Count of Occurred||Event|
|Document Location||View||Grand Total|
|Style Library/XSL Style Sheets/Header.xsl||3||3|
|Style Library/XSL Style Sheets||9||9|
|Style Library/XSL Style Sheets/ContentQueryMain.xsl||3||3|
|Style Library/XSL Style Sheets/ItemStyle.xsl||3||3|
I should also add that if you wish to configure the audit logging you can cut it down a bit. The "Configure Audit Settings" option under "Site Settings" will allow you to determine which events are audited, its high level but enough to significantly reduce the size of the table if needed.