-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5432 from dfe-analytical-services/EES-5685-add-av…
…ailability-and-health-alerts-for-public-api Ees 5685 add availability and health alerts for public api
- Loading branch information
Showing
18 changed files
with
469 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
infrastructure/templates/public-api/components/alerts/appGateways/backendPoolHealth.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Severity } from '../types.bicep' | ||
|
||
@description('Names of the resources that these alerts are being applied to.') | ||
param resourceNames string[] | ||
|
||
@description('The alert severity.') | ||
param severity Severity = 'Critical' | ||
|
||
@description('Name of the Alerts Group used to send alert messages.') | ||
param alertsGroupName string | ||
|
||
@description('Tags with which to tag the resource in Azure.') | ||
param tagValues object | ||
|
||
module alerts '../staticMetricAlert.bicep' = [for name in resourceNames: { | ||
name: '${name}BackendHealthAlertModule' | ||
params: { | ||
alertName: '${name}-backend-pool-health' | ||
resourceIds: [resourceId('Microsoft.Network/applicationGateways', name)] | ||
resourceType: 'Microsoft.Network/applicationGateways' | ||
query: { | ||
metric: 'UnhealthyHostCount' | ||
aggregation: 'Total' | ||
operator: 'GreaterThan' | ||
threshold: 0 | ||
} | ||
evaluationFrequency: 'PT1M' | ||
windowSize: 'PT5M' | ||
severity: severity | ||
alertsGroupName: alertsGroupName | ||
tagValues: tagValues | ||
} | ||
}] |
33 changes: 33 additions & 0 deletions
33
infrastructure/templates/public-api/components/alerts/containerApps/restarts.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Severity } from '../types.bicep' | ||
|
||
@description('Names of the resources that these alerts are being applied to.') | ||
param resourceNames string[] | ||
|
||
@description('The alert severity.') | ||
param severity Severity = 'Warning' | ||
|
||
@description('Name of the Alerts Group used to send alert messages.') | ||
param alertsGroupName string | ||
|
||
@description('Tags with which to tag the resource in Azure.') | ||
param tagValues object | ||
|
||
module alerts '../staticMetricAlert.bicep' = [for name in resourceNames: { | ||
name: '${name}RestartsAlertModule' | ||
params: { | ||
alertName: '${name}-restarts' | ||
resourceIds: [resourceId('Microsoft.App/containerApps', name)] | ||
resourceType: 'Microsoft.App/containerApps' | ||
query: { | ||
metric: 'RestartCount' | ||
aggregation: 'Total' | ||
operator: 'GreaterThan' | ||
threshold: 0 | ||
} | ||
evaluationFrequency: 'PT1M' | ||
windowSize: 'PT5M' | ||
severity: severity | ||
alertsGroupName: alertsGroupName | ||
tagValues: tagValues | ||
} | ||
}] |
33 changes: 33 additions & 0 deletions
33
infrastructure/templates/public-api/components/alerts/fileServices/availabilityAlert.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Severity } from '../types.bicep' | ||
|
||
@description('Names of the resources that these alerts are being applied to.') | ||
param resourceNames string[] | ||
|
||
@description('The alert severity.') | ||
param severity Severity = 'Critical' | ||
|
||
@description('Name of the Alerts Group used to send alert messages.') | ||
param alertsGroupName string | ||
|
||
@description('Tags with which to tag the resource in Azure.') | ||
param tagValues object | ||
|
||
module alerts '../staticMetricAlert.bicep' = [for name in resourceNames: { | ||
name: '${name}FsAvailabilityAlertModule' | ||
params: { | ||
alertName: '${name}-fileservice-availability' | ||
resourceIds: [resourceId('Microsoft.Storage/storageAccounts/fileServices', name, 'default')] | ||
resourceType: 'Microsoft.Storage/storageAccounts/fileServices' | ||
query: { | ||
metric: 'availability' | ||
aggregation: 'Average' | ||
operator: 'LessThan' | ||
threshold: 100 | ||
} | ||
evaluationFrequency: 'PT1M' | ||
windowSize: 'PT5M' | ||
severity: severity | ||
alertsGroupName: alertsGroupName | ||
tagValues: tagValues | ||
} | ||
}] |
Oops, something went wrong.