Get-AzDataCollectionRule
语法
List1 (默认值)
Get-AzDataCollectionRule
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get
Get-AzDataCollectionRule
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
List
Get-AzDataCollectionRule
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
GetViaIdentity
Get-AzDataCollectionRule
-InputObject <IDataCollectionRuleIdentity>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
说明
示例
示例 1:按订阅 ID 获取数据收集规则
Get-AzDataCollectionRule
Etag Kind Location Name ResourceGroupName
---- ---- -------- ---- -----------------
"d500e99c-0000-0100-0000-650d68320000" eastus myCollectionRule1 AMCS-TEST
"d50031d9-0000-0100-0000-650d6b1f0000" eastus myCollectionRule2 AMCS-TEST
此命令按指定的订阅获取数据收集规则的列表。
示例 2:按资源组列出
Get-AzDataCollectionRule -ResourceGroupName AMCS-TEST
Etag Kind Location Name ResourceGroupName
---- ---- -------- ---- -----------------
"d500e99c-0000-0100-0000-650d68320000" eastus myCollectionRule1 AMCS-TEST
"d50031d9-0000-0100-0000-650d6b1f0000" eastus myCollectionRule2 AMCS-TEST
此命令按指定的资源组获取数据收集规则的列表。
示例 3:获取具有指定资源组的特定规则
Get-AzDataCollectionRule -ResourceGroupName AMCS-TEST -Name myCollectionRule1
DataCollectionEndpointId :
DataFlow : {{
"streams": [ "Microsoft-InsightsMetrics" ],
"destinations": [ "azureMonitorMetrics-default" ]
}}
DataSourceDataImportEventHubConsumerGroup :
DataSourceDataImportEventHubName :
DataSourceDataImportEventHubStream :
DataSourceExtension :
DataSourceIisLog :
DataSourceLogFile :
DataSourcePerformanceCounter : {{
"streams": [ "Microsoft-Perf" ],
"samplingFrequencyInSeconds": 15,
"counterSpecifiers": [ "\\\\Processor(_Total)\\\\% Processor Time", "\\\\Memory\\\\Committed Bytes", "\\\\LogicalDisk(_Total)\\\\Free
Megabytes", "\\\\PhysicalDisk(_Total)\\\\Avg. Disk Queue Length" ],
"name": "cloudTeamCoreCounters"
}, {
"streams": [ "Microsoft-Perf" ],
"samplingFrequencyInSeconds": 30,
"counterSpecifiers": [ "\\\\Process(_Total)\\\\Thread Count" ],
"name": "appTeamExtraCounters"
}}
DataSourcePlatformTelemetry :
DataSourcePrometheusForwarder :
DataSourceSyslog :
DataSourceWindowsEventLog : {{
"streams": [ "Microsoft-WindowsEvent" ],
"xPathQueries": [ "System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]" ],
"name": "appTeam1AppEvents"
}}
DataSourceWindowsFirewallLog :
Description :
DestinationAzureMonitorMetricName : azureMonitorMetrics-default
DestinationEventHub :
DestinationEventHubsDirect :
DestinationLogAnalytic :
DestinationMonitoringAccount :
DestinationStorageAccount :
DestinationStorageBlobsDirect :
DestinationStorageTablesDirect :
Etag : "d500e99c-0000-0100-0000-650d68320000"
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/AMCS-TEST/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule1
IdentityPrincipalId :
IdentityTenantId :
IdentityType :
IdentityUserAssignedIdentity : {
}
ImmutableId : dcr-9a6169afee634c13baa880dee8c5eb97
Kind :
Location : eastus
MetadataProvisionedBy :
MetadataProvisionedByResourceId :
Name : myCollectionRule1
ProvisioningState : Succeeded
ResourceGroupName : AMCS-TEST
StreamDeclaration : {
}
SystemDataCreatedAt : 9/22/2023 9:18:41 AM
SystemDataCreatedBy : v-jiaji@microsoft.com
SystemDataCreatedByType : User
SystemDataLastModifiedAt : 9/22/2023 10:10:57 AM
SystemDataLastModifiedBy : v-jiaji@microsoft.com
SystemDataLastModifiedByType : User
Tag : {
}
Type : Microsoft.Insights/dataCollectionRules
此命令获取具有指定资源组的特定数据收集规则。
参数
-DefaultProfile
DefaultProfile 参数不起作用。
如果对其他订阅执行 cmdlet,请使用 SubscriptionId 参数。
参数属性
| 类型: | PSObject
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | AzureRMContext, AzureCredential |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
标识参数
GetViaIdentity
| Position: | Named |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Name
数据收集规则的名称。
此名称不区分大小写。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | DataCollectionRuleName, 规则名称 |
参数集
Get
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-ResourceGroupName
资源组的名称。
此名称不区分大小写。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
Get
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
List
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-SubscriptionId
目标订阅的 ID。
参数属性
| 类型: | String[]
|
| 默认值: | (Get-AzContext).Subscription.Id |
| 支持通配符: | False |
| 不显示: | False |
参数集
List1
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
Get
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
List
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。
输出