Update-AzDataCollectionRule
Uppdatera en datainsamlingsregel.
Syntax
Update-AzDataCollectionRule
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-DataCollectionEndpointId <String>]
[-DataFlow <IDataFlow[]>]
[-DataSourceDataImportEventHubConsumerGroup <String>]
[-DataSourceDataImportEventHubName <String>]
[-DataSourceDataImportEventHubStream <String>]
[-DataSourceExtension <IExtensionDataSource[]>]
[-DataSourceIisLog <IIisLogsDataSource[]>]
[-DataSourceLogFile <ILogFilesDataSource[]>]
[-DataSourcePerformanceCounter <IPerfCounterDataSource[]>]
[-DataSourcePlatformTelemetry <IPlatformTelemetryDataSource[]>]
[-DataSourcePrometheusForwarder <IPrometheusForwarderDataSource[]>]
[-DataSourceSyslog <ISyslogDataSource[]>]
[-DataSourceWindowsEventLog <IWindowsEventLogDataSource[]>]
[-DataSourceWindowsFirewallLog <IWindowsFirewallLogsDataSource[]>]
[-Description <String>]
[-DestinationAzureMonitorMetricName <String>]
[-DestinationEventHub <IEventHubDestination[]>]
[-DestinationEventHubsDirect <IEventHubDirectDestination[]>]
[-DestinationLogAnalytic <ILogAnalyticsDestination[]>]
[-DestinationMonitoringAccount <IMonitoringAccountDestination[]>]
[-DestinationStorageAccount <IStorageBlobDestination[]>]
[-DestinationStorageBlobsDirect <IStorageBlobDestination[]>]
[-DestinationStorageTablesDirect <IStorageTableDestination[]>]
[-IdentityType <String>]
[-Kind <String>]
[-Location <String>]
[-StreamDeclaration <Hashtable>]
[-Tag <Hashtable>]
[-UserAssignedIdentity <Hashtable>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzDataCollectionRule
-InputObject <IDataCollectionRuleIdentity>
[-DataCollectionEndpointId <String>]
[-DataFlow <IDataFlow[]>]
[-DataSourceDataImportEventHubConsumerGroup <String>]
[-DataSourceDataImportEventHubName <String>]
[-DataSourceDataImportEventHubStream <String>]
[-DataSourceExtension <IExtensionDataSource[]>]
[-DataSourceIisLog <IIisLogsDataSource[]>]
[-DataSourceLogFile <ILogFilesDataSource[]>]
[-DataSourcePerformanceCounter <IPerfCounterDataSource[]>]
[-DataSourcePlatformTelemetry <IPlatformTelemetryDataSource[]>]
[-DataSourcePrometheusForwarder <IPrometheusForwarderDataSource[]>]
[-DataSourceSyslog <ISyslogDataSource[]>]
[-DataSourceWindowsEventLog <IWindowsEventLogDataSource[]>]
[-DataSourceWindowsFirewallLog <IWindowsFirewallLogsDataSource[]>]
[-Description <String>]
[-DestinationAzureMonitorMetricName <String>]
[-DestinationEventHub <IEventHubDestination[]>]
[-DestinationEventHubsDirect <IEventHubDirectDestination[]>]
[-DestinationLogAnalytic <ILogAnalyticsDestination[]>]
[-DestinationMonitoringAccount <IMonitoringAccountDestination[]>]
[-DestinationStorageAccount <IStorageBlobDestination[]>]
[-DestinationStorageBlobsDirect <IStorageBlobDestination[]>]
[-DestinationStorageTablesDirect <IStorageTableDestination[]>]
[-IdentityType <String>]
[-Kind <String>]
[-Location <String>]
[-StreamDeclaration <Hashtable>]
[-Tag <Hashtable>]
[-UserAssignedIdentity <Hashtable>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Uppdatera en datainsamlingsregel.
Exempel
Exempel 1: Uppdateringstagg för datainsamlingsregel
$syslog = New-AzSyslogDataSourceObject -FacilityName syslog -LogLevel Alert,Critical,Emergency -Name syslogBase -Stream Microsoft-Syslog
Update-AzDataCollectionRule -Name myCollectionRule1 -ResourceGroupName Monitor-ActionGroup -DataSourceSyslog $syslog
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 : {{
"streams": [ "Microsoft-Syslog" ],
"facilityNames": [ "syslog" ],
"logLevels": [ "Alert", "Critical", "Emergency" ],
"name": "syslogBase"
}}
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 : "9200a3d3-0000-0100-0000-654c72ae0000"
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/Monitor-ActionGroup/providers/Microsoft.Insights/dataColle
ctionRules/myCollectionRule1
IdentityPrincipalId :
IdentityTenantId :
IdentityType :
IdentityUserAssignedIdentity : {
}
ImmutableId : dcr-e30a8188813f426d962ef7053a3d1be4
Kind :
Location : eastus
MetadataProvisionedBy :
MetadataProvisionedByResourceId :
Name : myCollectionRule1
ProvisioningState : Succeeded
ResourceGroupName : Monitor-ActionGroup
StreamDeclaration : {
}
SystemDataCreatedAt : 11/9/2023 5:04:01 AM
SystemDataCreatedBy : v-jiaji@microsoft.com
SystemDataCreatedByType : User
SystemDataLastModifiedAt : 11/9/2023 5:48:29 AM
SystemDataLastModifiedBy : v-jiaji@microsoft.com
SystemDataLastModifiedByType : User
Tag : {
}
Type : Microsoft.Insights/dataCollectionRules
Det här kommandot uppdaterar datainsamlingsregeln.
Parametrar
-Confirm
Uppmanar dig att bekräfta innan du kör cmdleten.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DataCollectionEndpointId
Resurs-ID för den datainsamlingsslutpunkt som den här regeln kan användas med.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DataFlow
Specifikationen av dataflöden. Information om hur du skapar finns i AVSNITTET ANTECKNINGAR för DATAFLOW-egenskaper och skapa en hash-tabell.
Type: | IDataFlow[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DataSourceDataImportEventHubConsumerGroup
Namn på händelsehubbkonsumentgrupp
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DataSourceDataImportEventHubName
Ett eget namn för datakällan. Det här namnet ska vara unikt för alla datakällor (oavsett typ) i datainsamlingsregeln.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DataSourceDataImportEventHubStream
Dataströmmen som ska samlas in från EventHub
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DataSourceExtension
Listan över konfigurationer av datakällan för Azure VM-tillägget. Information om hur du skapar finns i AVSNITTET ANTECKNINGAR för DATASOURCEEXTENSION-egenskaper och skapa en hash-tabell.
Type: | IExtensionDataSource[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DataSourceIisLog
Listan över källkonfigurationer för IIS-loggar. Information om hur du skapar finns i AVSNITTET ANTECKNINGAR för DATASOURCEIISLOG-egenskaper och skapa en hash-tabell.
Type: | IIisLogsDataSource[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DataSourceLogFile
Listan över källkonfigurationer för Loggfiler. Information om hur du skapar finns i AVSNITTET ANTECKNINGAR för DATASOURCELOGFILE-egenskaper och skapa en hash-tabell.
Type: | ILogFilesDataSource[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DataSourcePerformanceCounter
Listan över konfigurationer av datakällor för prestandaräknare. Information om hur du skapar finns i AVSNITTET ANTECKNINGAR för DATASOURCEPERFORMANCECOUNTER-egenskaper och skapa en hash-tabell.
Type: | IPerfCounterDataSource[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DataSourcePlatformTelemetry
Listan över plattformstelemetrikonfigurationer För att skapa, se AVSNITTET ANTECKNINGAR för DATASOURCEPLATFORMTELEMETRY-egenskaper och skapa en hash-tabell.
Type: | IPlatformTelemetryDataSource[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DataSourcePrometheusForwarder
Listan över Konfigurationer för Prometheus-vidarebefordrare av datakällor. Information om hur du skapar finns i AVSNITTET ANTECKNINGAR för DATASOURCEPROMETHEUSFORWARDER-egenskaper och skapa en hash-tabell.
Type: | IPrometheusForwarderDataSource[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DataSourceSyslog
Listan över Syslog-datakällans konfigurationer. Information om hur du skapar finns i AVSNITTET ANTECKNINGAR för DATASOURCESYSLOG-egenskaper och skapa en hash-tabell.
Type: | ISyslogDataSource[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DataSourceWindowsEventLog
Listan över konfigurationer för Windows-händelseloggens datakälla. Information om hur du skapar finns i AVSNITTET ANTECKNINGAR för DATASOURCEWINDOWSEVENTLOG-egenskaper och skapa en hash-tabell.
Type: | IWindowsEventLogDataSource[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DataSourceWindowsFirewallLog
Listan över källkonfigurationer för Windows-brandväggens loggar. Information om hur du skapar finns i AVSNITTET ANTECKNINGAR för DATASOURCEWINDOWSFIREWALLLOG-egenskaper och skapa en hash-tabell.
Type: | IWindowsFirewallLogsDataSource[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Parametern DefaultProfile fungerar inte. Använd parametern SubscriptionId när den är tillgänglig om du kör cmdleten mot en annan prenumeration.
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Description
Beskrivning av datainsamlingsregeln.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DestinationAzureMonitorMetricName
Ett eget namn för målet. Det här namnet ska vara unikt för alla mål (oavsett typ) i datainsamlingsregeln.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DestinationEventHub
Lista över Event Hubs-mål. Information om hur du skapar finns i AVSNITTET ANTECKNINGAR för DESTINATIONEVENTHUB-egenskaper och skapa en hash-tabell.
Type: | IEventHubDestination[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DestinationEventHubsDirect
Lista över Event Hubs Direct-mål. Information om hur du skapar finns i AVSNITTET ANTECKNINGAR för EGENSKAPER FÖR DESTINATIONEVENTHUBSDIRECT och skapa en hash-tabell.
Type: | IEventHubDirectDestination[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DestinationLogAnalytic
Lista över Log Analytics-mål. Mer information finns i AVSNITTET ANTECKNINGAR för DESTINATIONLOGANALYTIC-egenskaper och skapa en hash-tabell.
Type: | ILogAnalyticsDestination[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DestinationMonitoringAccount
Lista över mål för övervakningskonton. Information om hur du skapar finns i AVSNITTET ANTECKNINGAR för EGENSKAPERNA DESTINATIONMONITORINGACCOUNT och skapa en hash-tabell.
Type: | IMonitoringAccountDestination[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DestinationStorageAccount
Lista över mål för lagringskonton. Information om hur du skapar finns i AVSNITTET ANTECKNINGAR för EGENSKAPER FÖR DESTINATIONSTORAGEACCOUNT och skapa en hash-tabell.
Type: | IStorageBlobDestination[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DestinationStorageBlobsDirect
Lista över Mål för Lagringsblobdirigering. Ska endast användas för att skicka data direkt för lagring från agenten. Information om hur du skapar finns i AVSNITTET ANTECKNINGAR för EGENSKAPER FÖR DESTINATIONSTORAGEBLOBSDIRECT och skapa en hash-tabell.
Type: | IStorageBlobDestination[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DestinationStorageTablesDirect
Lista över mål för Lagringstabelldirigering. Information om hur du skapar finns i AVSNITTET ANTECKNINGAR för EGENSKAPER FÖR DESTINATIONSTORAGETABLESDIRECT och skapa en hash-tabell.
Type: | IStorageTableDestination[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IdentityType
Typ av hanterad tjänstidentitet (där både SystemAssigned- och UserAssigned-typer tillåts).
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Identitetsparameter För att skapa, se AVSNITTET ANTECKNINGAR för INPUTOBJECT-egenskaper och skapa en hash-tabell.
Type: | IDataCollectionRuleIdentity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Kind
Typen av resurs.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Location
Den geo-plats där resursen finns.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Namnet på datainsamlingsregeln. Namnet är skiftlägesokänsligt.
Type: | String |
Aliases: | DataCollectionRuleName, RuleName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Namnet på resursgruppen. Namnet är skiftlägesokänsligt.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StreamDeclaration
Deklaration av anpassade strömmar som används i den här regeln.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
ID för målprenumerationen.
Type: | String |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Tag
Resurstaggar.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UserAssignedIdentity
Uppsättningen användartilldelade identiteter som är associerade med resursen. Ordlistenycklarna userAssignedIdentities är ARM-resurs-ID:er i formuläret: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. Ordlistevärdena kan vara tomma objekt ({}) i begäranden.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Visar vad som skulle hända om cmdleten kördes. Cmdleten körs inte.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Indata
Utdata
Azure PowerShell
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för