Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit 43f278f

Browse files
committed
Merge branch 'user/noharper/autoscale-table-delete' of https://github.com/nharper285/onefuzz into user/noharper/autoscale-table-delete
2 parents 8c851f5 + e604215 commit 43f278f

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

src/ApiService/ApiService/onefuzzlib/AutoScale.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ private async Async.Task<OneFuzzResult<DiagnosticSettingsResource>> SetupAutoSca
260260
// The field is there in github though, so need to update this code once that code is released:
261261
// https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/Models/LogSettings.cs
262262
// But setting logs one by one works the same as "allLogs" being set...
263-
var logSettings1 = new LogSettings(true) { RetentionPolicy = new RetentionPolicy(true, 30), Category = "AutoscaleEvaluations" };
264-
var logSettings2 = new LogSettings(true) { RetentionPolicy = new RetentionPolicy(true, 30), Category = "AutoscaleScaleActions" };
263+
var logSettings1 = new LogSettings(true) { Category = "AutoscaleEvaluations" };
264+
var logSettings2 = new LogSettings(true) { Category = "AutoscaleScaleActions" };
265265

266266
var parameters = new DiagnosticSettingsData {
267267
WorkspaceId = logAnalyticsWorkspaceId

src/deployment/azuredeploy.bicep

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

src/deployment/bicep-templates/autoscale-settings.bicep

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ param location string
22
param server_farm_id string
33
param owner string
44
param workspaceId string
5-
param logRetention int
65
param autoscale_name string
76
param 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

0 commit comments

Comments
 (0)