Share via


Understanding Monitoring Tools for Team Foundation Server

Team Foundation Server does not include a specific set of tools for monitoring server performance. However, you can use monitoring tools and options that are part of Windows Server 2003, Microsoft SQL Server 2005, and the.NET Framework to monitor your Team Foundation Server deployment. In addition, you can configure monitoring for Team Explorer clients by enabling tracing and allowing for Watson reporting.

Using System Tools

There are a variety of tools available as part of the software you must install for Team Foundation Server. You can use the following tools to monitor various aspects of Team Foundation Server.

Windows Event Viewer

By reviewing the event log in Event Viewer, you can monitor and review server state changes. The event log provides a record of what state changes occurred, when these state changes occurred, and what triggered the state change. The event log is a useful tool for troubleshooting immediate problems and for looking at the history and the health of the server.

The following table describes which sections of the event log contain relevant messages for Team Foundation Server on the Team Foundation application-tier server.

Component Event Log Section

Team Foundation Server

Application

Security (Team Foundation Server service accounts)

ASP.NET Web services

Application

Internet Information Services (IIS) Web services

Security

System

Windows SharePoint Services

Application

SQL Reporting Services

Security

The following table describes which sections of the event log contain relevant messages for Team Foundation Server on the Team Foundation data-tier server.

Component Event Log Section

SQL Server

Application

System

Security (Team Foundation Server service accounts)

Windows Networking

Security

System

SQL Analysis Services

Security

Team Foundation uses four event log message types: Error, Warning, Audit, and Information. Each of these types indicates different levels of action for the Team Foundation Server administrator.

  • Error   The error message type indicates an urgent condition. Although not all error events are actionable, all error events should be investigated. Follow the guidance available in the error event message and review the information available in Troubleshooting Team Foundation Server.

  • Warning   The warning message type indicates a potential problem or issue that might require attention. Warning messages should be reviewed and tracked for patterns over time.

  • Audit   The audit message type is only seen in the Security section. A Success Audit message indicates a successful security action, such as a user successfully logging on to the system. A Failure Audit message indicates an unsuccessful security action, such as a user failing to access a server resource. Audit messages should be reviewed for troubleshooting performance and server access problems and for trends over time.

  • Information   The information message type indicates a state change on the Team Foundation application-tier or Team Foundation data-tier server. Information messages do not require any action, but can provide valuable data for monitoring the state of your Team Foundation Server over time.

Team Foundation components use the following event identification number ranges to identify the type of event message recorded in the event log:

  • Error: 3001 - 5000

  • Warning: 6001 - 6999

  • Information: 9001 - 9999

  • Audit: Audit message event ID numbers are not specific to Team Foundation components

Note

Event ID numbers are separate from Team Foundation error message numbers.

.NET Tracing

By enabling .NET tracing for Team Foundation components, you can gather specific diagnostic information. Each Team Foundation component is instrumented to provide additional information in a trace log when tracing is enabled. You can enable and disable .NET tracing for Team Foundation components without having to stop or restart programs. However, because .NET tracing significantly increases processor demands, and because tracing logs can grow to significant size, you should only enable .NET tracing when you must monitor specific aspects of your Team Foundation Server deployment or when you are troubleshooting. You should disable the tracing as soon as you can and delete the trace log files when you no longer need them.

Tracing output is saved to a trace log file. This output is only available in English. It is not localized. In addition, not all the output to the trace log is designed to be useful to the Team Foundation Server administrator. Each trace switch type provides different information:

  • API   The API trace switch type provides information about Web Service method usage, Web service calls, and public methods.

  • Authentication   The authentication trace switch type provides information about authentication events and interaction between Team Foundation components.

  • Authorization   The authorization trace switch type provides information about Team Foundation's authorization events.

  • Database   The database trace switch type provides information about database interactions on the Team Foundation data-tier.

  • General   The general trace switch type covers all other events that do not fit into the other switch type categories.

For more information about how to enable tracing for Team Foundation Server, see Enabling Trace for Team Foundation Server Components.

Performance Viewer

Team Foundation Server includes a set of performance counters that you can use to monitor the performance of your Team Foundation application-tier server and your Team Foundation data-tier server. By tracking this data over time, you can establish base lines for the overall performance of your deployment. This base line will help you pinpoint problems in performance in addition to help you estimate when you might need to change your Team Foundation Server, such as moving from a single-server to a dual-server deployment or adding more memory.

Team Foundation Server has performance counters for its Web services, for version control, for work item tracking, and for the Team Foundation Server proxy performance. For more information about the available performance counters, see Monitoring Performance. For more information about how to add and configure performance counters for Team Foundation Server, see How to: View Team Foundation Server Performance Counters.

Creating Your Own Monitoring Tools

In addition to using system tools, you can create your own tools to monitor Team Foundation Server usage and performance. Team Foundation Server has an event log class as part of its software development kit. In addition, you can create tools to monitor and parse data logged by Team Foundation Web methods.

Web Service Method Logging and SQL Custom Queries

You can configure logging for Team Foundation Server Web service methods. Each Web service method for Team Foundation Server has a Web.config file that includes a logging section where you can configure different levels of logging for each Web method. The different levels are as follows:

  • None   Do not log information about this Web service method. This is the default value.

  • OnError   Log events that indicate errors.

  • ReadWrite   Log database change events.

  • Normal   Log any interaction with the database. These include but are not limited to database change events.

  • LightWeight   Log database change events and any Web methods that have minimal database access.

  • All   Log all events.

For more information about Team Foundation Server Web.config files, see Managing Team Foundation Server Configuration Settings and How to: Change Configuration Settings for Team Foundation Server Components.

When logging is configured, all the Web service method execution details that meet the set logging level are recorded in the TfsActivityLogging SQL database on the Team Foundation data-tier server. The information includes the identity of the caller, the Web service method, the parameters of that Web service method, when that Web service method was invoked, and how long it took for the Web service method call to complete. You can write custom SQL queries to parse this Team Foundation Server information and review the performance of the Team Foundation Server Web methods.

Using the TeamFoundationEventLog class

You can use the TeamFoundationEventLog class to write additional entries and events to the event log. These messages can range from simple informational messages to exception messages that provide information about the process, thread ID numbers, assembly numbers, and so on.

For more information about this class, see the Microsoft Web site (https://go.microsoft.com/fwlink/?LinkId=75104).

See Also

Tasks

How to: View Team Foundation Server Performance Counters
How to: Change Configuration Settings for Team Foundation Server Components

Concepts

Evaluating Team Foundation Server Performance
Monitoring Performance

Other Resources

Monitoring Team Foundation Server
Capacity Planning for Team Foundation Deployment
Troubleshooting Team Foundation Server
Enabling Trace for Team Foundation Server Components
Managing Team Foundation Server Configuration Settings