From 4306f23e5d6ce7238f0a588070e7bea4841334e9 Mon Sep 17 00:00:00 2001 From: Joseph Barnes Date: Fri, 27 Oct 2023 17:17:58 -0500 Subject: [PATCH] fixed issue with ARM and BICEP templates --- docs/layouts/partials/templates/arm/log.html | 10 +- .../partials/templates/arm/metric-static.html | 2 +- .../layouts/partials/templates/bicep/log.html | 2 +- .../templates/bicep/metric-dynamic.html | 2 +- .../templates/bicep/metric-static.html | 2 +- .../Automation/automationAccounts/alerts.yaml | 2 +- services/Compute/virtualMachines/alerts.yaml | 160 +++++++++--------- .../Network/applicationGateways/alerts.yaml | 10 +- 8 files changed, 95 insertions(+), 95 deletions(-) diff --git a/docs/layouts/partials/templates/arm/log.html b/docs/layouts/partials/templates/arm/log.html index 1110e4653..24e509028 100644 --- a/docs/layouts/partials/templates/arm/log.html +++ b/docs/layouts/partials/templates/arm/log.html @@ -98,14 +98,14 @@ }, "metricMeasureColumn": { "type": "string", - "defaultValue": "{{ .properties.metricMeasureColumn }}" + "defaultValue": "{{ .properties.metricMeasureColumn }}", "metadata": { "description": "Name of the measure column used in the alert evaluation." } }, "resourceIdColumn": { "type": "string", - "defaultValue": "{{ .properties.resouceIdColumn }}" + "defaultValue": "{{ .properties.resouceIdColumn }}", "metadata": { "description": "Name of the resource ID column used in the alert targeting the alerts." } @@ -214,11 +214,11 @@ "query": "[parameters('query')]", "metricMeasureColumn": "[parameters('metricMeasureColumn')]", "resourceIdColumn": "[parameters('resourceIdColumn')]", - "dimensions": [{{ range $idx1, $value1 := .properties.dimensions }}{{ if ne $idx1 0}},{{ end }} + "dimensions": [{{ range $idx1, $value1 := .properties.dimensions }}{{ if ne $idx1 0 }},{{ end }} { - "name": "{{ $idx1 }}", + "name": "{{ $value1.name }}", "operator": "{{ $value1.operator }}", - "values": [{{ range $idx2, $value2 := $value1.values }}{{ if ne $idx2 0}},{{ end }}"{{ $value2 }}"{{ end }}] + "values": [{{ range $idx2, $value2 := $value1.values }}{{ if ne $idx2 0 }},{{ end }}"{{ $value2 }}"{{ end }}] }{{ end }} ], "operator": "[parameters('operator')]", diff --git a/docs/layouts/partials/templates/arm/metric-static.html b/docs/layouts/partials/templates/arm/metric-static.html index e0c9d76e6..155f50839 100644 --- a/docs/layouts/partials/templates/arm/metric-static.html +++ b/docs/layouts/partials/templates/arm/metric-static.html @@ -14,7 +14,7 @@ "defaultValue": "{{ .description }}", "metadata": { "description": "Description of alert" - }, + } }, "targetResourceId": { "type": "array", diff --git a/docs/layouts/partials/templates/bicep/log.html b/docs/layouts/partials/templates/bicep/log.html index eaded5818..bdaa21f15 100644 --- a/docs/layouts/partials/templates/bicep/log.html +++ b/docs/layouts/partials/templates/bicep/log.html @@ -136,7 +136,7 @@ } else { dimensions: [{{ range $idx1, $value1 := .properties.dimensions }} { - name: '{{ $idx1 }}' + name: '{{ $value1.name }}' operator: '{{ $value1.operator }}' values: [{{ range $idx2, $value2 := $value1.values }}'{{ $value2 }}'{{ end }}] }{{ end }} diff --git a/docs/layouts/partials/templates/bicep/metric-dynamic.html b/docs/layouts/partials/templates/bicep/metric-dynamic.html index 832d427a5..d06cb8dc4 100644 --- a/docs/layouts/partials/templates/bicep/metric-dynamic.html +++ b/docs/layouts/partials/templates/bicep/metric-dynamic.html @@ -109,7 +109,7 @@ } else { dimensions: [{{ range $idx1, $value1 := .properties.dimensions }} { - name: '{{ $idx1 }}' + name: '{{ $value1.name }}' operator: '{{ $value1.operator }}' values: [{{ range $idx2, $value2 := $value1.values }}'{{ $value2 }}'{{ end }}] }{{ end }} diff --git a/docs/layouts/partials/templates/bicep/metric-static.html b/docs/layouts/partials/templates/bicep/metric-static.html index 821c6dc11..bde0ce300 100644 --- a/docs/layouts/partials/templates/bicep/metric-static.html +++ b/docs/layouts/partials/templates/bicep/metric-static.html @@ -104,7 +104,7 @@ } else { dimensions: [{{ range $idx1, $value1 := .properties.dimensions }} { - name: '{{ $idx1 }}' + name: '{{ $value1.name }}' operator: '{{ $value1.operator }}' values: [{{ range $idx2, $value2 := $value1.values }}'{{ $value2 }}'{{ end }}] }{{ end }} diff --git a/services/Automation/automationAccounts/alerts.yaml b/services/Automation/automationAccounts/alerts.yaml index 142714c8d..172a73382 100644 --- a/services/Automation/automationAccounts/alerts.yaml +++ b/services/Automation/automationAccounts/alerts.yaml @@ -16,7 +16,7 @@ threshold: 0 criterionType: StaticThresholdCriterion dimensions: - - Status: + - name: Status operator: Exclude values: - Completed diff --git a/services/Compute/virtualMachines/alerts.yaml b/services/Compute/virtualMachines/alerts.yaml index 615a81e12..3ff78f80f 100644 --- a/services/Compute/virtualMachines/alerts.yaml +++ b/services/Compute/virtualMachines/alerts.yaml @@ -46,14 +46,14 @@ metricMeasureColumn: AggregatedValue resouceIdColumn: _ResourceId dimensions: - Computer: - operator: Include - values: - - '*' - Disk: - operator: Include - values: - - '*' + - name: Computer + operator: Include + values: + - '*' + - name: Disk + operator: Include + values: + - '*' failingPeriods: numberOfEvaluationPeriods: 1 minFailingPeriodsToAlert: 1 @@ -103,14 +103,14 @@ metricMeasureColumn: AggregatedValue resouceIdColumn: _ResourceId dimensions: - Computer: - operator: Include - values: - - '*' - Disk: - operator: Include - values: - - '*' + - name: Computer + operator: Include + values: + - '*' + - name: Disk + operator: Include + values: + - '*' failingPeriods: numberOfEvaluationPeriods: 1 minFailingPeriodsToAlert: 1 @@ -160,14 +160,14 @@ metricMeasureColumn: AggregatedValue resouceIdColumn: _ResourceId dimensions: - Computer: - operator: Include - values: - - '*' - Disk: - operator: Include - values: - - '*' + - name: Computer + operator: Include + values: + - '*' + - name: Disk + operator: Include + values: + - '*' failingPeriods: numberOfEvaluationPeriods: 1 minFailingPeriodsToAlert: 1 @@ -213,14 +213,14 @@ metricMeasureColumn: AggregatedValue resouceIdColumn: _ResourceId dimensions: - Computer: - operator: Include - values: - - '*' - Disk: - operator: Include - values: - - '*' + - name: Computer + operator: Include + values: + - '*' + - name: Disk + operator: Include + values: + - '*' failingPeriods: numberOfEvaluationPeriods: 1 minFailingPeriodsToAlert: 1 @@ -274,14 +274,14 @@ metricMeasureColumn: AggregatedValue resouceIdColumn: _ResourceId dimensions: - Computer: - operator: Include - values: - - '*' - NetworkInterface: - operator: Include - values: - - '*' + - name: Computer + operator: Include + values: + - '*' + - name: Disk + operator: Include + values: + - '*' failingPeriods: numberOfEvaluationPeriods: 1 minFailingPeriodsToAlert: 1 @@ -329,14 +329,14 @@ metricMeasureColumn: AggregatedValue resouceIdColumn: _ResourceId dimensions: - Computer: - operator: Include - values: - - '*' - NetworkInterface: - operator: Include - values: - - '*' + - name: Computer + operator: Include + values: + - '*' + - name: Disk + operator: Include + values: + - '*' failingPeriods: numberOfEvaluationPeriods: 1 minFailingPeriodsToAlert: 1 @@ -384,14 +384,14 @@ metricMeasureColumn: AggregatedValue resouceIdColumn: _ResourceId dimensions: - Computer: - operator: Include - values: - - '*' - Disk: - operator: Include - values: - - '*' + - name: Computer + operator: Include + values: + - '*' + - name: Disk + operator: Include + values: + - '*' failingPeriods: numberOfEvaluationPeriods: 1 minFailingPeriodsToAlert: 1 @@ -439,14 +439,14 @@ metricMeasureColumn: AggregatedValue resouceIdColumn: _ResourceId dimensions: - Computer: - operator: Include - values: - - '*' - Disk: - operator: Include - values: - - '*' + - name: Computer + operator: Include + values: + - '*' + - name: Disk + operator: Include + values: + - '*' failingPeriods: numberOfEvaluationPeriods: 1 minFailingPeriodsToAlert: 1 @@ -494,14 +494,14 @@ metricMeasureColumn: AggregatedValue resouceIdColumn: _ResourceId dimensions: - Computer: - operator: Include - values: - - '*' - Disk: - operator: Include - values: - - '*' + - name: Computer + operator: Include + values: + - '*' + - name: Disk + operator: Include + values: + - '*' failingPeriods: numberOfEvaluationPeriods: 1 minFailingPeriodsToAlert: 1 @@ -547,10 +547,10 @@ metricMeasureColumn: AggregatedValue resouceIdColumn: _ResourceId dimensions: - Computer: - operator: Include - values: - - '*' + - name: Computer + operator: Include + values: + - '*' failingPeriods: numberOfEvaluationPeriods: 1 minFailingPeriodsToAlert: 1 @@ -596,10 +596,10 @@ metricMeasureColumn: AggregatedValue resouceIdColumn: _ResourceId dimensions: - Computer: - operator: Include - values: - - '*' + - name: Computer + operator: Include + values: + - '*' failingPeriods: numberOfEvaluationPeriods: 1 minFailingPeriodsToAlert: 1 diff --git a/services/Network/applicationGateways/alerts.yaml b/services/Network/applicationGateways/alerts.yaml index 8ec0aed8e..fe226ef75 100644 --- a/services/Network/applicationGateways/alerts.yaml +++ b/services/Network/applicationGateways/alerts.yaml @@ -193,11 +193,11 @@ criterionType: DynamicThresholdCriterion alertSensitivity: Medium dimensions: - HttpStatusGroup: - operator: Include - values: - - 4xx - - 5xx + - name: HttpStatusGroup + operator: Include + values: + - 4xx + - 5xx failingPeriods: numberOfEvaluationPeriods: 2 minFailingPeriodsToAlert: 2