Chapter 3 – Monitoring Sharepoint 2010

Wrox Real World Sharepoint 2010 (Page 70)

ULS (Unified Logging Service)
– service responsible for keeping an eye on Sharepoint and reporting what it finds. It can report on 3 different locations:
(1) Sharepoint Trace Logs (…\14\LOGS\) NTFS compression
(2) Windows Event Log
(3) Sharepoint Logging Database

Sharepoint Trace Logs: …\14\LOGS\. By default, a new log is created every 30 minutes. Can change it to other times:
Set-SPDiagnosticConfig –LogCutInterval 60

Set events to monitor:
Central Admin à Monitoring àConfigure Diagnostic Logging. You see categories where you can select to monitor.

On that page you can change log path, how long to keep and max. log files size. Enable Event Log flood Protection.
Better to use PowerShell as there are other properties that can’t be accessed.

XXX-SPDiagnosticConfig: (GET/SET)
Set-SPDiagnostic –LogLocation e:\Logs


: clears out any changes you made, and set the logging level to the default values.

Correlation ID —

Globally unique GUID that is assigned to each conversation a user or process has with Sharepoint.

Click to set filter value

Filter by CorrelationID

Developer Dashboard —
The dashboard is loaded at the bottom of page. The user Must have AddAndCustomizePages permission to see the Dashboard. By default, off.
$dash = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;

$dash.DisplayLevel = ‘OnDemand’; (or Off, On)

$dash.TraceEnabled = $true;

ULS Viewer Logger

Get-SPLogEvent | SELECT First 4
Get-SPLogEvent | SELECT
Last 4
Get-SPLogEvent | SELECT
First 4 Last 10

New-SPLogFile: To close out the current log file and start a new one.
Merge-SPLogFile: Merge all trace log files from all Sharepoint Servers in the Farm, into One. (creates a timer job to do it) Good for archiving log files.

Windows Events Logs —
Change windows event logs log level:
Central Admin
Configure Diagnostic Logging

Logging Database (Page 87)
a farm-wide repository of Sharepoint events from every machine in your farm. Get information from many locations and write into one single database.
Configuring: Central Admin à Monitoring à Configure Usage and Health Data Collection
You can enable (1) usage and (2) health data collection; usage data log location; health data collection schedule. And define Logging Database (default: WSS_LOGGING)

Use this command Set-SPUSageApplication to change the database server/name for LOGGING database
Set-SPUsageApplication –database server <servername> -databasename <dbname>

Consuming the Logging Daabse:
(1) Central Admin
à Monitoring à Reporting à View Administrative Reports (and other reports)

Health report: slowest page; most active users etc.
Web Analytics Report: statistics based on each web application, such as total number of page views, unique visitors, just like WebTrends.

On Web Analytics Report, click Analyze to change the report date range, or export to a CSV file.

To get usage information for any site collection, open Site Action à Site Settings à Web Analytics

You can also use SQL to consume Logging Database data.

Health Analyzer – use timer jobs to run rules periodically.
If there is an issue reported by Health Analyzer, you see a red bar on top when you open Sharepoint Central Admin:

Open each issue and you will see explanation and remedy etc. You can analyze again or repair it now:

Health Report Rules Definitions: 60 comes with Sharepoint 2010:

Timer Jobs —
Timer Jobs are XML files in the configuration database.
New feature: Run Now

Which server to run Time Jobs? (can be configured per content database)
Central Admin à Application Management à Database à Manage Content Database
Click content database name, scroll down to the bottom, and select the server that runs the timer jobs for this content database.

01/29/2011, 09:14AM

Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: