Skip to content

Commit

Permalink
Merge pull request #59 from JoeyBarnes/main
Browse files Browse the repository at this point in the history
Fixed issues with ARM and bicep templates
  • Loading branch information
JoeyBarnes authored Oct 31, 2023
2 parents 0a34d7a + 4306f23 commit 3d48bcb
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 95 deletions.
10 changes: 5 additions & 5 deletions docs/layouts/partials/templates/arm/log.html
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
Expand Down Expand Up @@ -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')]",
Expand Down
2 changes: 1 addition & 1 deletion docs/layouts/partials/templates/arm/metric-static.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"defaultValue": "{{ .description }}",
"metadata": {
"description": "Description of alert"
},
}
},
"targetResourceId": {
"type": "array",
Expand Down
2 changes: 1 addition & 1 deletion docs/layouts/partials/templates/bicep/log.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion docs/layouts/partials/templates/bicep/metric-dynamic.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion docs/layouts/partials/templates/bicep/metric-static.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion services/Automation/automationAccounts/alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
threshold: 0
criterionType: StaticThresholdCriterion
dimensions:
- Status:
- name: Status
operator: Exclude
values:
- Completed
Expand Down
160 changes: 80 additions & 80 deletions services/Compute/virtualMachines/alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -547,10 +547,10 @@
metricMeasureColumn: AggregatedValue
resouceIdColumn: _ResourceId
dimensions:
Computer:
operator: Include
values:
- '*'
- name: Computer
operator: Include
values:
- '*'
failingPeriods:
numberOfEvaluationPeriods: 1
minFailingPeriodsToAlert: 1
Expand Down Expand Up @@ -596,10 +596,10 @@
metricMeasureColumn: AggregatedValue
resouceIdColumn: _ResourceId
dimensions:
Computer:
operator: Include
values:
- '*'
- name: Computer
operator: Include
values:
- '*'
failingPeriods:
numberOfEvaluationPeriods: 1
minFailingPeriodsToAlert: 1
Expand Down
10 changes: 5 additions & 5 deletions services/Network/applicationGateways/alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3d48bcb

Please sign in to comment.