This repository was archived by the owner on Nov 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +4
-10
lines changed
ApiService/ApiService/onefuzzlib Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -263,8 +263,8 @@ private async Async.Task<OneFuzzResult<DiagnosticSettingsResource>> SetupAutoSca
263263 // The field is there in github though, so need to update this code once that code is released:
264264 // https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/Models/LogSettings.cs
265265 // But setting logs one by one works the same as "allLogs" being set...
266- var logSettings1 = new LogSettings ( true ) { RetentionPolicy = new RetentionPolicy ( true , 30 ) , Category = "AutoscaleEvaluations" } ;
267- var logSettings2 = new LogSettings ( true ) { RetentionPolicy = new RetentionPolicy ( true , 30 ) , Category = "AutoscaleScaleActions" } ;
266+ var logSettings1 = new LogSettings ( true ) { Category = "AutoscaleEvaluations" } ;
267+ var logSettings2 = new LogSettings ( true ) { Category = "AutoscaleScaleActions" } ;
268268
269269 var parameters = new DiagnosticSettingsData {
270270 WorkspaceId = logAnalyticsWorkspaceId
Original file line number Diff line number Diff line change @@ -167,7 +167,6 @@ module autoscaleSettings 'bicep-templates/autoscale-settings.bicep' = {
167167 server_farm_id : serverFarm .outputs .id
168168 owner : owner
169169 workspaceId : operationalInsights .outputs .workspaceId
170- logRetention : log_retention
171170 autoscale_name : 'onefuzz-autoscale-${uniqueString (resourceGroup ().id )}'
172171 function_diagnostics_settings_name : 'functionDiagnosticSettings'
173172 }
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ param location string
22param server_farm_id string
33param owner string
44param workspaceId string
5- param logRetention int
65param autoscale_name string
76param function_diagnostics_settings_name string
87
@@ -27,7 +26,7 @@ resource autoscaleSettings 'Microsoft.Insights/autoscalesettings@2015-04-01' = {
2726 rules : [
2827 {
2928 metricTrigger : {
30- metricName : 'CpuPercentage'
29+ metricName : 'CpuPercentage'
3130 metricResourceUri : server_farm_id
3231 operator : 'GreaterThanOrEqual'
3332 statistic : 'Average'
@@ -50,7 +49,7 @@ resource autoscaleSettings 'Microsoft.Insights/autoscalesettings@2015-04-01' = {
5049 operator : 'LessThan'
5150 statistic : 'Average'
5251 threshold : 25
53- timeAggregation :'Average'
52+ timeAggregation :'Average'
5453 timeGrain : 'PT1M'
5554 timeWindow : 'PT10M'
5655 }
@@ -79,10 +78,6 @@ resource functionDiagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-
7978 {
8079 categoryGroup : 'allLogs'
8180 enabled : true
82- retentionPolicy : {
83- days : logRetention
84- enabled : true
85- }
8681 }
8782 ]
8883 workspaceId : workspaceId
You can’t perform that action at this time.
0 commit comments