Breyta

Deila með


Get-AzDataCollectionRule

Returns the specified data collection rule.

Syntax

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>]

Description

Returns the specified data collection rule.

Examples

Example 1: Get data collection rules by subscription 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

This command gets list of data collection rules by specified subscription.

Example 2: List by resource group

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

This command gets list of data collection rules by specified resource group.

Example 3: Get specific rule with specified resource group

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

This command gets specific data collection rule with specified resource group.

Parameters

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Identity Parameter

Type:IDataCollectionRuleIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

The name of the data collection rule. The name is case insensitive.

Type:String
Aliases:DataCollectionRuleName, RuleName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group. The name is case insensitive.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

The ID of the target subscription.

Type:String[]
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

IDataCollectionRuleIdentity

Outputs

IDataCollectionRuleResource