Partager via


Health Monitoring for SharePoint 2010

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: https://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: https://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:

image

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 reporting

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.

  1. ULS Log Viewer
    1. 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.”image
    2. Download ULS Log Viewer from: https://code.msdn.microsoft.com/ULSViewer
  2. PowerShell cmdlets for managing the logs
    1. Diagnostic Configuration
      1. Get-SPDiagnosticConfig retrieves Diagnostic Configuration values
      2. Set-SPDiagnosticConfig allows setting Diagnostic Configuration values
    2. Trace Log and Event Log Throttling
      1. Get-SPLogLevel displays a list of diagnostic levels
      2. Set-SPLogLevel allows setting of trace/event level on categories
      3. Clear-SPLogLevel resets the trace/event levels to default
    3. Log File control
      1. New-SPLogFile ends the current log and starts a new one
      2. Merge-SPLogFile combines trace log files from all farm servers into a single file
    4. Trace Log Querying/Filtering
      1. Get-SPLogEvent reads and queries ULS trace logs
  3. Correlation ID tracing
    1. 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.
  4. Manageability improvements
    1. 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.
    2. 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.
    3. 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.

Article: https://blogs.technet.com/speschka/archive/2009/10/28/using-the-developer-dashboard-in-sharepoint-2010.aspx

To cancel:

 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()
  

SPMonitoredScope

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”,
  TraceSeverity.Verbose, 1000,
    new SPRequestUsageCounter(3),
   new SPSqlQueryCounter())
    )
   {
       callExternalCode();
 }

Technorati Tags: SharePoint 2010,Health,Monitoring,SCOM