Last active
February 26, 2020 15:41
-
-
Save staslebedenko/61efa5f1f83f19de060dc58bed9bc8f7 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="AzureDurableDemo14397" | |
subscriptionId="03766965-6d6" | |
actionGroupId="/subscriptions/03766965-6d6/resourceGroups/default-activitylogalerts/providers/microsoft.insights/actionGroups/Admins" | |
scope='/subscriptions/03766965-6d6/resourceGroups/AzureDurableDemo14397/providers/Microsoft.Web/sites/azuredurabledemo14397' | |
desc='Spike detection 10 GBsec or 5000 requests over period of 6 hours' | |
name="ConsumptionCostAlert" | |
funcExecUnits="total FunctionExecutionUnits > 10000000" | |
funcExecCount="total FunctionExecutionCount > 5000" | |
az monitor metrics alert create -n $name -g $resourceGroup --scopes $scope --description "Spike detection 10 GBsec or 5000 requests" \ | |
--condition $funcExecUnits --condition $funcExecCount --window-size 6h --evaluation-frequency 15m --severity 3 \ | |
--action $actionGroupId |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment