Created
February 26, 2020 16:08
-
-
Save staslebedenko/8005af0fc4ca6b025403488eb0fe57d7 to your computer and use it in GitHub Desktop.
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
resourceGroup="azureadventcalendar29399" | |
subscriptionId="03766965-6d6" | |
actionGroupId="/subscriptions/03766965-6d6/resourceGroups/default-activitylogalerts/providers/microsoft.insights/actionGroups/Admins" | |
scope='/subscriptions/03766965-6d6/resourceGroups/AzureAdventCalendar29399/providers/Microsoft.Sql/servers/azureadventcalendar29399/databases/azureadventcalendar29399' | |
desc='Spike detection' | |
name="SQLServerlessCostAlert" | |
cpuBilled="total app_cpu_billed > 10000" | |
az monitor metrics alert create -n $name -g $resourceGroup --scopes $scope --description "Spike detection" \ | |
--condition $cpuBilled --window-size 1h --evaluation-frequency 5m --severity 3 \ | |
--action $actionGroupId |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment