Pavel Pikat
Pavel Pikat

Reputation: 91

Azure availability test fired when disabled

Did anyone else experience an issue with disabling Azure availability test before running CI/maintenance when the test continues sending requests and raising alerts, even though it was disabled?

We're disabling our tests with PowerShell:

$WebTests = Get-AzResource -ResourceType "Microsoft.Insights/Webtests" -ResourceGroupName $ResourceGroupName -ErrorAction Ignore
$WebTests | Where-Object { $_ } | ForEach-Object {
    $WebTest = Get-AzResource -ResourceId $_.ResourceId
    $WebTest.Properties.Enabled = $Enable -eq "true"
    $WebTest | Set-AzResource -Force | Out-Null
}

But from time to time we receive alerts 2-4 minutes after the test has been disabled.

Upvotes: 2

Views: 215

Answers (1)

Ivan Glasenberg
Ivan Glasenberg

Reputation: 29950

There're some possible reasons:

1.Please check if the availability test are really disabled via azure portal. In your script, especially check this line of code: $WebTest.Properties.Enabled = $Enable -eq "true" .

2.If it only sends a few alerts after disabled, please go to the alert rule, to check the period and frequency. See screenshot below:

enter image description here

Upvotes: 0

Related Questions