Guest User

Untitled

a guest
Nov 15th, 2018
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. "resources": [
  2. {
  3. "comments": "Generalized from resource: '/subscriptions/XXX/resourceGroups/resourcegroup-dev-weu/providers/microsoft.insights/metricAlerts/response-time-avg'.",
  4. "type": "microsoft.insights/metricAlerts",
  5. "name": "[parameters('metricAlerts_response_time_avg_name')]",
  6. "apiVersion": "2018-03-01",
  7. "location": "global",
  8. "tags": {},
  9. "scale": null,
  10. "properties": {
  11. "description": "Alert if the response time get above 1 second on average for the last 1 minute, 1 minute intervals.",
  12. "severity": 3,
  13. "enabled": true,
  14. "scopes": [
  15. "/subscriptions/XXX/resourceGroups/resourcegroup-dev-weu/providers/Microsoft.Web/sites/webapp-dev-weu"
  16. ],
  17. "evaluationFrequency": "PT1M",
  18. "windowSize": "PT1M",
  19. "criteria": {
  20. "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"
  21. },
  22. "actions": [
  23. {
  24. "actionGroupId": "[parameters('metricAlerts_response_time_avg_actionGroupId')]",
  25. "webHookProperties": {}
  26. }
  27. ]
  28. },
  29. "dependsOn": []
  30. }
  31. ]
  32.  
  33. {
  34. "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  35. "contentVersion": "1.0.0.0",
  36. "parameters": {
  37. "alertName": {
  38. "value": "New Metric Alert"
  39. },
  40. "alertDescription": {
  41. "value": "New metric alert created via template"
  42. },
  43. "alertSeverity": {
  44. "value":3
  45. },
  46. "isEnabled": {
  47. "value": true
  48. },
  49. "resourceId": {
  50. "value": "/subscriptions/replace-with-subscription-id/resourceGroups/replace-with-resourceGroup-name/providers/Microsoft.Compute/virtualMachines/replace-with-resource-name"
  51. },
  52. "metricName": {
  53. "value": "Percentage CPU"
  54. },
  55. "operator": {
  56. "value": "GreaterThan"
  57. },
  58. "threshold": {
  59. "value": "80"
  60. },
  61. "timeAggregation": {
  62. "value": "Average"
  63. },
  64. "actionGroupId": {
  65. "value": "/subscriptions/replace-with-subscription-id/resourceGroups/resource-group-name/providers/Microsoft.Insights/actionGroups/replace-with-action-group"
  66. }
  67. }
  68. }
  69.  
  70. New-AzureRmResourceGroupDeployment : 17:07:53 - Resource microsoft.insights/metricAlerts 'response-time-avg' failed with message '{
  71. "Code": "BadRequest",
  72. "Message": "Unable to find any of the requested metrics ''"
  73. }'
Add Comment
Please, Sign In to add comment