Configure Usage and Health Data Collection SharePoint 2013

This article provides information about how to configure usage and health data collection in Microsoft SharePoint 2013. SharePoint 2013 writes usage and health data to the logging folder and to the logging database. You have to use the Central Administration Web site to configure health data collection settings.

Usage and Health Data Collection Service Application collects Data about Usage and Health of your farm. This information is used for Health Monitoring and this is also required for running the Web Analytics Service. If you do not have a Usage and Health Data Collection Service Application or your Usage and Health Data Collection Proxy is stopped, you will not see any data in the Web Analytics Report.

You can create it in the way described here. You need to navigate to Monitoring, Click on Configure Usage and Health Data Collection, check the box for "Enable us
age data collection", select the Events to Log, put in the log file location, SQL information and you are done. Now you have Health Data Collection Service Application.

Configure usage and health data collection by using Central Administration

The usage and health data settings are farm-wide and cannot be set for individual servers in the farm.

To configure usage and health data collection by using Central Administration:

  1. Verify that you have the following administrative credentials:

    • The user account that performs this procedure has to be a member of the Farm Administrators group.
     
  2. In Central Administration, on the Home page, click Monitoring.
     
  3. On the Monitoring page, in the Reporting section, click Configure usage and health data collection.
     
  4. On the Configure usage and health data collection page, in the Usage Data Collection section, select the Enable usage data collection check box.
     
  5. In the Event Selection section, select the check boxes of the events that you want to log.

    Logging uses system resources and can affect performance and disk usage. Only log those events for which you want regular reports. For impromptu reports or investigations, enable logging for specific events, and then disable logging for the events after the report or investigation completes.
     
  6. In the Usage data collection settings section, type the path of the folder to which you want usage and health information written in the Log file location box. The path that you specify must exist on each server in the farm.

    These settings are applied to all events. To set event collection settings for individual event types, you must use Windows PowerShell.
     
  7. Type the maximum disk space (between 1 and 20 GB) for the logs in the Maximum log file size box.
     
  8. In the Health data collection section, select the Enable health data collection check box. To change the collection schedules, click Health Logging Schedule. A list of timer jobs that collect health data is listed. Click any of the timer jobs to change its schedule, or disable that timer job.
     
  9. In the Logging Database Server section, to change the authentication method, select either the Windows authentication or SQL authentication option.

    To change the Database Server and Database Name values, you must use Windows PowerShell.

Configure usage data collection by using Windows PowerShell

To configure usage data collection by using Windows PowerShell:

  1. Add a user to the SharePoint_Shell_Access role for the specified database.

    Add-SPShellAdmin [-UserName] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-database <SPDatabasePipeBind>] [-WhatIf [<SwitchParameter>]]
     
  2. On the Start menu, click All Programs.
     
  3. Click Microsoft SharePoint 2013 Products.
     
  4. Click SharePoint 2013 Management Shell.
     
  5. At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:

    Set-SPUsageService [-LoggingEnabled {1 | 0}] [-UsageLogLocation <Path>] [-UsageLogMaxSpaceGB <1-20>] [-Verbose]

For UsageLogLocation, specify a path that exists on each computer in the farm.

Enable usage data logging by typing -LoggingEnabled 1. Specify the maximum amount of drive space used for logging with the UsageLogMaxSpaceGB parameter.

Configure usage data collection for a specific event type by using Windows PowerShell

The event types listed on the Configure usage and health data collection page in Central Administration are the same as Usage Definitions in Windows PowerShell. You can use only Windows PowerShell to configure usage definitions individually. Moreover, you can configure only the DaysRetained setting.

To configure usage data logging for a specific event type using Windows PowerShell:

  1. On the Start menu, click All Programs.
     
  2. Click Microsoft SharePoint 2013 Products.
     
  3. Click SharePoint 2013 Management Shell.
     
  4. At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:

    Set-SPUsageDefinition -Identity <GUID> [-Enable] [-DaysRetained <1-30>] [-Verbose]

The Identity parameter specifies the usage definition object that you want to update. The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a usage Use the Enable switch to enable usage logging for this usage definition. Use DaysRetained to specify how long the usage data is retained in the log before being deleted. The range is 1 to 30 days. To view the progress of the command, use the Verbose parameter.

Log usage data in a different logging database by using Windows PowerShell

You use Windows PowerShell to change this setting.

To log usage data in a different logging database by using Windows PowerShell:

  1. On the Start menu, click All Programs.
     
  2. Click Microsoft SharePoint 2013 Products.
     
  3. Click SharePoint 2013 Management Shell.
     
  4. At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:

    Set-SPUsageApplication -DatabaseServer <Database server name> -DatabaseName <Database name> [-DatabaseUsername <User name>] [-DatabasePassword <Password>] [-Verbose]

You must specify the value for the DatabaseServer parameter, even if the new database is on the same database server as the old one. You must use both the DatabaseUsername and the DatabasePassword parameters if the database owner is a different user account from the one with which you logged on. To view the progress of the command, use the Verbose parameter.

Up Next
    Ebook Download
    View all
    Learn
    View all