Skip to content

Commit 417acea

Browse files
authored
Merge pull request #3075 from xizhamsft/dev
Add CollectorType in WindowsPerformanceCounter DataSource properties (OperationalInsights)
2 parents 798a781 + f72c240 commit 417acea

File tree

5 files changed

+412
-172
lines changed

5 files changed

+412
-172
lines changed

src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/ScenarioTests/DataSourceTests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function Test-DataSourceCreateUpdateDelete
2828
New-AzureRmResourceGroup -Name $rgname -Location $wslocation -Force
2929

3030
# Create a workspace to house the data sources
31-
$workspace = New-AzureRmOperationalInsightsWorkspace -ResourceGroupName $rgname -Name $wsname -Location $wslocation -Force
31+
$workspace = New-AzureRmOperationalInsightsWorkspace -ResourceGroupName $rgname -Name $wsname -Location $wslocation -Sku premium -Force
3232

3333
# Create a data source
3434
$dataSource = New-AzureRmOperationalInsightsAzureActivityLogDataSource -Workspace $workspace -Name $dsName -SubscriptionId $subId1
@@ -114,7 +114,7 @@ function Test-CreateAllKindsOfDataSource
114114
New-AzureRmResourceGroup -Name $rgname -Location $wslocation -Force
115115

116116
# Create a workspace to house the data source
117-
$workspace = New-AzureRmOperationalInsightsWorkspace -ResourceGroupName $rgname -Name $wsname -Location $wslocation -Force
117+
$workspace = New-AzureRmOperationalInsightsWorkspace -ResourceGroupName $rgname -Name $wsname -Location $wslocation -Sku premium -Force
118118

119119
# AzureActivityLog data source
120120
$auditLogDataSource = New-AzureRmOperationalInsightsAzureActivityLogDataSource -Workspace $workspace -Name "myAuditLog" -SubscriptionId $subId1
@@ -123,7 +123,7 @@ function Test-CreateAllKindsOfDataSource
123123
$windowsEventDataSource = New-AzureRmOperationalInsightsWindowsEventDataSource -Workspace $workspace -Name Application -EventLogName "Application" -CollectErrors -CollectWarnings -CollectInformation
124124

125125
# windows performance data source
126-
$windowsPerfDataSource = New-AzureRmOperationalInsightsWindowsPerformanceCounterDataSource -Workspace $workspace -Name "processorPerf" -ObjectName Processor -InstanceName * -CounterName "% Processor Time" -IntervalSeconds 10
126+
$windowsPerfDataSource = New-AzureRmOperationalInsightsWindowsPerformanceCounterDataSource -Workspace $workspace -Name "processorPerf" -ObjectName Processor -InstanceName * -CounterName "% Processor Time" -IntervalSeconds 10 -UseLegacyCollector
127127

128128
# linux syslog data source
129129
$syslogDataSource = New-AzureRmOperationalInsightsLinuxSyslogDataSource -Workspace $workspace -Name "syslog-local1" -Facility "local1" -CollectEmergency -CollectAlert -CollectCritical -CollectError -CollectWarning -CollectNotice -CollectDebug -CollectInformational

0 commit comments

Comments
 (0)