Configure Monitoring
This topic describes how to use AppFabric cmdlets to configure an application or a service to use monitoring. The cmdlets that you can use for configuring monitoring are Start-ASAppMonitoring, Get-ASAppMonitoring, Set-ASAppMonitoring, and Stop-ASAppMonitoring.
To execute an AppFabric cmdlet interactively, open the Windows PowerShell console for AppFabric, enter the appropriate cmdlet, and then press ENTER. For more information about executing cmdlets, see Running AppFabric Cmdlets.
To enable monitoring for an application
In the Windows PowerShell console, execute the Set-ASAppMonitoring cmdlet to enable monitoring information for an application.
Syntax options for Set-ASAppMonitoring:
Syntax 1
Set-ASAppMonitoring [-SiteName] <String> [-VirtualPath] <String> -MonitoringLevel [-Confirm] [-ConnectionStringName <String>]
Syntax 2
Set-ASAppMonitoring [-Uri] <Uri> -MonitoringLevel [-Confirm] [-ConnectionStringName <String>]
Syntax 3
Set-ASAppMonitoring [-ApplicationObject] <ApplicationInfo> -MonitoringLevel [-Confirm] [-ConnectionStringName <String>]
Syntax 4
Set-ASAppMonitoring -MonitoringLevel [-Confirm] [-ConnectionStringName <String>] -Root
Parameter | Description |
---|---|
[-SiteName] <String> [[-VirtualPath] <String>]. [-Uri] <Uri>, -ApplicationObject <ApplicationInfo>, or -Root |
Operational scope of the cmdlet |
-MonitoringLevel |
{<Custom> | <EndToEndMonitoring> | <ErrorsOnly> | <HealthMonitoring> | <Off> | <Troubleshooting>} |
-Confirm |
Option to confirm action or not |
-ConnectionStringName <String> |
Connection string to access specific monitoring database |
To start monitoring for an application
In the Windows PowerShell console, execute the Start-ASAppMonitoring cmdlet to start monitoring information for an application.
Syntax options for Start-ASAppMonitoring:
Syntax 1
Start-ASAppMonitoring [-SiteName] <String> [[-VirtualPath] <String>] [-CurrentScopeOnly]
Syntax 2
Start-ASAppMonitoring [-Uri] <Uri> [-CurrentScopeOnly]
Syntax 3
Start-ASAppMonitoring -ApplicationObject <ApplicationInfo> [-CurrentScopeOnly]
Syntax 4
Start-ASAppMonitoring -MonitoringInfo <MonitoringInfo> [-CurrentScopeOnly]
Syntax 5
Start-ASAppMonitoring [-CurrentScopeOnly] -Root [-CurrentScopeOnly]
Parameter | Description |
---|---|
[-SiteName] <String> [[-VirtualPath] <String>], [-Uri] <Uri>, -ApplicationObject <ApplicationInfo>, or -Root |
Operational scope of the cmdlet |
-MonitoringInfo |
Structure containing monitoring information |
-CurrentScopeOnly |
Disables any recursive operations of the cmdlet |
This command sets enabled=”true” in the configuration file to enable monitoring.
<microsoft.applicationServer>
<monitoring lockElements="bulkCopyProviders, collectors">
<bulkCopyProviders>
<bulkCopyProvider providerName="System.Data.SqlClient" type="Microsoft.ApplicationServer.Monitoring.EventCollector.SqlServerBulkCopy, Microsoft.ApplicationServer.Monitoring, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</bulkCopyProviders>
<collectors>
<collector name="" session="0">
<settings retryCount="5" eventBufferSize="101" retryWait="00:00:15" maxWriteDelay="00:00:06" />
</collector>
</collectors>
<default enabled=”true’connectionStringName="DefaultSqlMonitoringConnectionString" monitoringLevel="HealthMonitoring" />
</monitoring>
To obtain monitoring information for an application
In the Windows PowerShell console, execute the Get-ASAppMonitoring cmdlet to obtain monitoring information for an application.
Syntax options for Get-ASAppMonitoring:
Syntax 1
Get-ASAppMonitoring [-SiteName] <String> [[-VirtualPath] <String>]
Syntax 2
Get-ASAppMonitoring [-Uri] <Uri>
Syntax 3
Get-ASAppMonitoring -ApplicationObject <ApplicationInfo>
Syntax 4
Get-ASAppMonitoring -Root
Parameter | Description |
---|---|
[-SiteName] <String> [-VirtualPath], [-Uri] <Uri>, -ApplicationObject <ApplicationInfo>, or -Root |
Operational scope of the cmdlet |
To stop monitoring for an application
In the Windows PowerShell console, execute the Stop-ASAppMonitoring cmdlet to stop monitoring for an application.
Syntax options for Stop-ASAppMonitoring:
Syntax 1
Stop-ASAppMonitoring [-SiteName] <String> [[-VirtualPath] <String>] [-CurrentScopeOnly]
Syntax 2
Stop-ASAppMonitoring [-Uri] <Uri> [-CurrentScopeOnly]
Syntax 3
Stop-ASAppMonitoring -ApplicationObject <ApplicationInfo> [-CurrentScopeOnly]
Syntax 4
Stop-ASAppMonitoring -MonitoringInfo <MonitoringInfo> [-CurrentScopeOnly]
Syntax 5
Stop-ASAppMonitoring [-CurrentScopeOnly] -Root
Parameter | Description |
---|---|
[-SiteName] <String> [-VirtualPath], <Uri>, -ApplicationObject <ApplicationInfo>, or -Root |
Operational scope of the cmdlet |
-MonitoringInfo |
Structure containing monitoring information |
-CurrentScopeOnly |
Disables any recursive operations of the cmdlet |
2012-09-12