Skip to content

Commit

Permalink
Merge pull request #107 from Skwie/Appgw-bugfix-5
Browse files Browse the repository at this point in the history
CHange api version
  • Loading branch information
Skwie authored Oct 22, 2024
2 parents db731b2 + 6d5d62f commit 9597a21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WAFAzCli.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3752,7 +3752,7 @@ foreach ($sub in $AllSubscriptions) {

# Configure alerts to notify you if capacity metrics exceed thresholds
$gwResourceGroup = $appGateway.id.Split("/")[4]
$uri = "https://management.azure.com/subscriptions/$($sub.id)/resourceGroups/$gwResourceGroup/providers/microsoft.insights/metricAlerts?api-version=2024-08-01"
$uri = "https://management.azure.com/subscriptions/$($sub.id)/resourceGroups/$gwResourceGroup/providers/microsoft.insights/metricAlerts?api-version=2018-03-01"
$alerts = ((Invoke-WebRequest -Uri $uri -Headers $headers -Method Get).Content | ConvertFrom-Json -Depth 10).value
if ($alerts.properties.criteria.allOf.metricName -match "CPU|Memory|Storage") {
$tempAppGatewayResults += "Good: Alerts are configured to notify you if capacity metrics exceed thresholds for Application Gateway $($appGateway.name)"
Expand Down

0 comments on commit 9597a21

Please sign in to comment.