This is an overview of major tools and techniques available to monitor the health of your SharePoint 2010 farm.
Using SCOM to monitor SharePoint 2010
Microsoft System Center Operations Manager 2007 (SCOM) is a product designed for enterprise health monitoring. It integrates closely with SharePoint 2010 and provides the most comprehensive and flexible solution for monitoring the health of SharePoint farms. With SCOM, the level of reporting and alerting is more granular and easily managed than SharePoint’s standard health monitoring.
- SharePoint 2010 ships a management pack for System Center Ops Manager
- Improved Knowledge Articles
- More relevant events and monitors
- Surfaces SharePoint Health Analyzer (SPHA) rules
- Integrated with Unified Logging System (ULS)
The SCOM 2007 Management Pack for SharePoint 2010 contains more documentation for using these products together, in a Management Pack Guide for SharePoint Foundation 2010 and one for SharePoint Server 2010. Be sure to reference both guides for managing the server product. Download from: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=c8a9d749-b7a8-412a-b2db-f3e464ed3fcf. These management pack guides are also included as a deliverable of this engagement, for convenience.
More information on SCOM: http://technet.microsoft.com/en-us/systemcenter/om.
Monitoring SharePoint with its own tools
With or without SCOM, SharePoint 2010 provides many of its own tools for health monitoring. This section discusses all of these options.
The Central Administration > Monitoring page organizes SharePoint’s monitoring tools:
Reports available from this page:
- Health analysis problems and solutions
- Administrative configuration
- Performance issues
- Availability issues and
- Potential Security issues
- …results can be consumed by SCOM
- Administrative reports
- Search administration (crawl rates, query latency, etc)
- IRM Policy Usage reports
- Health reports
- Slowest Pages
- Top Active Users
- Web Analytics reports
- Traffic (Page Views, Visitors, Referrers)
- Search usage (query totals, trends)
- Inventory (Number of sites)
Custom reports can be built and deployed to Central Admin Monitoring using Excel or SQL Reporting Services.
Custom health rules can also be created. Each custom health rule requires an assembly that will perform the desired health check. See How to: Create a Health Rule.
ULS logging service
SharePoint’s logging service (which uses the Windows Unified Logging Service or ULS) has been improved in several ways.
- ULS Log Viewer
- A SharePoint product team member discusses this tool on their blog: “In SharePoint 2010 we can use correlation id to trace a series of event inside SharePoint. For example, in this screenshot, my machine is trying to flush usage log. The different entries may be buried in the big ULS log file, but with correlation id this viewer can easily filter and find them all.”
- Download ULS Log Viewer from: http://code.msdn.microsoft.com/ULSViewer
- PowerShell cmdlets for managing the logs
- Diagnostic Configuration
- Get-SPDiagnosticConfig retrieves Diagnostic Configuration values
- Set-SPDiagnosticConfig allows setting Diagnostic Configuration values
- Trace Log and Event Log Throttling
- Get-SPLogLevel displays a list of diagnostic levels
- Set-SPLogLevel allows setting of trace/event level on categories
- Clear-SPLogLevel resets the trace/event levels to default
- Log File control
- New-SPLogFile ends the current log and starts a new one
- Merge-SPLogFile combines trace log files from all farm servers into a single file
- Trace Log Querying/Filtering
- Get-SPLogEvent reads and queries ULS trace logs
- Diagnostic Configuration
- Correlation ID tracing
- Every request has a unique correlation ID associated with all calls triggered by that request, even in SQL Profiler. Correlation ID appears in error message and can be used to find all associated actions immediately.
- Manageability improvements
- The ULS log file from each WFE server can now be directed to accumulate into a single SQL Server database. This makes it easier to find all relevant messages, and provides integration with SCOM monitoring. To enable this, click Configure usage and health data collection under Monitoring in Central Administration.
- All events that appear in the Windows Application log also appear in the ULS logs, so no longer necessary to correlate from these two different sources.
- Event flood protection. Heavily recurring events can be given a threshold so that they are only reported once every several minutes.
Developer Dashboard for Page Performance
This tool is useful for measuring the behavior and performance of individual pages. To analyze performance of a page, turn on SharePoint’s “Developer Dashboard” that reports on details of page performance. Using stsadm commands for this:
stsadm –o setproperty –pn developer-dashboard –pv on
After this is executed, each page will show a report at the bottom that gives information about the performance of all the page calls and database queries.
stsadm –o setproperty –pn developer-dashboard –pv off
To display an icon that allows you to toggle it on/off as you are working:
stsadm –o setproperty –pn developer-dashboard –pv ondemand
To set this parameter using PowerShell, use the following code snippet:
$DevDashboardSettings = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings; $DevDashboardSettings.DisplayLevel = ‘OnDemand’; $DevDashboardSettings.RequiredPermissions =’EmptyMask’; $DevDashboardSettings.TraceEnabled = $true; $DevDashboardSettings.Update()
This class gives developers the ability to instrument their code so that it can be monitored using SharePoint tools, such as the Developer Dashboard. Example of use:
using (new SPMonitoredScope(
“Some Scope Name”,