Share via


Configure Monitoring

This topic explains how you use the Configure WF and WCF dialog box to configure monitoring settings at the server, site, and application levels. It also discusses how to configure monitoring levels within IIS Manager extensions in AppFabric.

Overview

You control monitoring configuration by using configuration elements in the Web.config files. Use the Monitoring tab in the Configure WF and WCF dialog box to display and edit the configuration elements related to monitoring. The settings available on the Monitoring tab depend on what is selected in the Connections pane management tree in IIS Manager. The title bar of the WF and WCF configuration dialog box changes to show the level (or scope) currently selected: server, site, or application. For example, if you select the server level in the management tree, the configuration dialog box title is Configure WF and WCF for Server, and any changes you make are saved to the root Web.config file located in %windir%\Microsoft.NET\Framework\v4.0.xxxxx\Config.

The site, application, and service levels behave similarly, with settings saved to the Web.config file for the selected item. The settings that are displayed are from the closest level with defined settings. For example, if you select the site scope but no settings are defined at the site level, the settings that are displayed are read from the server Web.config file. If settings are defined for the selected level, then those settings are displayed.

Default behaviors may be inherited from server to site, application, or service; and from site to application or service. The general mechanism for configuration inheritance is described in Getting Started with IIS 7.0 Configuration (https://go.microsoft.com/fwlink/?LinkId=168534). For more information about locking down settings, see How to Use Locking in IIS 7.0 Configuration (https://go.microsoft.com/fwlink/?LinkId=168537).

Configure WF and WCF Monitoring Tab

The Configure WF and WCF dialog box is used to configure and view various monitoring properties for a site, server, or application.

Database

You must enable database event collection to enable Event Collection service monitoring. Event Collection service monitoring is independent of diagnostic tracing and message logging, so you do not have to enable database event collection to use diagnostic tracing and message logging.

Element Value

Enable database event collection

Select to enable Event Collection service-based monitoring. This affects event collection, performance counter event collection, and WF instance history collection.

Connection string

Select which database you will direct events to, for the currently selected server, site, or application. When you set this at the server or site level you are selecting the inherited default monitoring database for lower levels in the hierarchy.

Level

This section sets the monitoring level for the currently selected server, site, or application. Monitoring level applies to both WCF and WF services.

Element Value

Application Monitoring Level

Displays the current monitoring level. The default level is Health Monitoring. Move the slider to set a different monitoring level.

Default

Enabled only if the level is Custom; that is, configuration does not map to any of the default levels. Clicking Default resets the monitoring level to Heath Monitoring.

Workflow Tracking Profile

Use this section to view or set the tracking profile applied to WF services. This option is not available at the server, site, or application levels. It applies to service configuration only.

Element Value

Name

Displays the current tracking profile name.

Configure

Displays the Workflow Tracking Profile dialog box, where you can select an existing tracking profile or import a new tracking profile. For more information about choosing a tracking profile, see Configure Tracking.

Diagnostic Tracing and Message Logging

This section shows the status of diagnostic tracing and message logging, and you use it to configure diagnostics for the currently selected level. System.Diagnostics does not use the Event Collection service, and this setting is independent of database event collection.

In general, diagnostic tracing and message logging are most useful for debugging services. CPU utilization is higher than for ETW-based event collection. Output is directed to an XML file instead of to a database. Certain kinds of diagnostic data can only be collected by using System.Diagnostics, such as the contents of messages sent between services.

Element Value

Status

Either enabled or disabled.

Configure

Displays the Configure Diagnostic Tracing and Message Logging dialog box. For more information about the diagnostic tracing and message logging options, see Configure Message Logging and Configure Tracing.

Configuring Monitoring Settings

The following procedure is common to server, site, and application levels, except as noted above.

To configure monitoring settings

  1. Start or switch to IIS Manager.

  2. In the Connections pane, select the server, site, or application you want to configure.

  3. Right-click the item. On the context menu, click Manage WCF and WF Services, and then click Configure.

    Alternatively, you can use the Actions pane instead of the context menu. Find the Manage WCF and WF Services section, and then click Configure.

  4. When the Configure WF and WCF dialog box appears, click the Monitoring tab.

  5. View or change settings as necessary. If you change settings, click OK to apply the settings and close the dialog box, or click Apply to apply settings without closing the dialog box. Click Cancel to close the dialog box without saving.

Monitoring Levels

Monitoring levels provide a convenient way to configure WF and WCF service instrumentation. AppFabric provides a default set of monitoring levels that store different amounts of data for visibility into its applications. You can select the appropriate level of instrumentation based upon your requirements for troubleshooting or performance. Each level consists of the instrumentation events emitted by the applications and events, collected by the Event Collection service, and stored in the Monitoring database. AppFabric uses event data to aggregate information about overall status of healthy applications and to provide rich troubleshooting data for unhealthy applications.

A WCF service emits analytic trace events, which are collected depending on the verbosity defined by the monitoring level. A WF service emits analytic trace events from the WCF layer and WF tracking events from the workflow. The tracking profile controls the verbosity of emission of tracking events from the WF service, while the monitoring level defined in the Event Collection service configuration defines the verbosity of collection.

The Monitoring slider sets the monitoring level, which is implemented as a collection of pre-defined configuration element settings at the selected scope. You configure the desired monitoring level in the Monitoring tab within the configuration dialog box for a server, site, or application. The following table describes the monitoring levels that are supported.

Monitoring Level Description Configuration Attribute Setting Details Scenarios

Off

No data is collected. This level is effectively the same as disabling monitoring by turning off event collection to the monitoring database. Application metrics are not populated in the Dashboard. This level applies to high-performance applications that need minimal overhead.

Note

Even when the monitoring level is set to off, tracking records may still be created if tracking behaviors are added to the service in the source code. In this instance, there is a nominal performance cost to creating tracking records even though those records are not saved to the database.

monitoringLevel="Off”

Zero emitted events

No tracking for WF service

High-performance application that needs zero monitoring overhead

No supported monitoring scenarios

Errors Only

Collects only error and warning events. No performance counter or instance history data is collected. Application metrics are not populated in the Dashboard.

monitoringLevel="ErrorsOnly”

Visibility into only Critical events

Addresses Config/Runtime/Design time failures

Dashboard visibility limited to errors

Configured tracking profile is the ErrorsOnly Tracking Profile

High-performance application

Supports error monitoring scenarios

Health Monitoring

Health Monitoring is the default monitoring level, and is sufficient to enable collection of all Dashboard metrics. This level includes all the data captured at the Errors Only level, plus additional WCF analytic tracing data. This level is a balance between collecting enough data to monitor the health of your applications and reducing the performance cost of monitoring a service.

monitoringLevel="HealthMonitoring”

Contains all events from previous level

Dashboard visibility into application metrics and WF state

Configured tracking profile is the HealthMonitoring Tracking Profile

Application in healthy state

Supports monitoring scenarios

End-to-End Monitoring

This level allows you to monitor the connections between applications by monitoring message traffic. This level includes all the events from the Health Monitoring level, plus additional events to reconstruct the message flow.

monitoringLevel="EndToEndMonitoring”

Contains all events from previous level

Supports events to create message flow

Configured tracking profile is the EndToEndMonitoring Tracking Profile

Application may be in healthy or unhealthy state

Need to monitor connections between applications

Troubleshooting

This profile is the most verbose. It is a superset of the End-to-End Monitoring and Health Monitoring profiles, and emits detailed data to assist with locating errors and determining their cause. This level is most appropriate for troubleshooting an unhealthy application.

monitoringLevel="Troubleshooting"

All events

Configured tracking profile is the Troubleshooting Tracking Profile

Application in unhealthy state

Supports troubleshooting scenarios

Each of these monitoring level settings changes the monitoringLevel attribute of the <monitoring> element in the Web.config file. The following example shows the <monitoring> element from the Web.config file for an application.

<microsoft.applicationServer>
   <monitoring>
      <default enabled="true" connectionStringName="ApplicationServerMonitoringConnectionString" monitoringLevel="Troubleshooting" />
   </monitoring>
</microsoft.applicationServer>

Health Monitoring is the default monitoring level, and is sufficient to enable collection of all the metrics displayed on the Dashboard. This level includes all the data captured at the Errors Only level, plus additional WCF analytic tracing data and lightweight workflow tracking events. This level is a balance between collecting enough data to monitor the health of your applications and reducing the performance cost of monitoring a service.

WCF Service Event Aggregation

When an application is configured at the Health Monitoring level the Event Collection service will aggregate events that indicate a successful WCF operation. The raw operation completion events will not be stored.Aggregated events save on event storage for high-throughput scenarios, yet still give insight into your WCF services.  By default, the Application Server Event Collection service will aggregate events that indicate a successful WCF operation only when using the Health Monitoring level.  Aggregation yields the following data:

  • Average call duration on a per-operation basis

  • Number of calls for an operation per aggregate window

The aggregated event is Microsoft-Windows-Application Server-Applications\Analytic Id=214. When event aggregation is enabled you will no longer see event 214 in the monitoring database.  Rather, the aggregated event will appear in the monitoring database as EventTypeId=364 in the ASWcfEvents view.  You should expect a 364 aggregate event for each unique WCF operation at recurring ten-second intervals.  If a WCF operation has not emitted an event 214 during a particular time interval, then a 364 event will also not be emitted for that operation/interval. Event 364 is grouped by the following properties of event 214 which identify the operation as being unique:

  • HostReference

  • MethodName

The IIS Manager tools display the aggregate events in the same way that raw events are shown. The Dashboard shows the total count of WCF completed calls whether the events are stored in the aggregate or raw form. The Tracked Events page shows the aggregated events (ID 364) in the list with other event types.

The alternative to aggregation is to disable the aggregation feature by using the configuration file. This results in one event for each WCF call that your service receives. To enable or disable aggregation of event 214, you will modify the value of the aggregationEnabled attribute on the event collector’s configuration. For more information, see Configure the Event Collection Service.

Configuring a Monitoring Level

This procedure shows how to change the monitoring level for your server, site, or application.

To configure the monitoring level for a server, site, or application

  1. Start or switch to IIS Manager.

  2. In the Connections pane, select the server, site, or application you want to configure.

  3. Right-click the item. On the context menu, click Manage WCF and WF Services, and then click Configure.

  4. When the Configure WF and WCF dialog box appears, click the Monitoring tab.

  5. In the Level section, use the slider control to select the monitoring level you want, or click Default (if available) to set the default monitoring level.

  6. Click OK to close the dialog box and save your changes, or click Cancel to close the dialog box without saving changes.

See Also

Reference

Configure WCF and WF for Server, Site, or Application: Monitoring Tab

Concepts

Monitoring Applications