Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "resources": [
- {
- "comments": "Generalized from resource: '/subscriptions/XXX/resourceGroups/resourcegroup-dev-weu/providers/microsoft.insights/metricAlerts/response-time-avg'.",
- "type": "microsoft.insights/metricAlerts",
- "name": "[parameters('metricAlerts_response_time_avg_name')]",
- "apiVersion": "2018-03-01",
- "location": "global",
- "tags": {},
- "scale": null,
- "properties": {
- "description": "Alert if the response time get above 1 second on average for the last 1 minute, 1 minute intervals.",
- "severity": 3,
- "enabled": true,
- "scopes": [
- "/subscriptions/XXX/resourceGroups/resourcegroup-dev-weu/providers/Microsoft.Web/sites/webapp-dev-weu"
- ],
- "evaluationFrequency": "PT1M",
- "windowSize": "PT1M",
- "criteria": {
- "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"
- },
- "actions": [
- {
- "actionGroupId": "[parameters('metricAlerts_response_time_avg_actionGroupId')]",
- "webHookProperties": {}
- }
- ]
- },
- "dependsOn": []
- }
- ]
- {
- "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "parameters": {
- "alertName": {
- "value": "New Metric Alert"
- },
- "alertDescription": {
- "value": "New metric alert created via template"
- },
- "alertSeverity": {
- "value":3
- },
- "isEnabled": {
- "value": true
- },
- "resourceId": {
- "value": "/subscriptions/replace-with-subscription-id/resourceGroups/replace-with-resourceGroup-name/providers/Microsoft.Compute/virtualMachines/replace-with-resource-name"
- },
- "metricName": {
- "value": "Percentage CPU"
- },
- "operator": {
- "value": "GreaterThan"
- },
- "threshold": {
- "value": "80"
- },
- "timeAggregation": {
- "value": "Average"
- },
- "actionGroupId": {
- "value": "/subscriptions/replace-with-subscription-id/resourceGroups/resource-group-name/providers/Microsoft.Insights/actionGroups/replace-with-action-group"
- }
- }
- }
- New-AzureRmResourceGroupDeployment : 17:07:53 - Resource microsoft.insights/metricAlerts 'response-time-avg' failed with message '{
- "Code": "BadRequest",
- "Message": "Unable to find any of the requested metrics ''"
- }'
Add Comment
Please, Sign In to add comment