我有一个包含以下两种监控类型的ARM模板:
Microsoft.Insights/alertrules如下所示:
{
"apiVersion": "2014-04-01",
"name": "[concat('CPUHigh ', parameters('hostingPlanName'))]",
"type": "Microsoft.Insights/alertrules",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]"
],
"tags": {
"[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "Resource",
"displayName": "CPUHighAlertRule"
},
"properties": {
"name": "[concat('CPUHigh ', parameters('hostingPlanName'))]",
"description": "[concat('The average CPU is high across all the instances of ', parameters('hostingPlanName'))]",
"isEnabled": true,
"condition": {
"odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition",
"dataSource": {
"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource",
"resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]",
"metricName": "CpuPercentage"
},
"operator": "GreaterThan",
"threshold": 90,
"windowSize": "PT15M"
},
"action": {
"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction",
"sendToServiceOwners": true,
"customEmails": []
}
}
}
microsoft.insights/metricAlerts如下所示
{
"type": "microsoft.insights/metricAlerts",
"apiVersion": "2018-03-01",
"name": "CreatedThisFromARM",
"location": "global",
"properties": {
"description": "Created this from ARM. Does it show up or not?",
"severity": 3,
"enabled": true,
"scopes": [
"/subscriptions/4ec6f523-de5f-4e8a-a6e7-45e4f53170df/resourceGroups/AzureResourceGroup4/providers/Microsoft.Web/serverFarms/plantestmonitor"
],
"evaluationFrequency": "PT1M",
"windowSize": "PT5M",
"criteria": {
"allOf": [
{
"criterionType": "StaticThresholdCriterion",
"name": "MemoryFromARM",
"metricName": "MemoryPercentage",
"dimensions": [],
"operator": "GreaterThan",
"threshold": 90,
"timeAggregation": "Average"
}
],
"odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"
},
"actions": []
}
}
当我进入监视器选项卡时,我可以看到microsoft.insights/metricAlerts,但看不到Microsoft.Insights/alertrules。我希望两者都能看到。如果我转到资源组的监视菜单下的Insights (预览)选项卡,我可以同时看到这两个选项卡。
我的观点是错误的,我应该在监视器-->警报下看到这两种类型。或?
也许我没有足够清楚地理解这两者之间的区别(我的google foo也不能带我去一些文档中为我描述它)。也许我误解了这两个概念?
发布于 2019-06-03 01:24:13
一段时间后,alertRule将出现在经典警报部分,当在监视器中输入“警报”时引用该部分。所以我可以从监视器上看到这两种情况。你只需要稍等片刻。
正如我看到的" alerts ( classic )将于8月31日停用。使用自愿迁移工具升级到更快、更简单、更具可扩展性的指标警报平台“,因此经典警报必须是Microsoft.Insights/alertrules。所以metricAlerts是Azure监控的未来。如果我错了,请纠正我。
https://stackoverflow.com/questions/56407503
复制相似问题