Udostępnij za pośrednictwem


Understanding Monitoring Tools for Team Foundation Server

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. For more information, see Monitoring Event Logs.

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 Configuration Settings for Team Foundation Server 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).

Using System Tools to Monitor and Troubleshoot Problems

In addition to everyday monitoring, you can use system tools to help you troubleshoot problems with Team Foundation Server by enabling tracing.

.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 enable .NET tracing only 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 and is available only 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 categories of trace switch types.

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

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

Troubleshooting Team Foundation Server

Enabling Trace for Team Foundation Server Components

Managing Configuration Settings for Team Foundation Server