Monitoring Store
The data required to monitor the health of your application or to troubleshoot application problems is stored in the monitoring store. This topic provides a description of the tracked data and related queries, and the monitoring Windows PowerShell cmdlets.
Tracked Data in the Monitoring Database
Before AppFabric it was difficult to troubleshoot a distributed application across multiple services and computers. You had to enable tracing for each service, run activities, turn off tracing and collect all the trace files, and then view them in Service Trace Viewer.
In AppFabric, you can use the monitoring store with one or more instances of the Event Collection service to troubleshoot an application more easily. All of the WCF and Workflow service events are saved to a monitoring store. Instrumentation event data for multiple WCF and Workflow services can be stored in one monitoring store, or each application can use a separate store.
The instrumentation event data stored in the monitoring store includes the following:
WCF run-time trace events intended to help you monitor, troubleshoot, and tune WCF services. This category includes trace events (transfers) that allow you to reconstruct a message flow between services.
Events from WF tracking records, correlated by instance ID.
Service host events. This category includes any events emitted by the WCF or Workflow service host.
It is not uncommon for WCF extensions and binding configurations to alter the messaging patterns of a WCF service. Because of this, you may see events in the monitoring store that were not emitted from your business logic. For example, durable workflows that are managed by the Workflow Management Service (WMS) expose a control endpoint that allows the WMS to send commands to the service through net.pipe messages. When these messages are processed, events are emitted in the same way as when your business messages are processed. This will be the case any time your Web hosted service sends or receives a message.
Queries Supported by the Monitoring Database
The monitoring store supports queries for a wide variety of service metrics. A few of the many possibilities are listed here.
Service metadata is Machine Name, Site Name, App Name, and Service Virtual Path. Common input parameters for queries include the service metadata, metric name, and time period.
Query for WF events associated with a given WF instance ID, event state, or event type.
Query by service metadata, such as: number of instances started in a given period, active instances in a given period, and average instance lifetime over a given period.
Query for variables and tracked user data for an instance or service, based on track record event ID, WF instance ID, or service metadata.
Query for WCF service metrics by WCF analytic trace event type.
Query to reconstruct message flow for a specified activity ID.
Query based on user data and variables extracted from workflow service instances.
Query for WCF events related to a given workflow service instance.
Note
If a field’s value returned from a query is Null then there is no value assigned to that field. However, if a field’s value is empty, this indicates that an empty value “” was passed to it.
Database Schema
The monitoring schema refers to all of the objects that are created when the Initialize-ASMonitoringDatabase cmdlet initializes a new monitoring store. User modification or extension of the objects in the monitoring schema is not supported.
You can run SQL queries directly on the monitoring store to view event data.
The monitoring store schema can coexist with the persistence store schema in one store.
Monitoring Database Cmdlets
You manage the monitoring store by using AppFabric cmdlets. Cmdlets exist for the following areas.
Database Management
- Initialize-ASMonitoringDatabase
Creates and initializes a new monitoring store.
- Remove-ASMonitoringDatabase
Deletes a monitoring store. If the store is a dedicated monitoring store it is deleted (dropped). If the store is shared with another schema, only the monitoring schema is removed.
Purge and Archive
Use this group of cmdlets to manage the archive configuration for a monitoring store.
- Clear-ASMonitoringDatabase
Purges the specified data within a monitoring store. Data can be sent to a previously configured (using Set-MonitoringDatabaseArchiveConfiguration) archive store.
- Set-ASMonitoringDatabaseArchiveConfiguration
Associates a monitoring store with a destination archive store. The destination archive store must be a pre-existing, initialized monitoring store.
- Get-ASMonitoringDatabaseArchiveConfiguration
Retrieves the configuration information for a given monitoring store’s archive store. Configuration must have been previously set by using Set-MonitoringDatabaseArchiveConfiguration.
- Remove-ASMonitoringDatabaseArchiveConfiguration
Removes configuration information about a monitoring store’s archive store.
See Also
Concepts
Database Administration
Monitoring Database Views and Tables
2012-09-12