-1
我正在嘗試創建一個ARM模板來向我的彈性池數據庫添加警報度量。我在門戶中手動完成了這一步,並使用從門戶網站生成的ARM模板。ARM模板 - AlertRules - UnsupporedMetric
這裏是ARM的模板:
{
"type": "microsoft.insights/alertrules",
"name": "[parameters('alertrules_dtu_name')]",
"apiVersion": "2014-04-01",
"location": "westus",
"tags": {
"hidden-link:/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Sql/servers/xxx/elasticPools/ElasticPool1": "Resource"
},
"scale": null,
"properties": {
"name": "[parameters('alertrules_dtu_name')]",
"description": "",
"isEnabled": true,
"condition": {
"odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition",
"dataSource": {
"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource",
"resourceUri": "[concat(resourceId('Microsoft.Sql/servers', parameters('sqlServerName')), '/elasticPools/ElasticPool1')]",
"metricName": "[concat(parameters('alertrules_dtu_name'),'_consumption_percent')]"
},
"threshold": 90,
"windowSize": "PT10M"
},
"action": {
"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction",
"customEmails": [
"[email protected]"
]
}
}
}
以下是錯誤消息部署此,當我得到:
新AzureRmResourceGroupDeployment:下午4時36分15秒 - 資源microsoft.insights/alertrules的'DTUAlert'失敗,消息爲' '代碼:「UnsupportedMetric」, 「message」:「此資源不支持名稱空間爲''且名稱爲'DTUAlert_consumption_percent'的度量標準
任何想法我在做什麼錯在這裏?我已經嘗試手動創建模板,針對不同版本的API,等等...仍然得到相同的錯誤。
非常感謝!我的部分愚蠢的錯誤! – CtrlDot