Bagikan melalui


Get-AzDataCollectionRule

Mengembalikan aturan pengumpulan data yang ditentukan.

Sintaks

Get-AzDataCollectionRule
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzDataCollectionRule
   -Name <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzDataCollectionRule
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzDataCollectionRule
   -InputObject <IDataCollectionRuleIdentity>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]

Deskripsi

Mengembalikan aturan pengumpulan data yang ditentukan.

Contoh

Contoh 1: Mendapatkan aturan pengumpulan data berdasarkan ID langganan

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

Perintah ini mendapatkan daftar aturan pengumpulan data berdasarkan langganan tertentu.

Contoh 2: Daftar menurut grup sumber daya

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

Perintah ini mendapatkan daftar aturan pengumpulan data berdasarkan grup sumber daya tertentu.

Contoh 3: Mendapatkan aturan tertentu dengan grup sumber daya tertentu

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

Perintah ini mendapatkan aturan pengumpulan data tertentu dengan grup sumber daya tertentu.

Parameter

-DefaultProfile

Parameter DefaultProfile tidak berfungsi. Gunakan parameter SubscriptionId saat tersedia jika menjalankan cmdlet terhadap langganan yang berbeda.

Jenis:PSObject
Alias:AzureRMContext, AzureCredential
Position:Named
Nilai default:None
Diperlukan:False
Terima input alur:False
Terima karakter wildcard:False

-InputObject

Parameter Identitas

Jenis:IDataCollectionRuleIdentity
Position:Named
Nilai default:None
Diperlukan:True
Terima input alur:True
Terima karakter wildcard:False

-Name

Nama aturan pengumpulan data. Nama tidak peka huruf besar/kecil.

Jenis:String
Alias:DataCollectionRuleName, RuleName
Position:Named
Nilai default:None
Diperlukan:True
Terima input alur:False
Terima karakter wildcard:False

-ResourceGroupName

Nama grup sumber daya. Nama tidak peka huruf besar/kecil.

Jenis:String
Position:Named
Nilai default:None
Diperlukan:True
Terima input alur:False
Terima karakter wildcard:False

-SubscriptionId

ID langganan target.

Jenis:String[]
Position:Named
Nilai default:(Get-AzContext).Subscription.Id
Diperlukan:False
Terima input alur:False
Terima karakter wildcard:False

Input

IDataCollectionRuleIdentity

Output

IDataCollectionRuleResource