【发布时间】:2018-03-28 01:49:21
【问题描述】:
我在 Application Insights 中创建了一组可用性测试,并希望添加 Alerts 以通知团队意外故障,但是我没能做到。警报在创建后不会更改其状态,看起来它们根本无法获取 Metric 数据。
当我打开可用性测试资源(来自 Application Insights 刀片或资源组)时 - 我看到一个巨大的图表,上面有很多绿/红点,显示过去 1/24/72 小时内执行的测试:
当我尝试创建 Metric Alert 时,我选择了相同的可用性测试资源和 Uptime 指标,但建议图表什么也不显示(注意严格的水平线和1970 年),而任何教程都显示了带有 nice graphs 的示例
任何创建的警报也不会对更改的资源可用性做出反应。
这是我的 ARM 模板的一部分:
{
"apiVersion": "2016-03-01",
"name": "[variables('alerts').vehiclesHealth]",
"type": "microsoft.insights/alertrules",
"location": "[resourceGroup().location]",
"tags": {
"[concat('hidden-link:', resourceId('Microsoft.Insights/components', variables('appInsights').name))]": "Resource",
"displayName": "app-insights-alert",
"env": "[parameters('environment')]"
},
"properties": {
"name": "[variables('alerts').vehiclesHealth]",
"condition": {
"odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition",
"dataSource": {
"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource",
"resourceUri": "[resourceId('microsoft.insights/webtests', variables('tests').vehiclesHealth)]",
"metricName": "locations/emea-nl-ams-azr/metrics/GSMT_AvRaw"
},
"operator": "LessThan",
"threshold": 50,
"windowSize": "PT1H"
},
"actions": "[variables('alerts').actions]"
},
"dependsOn": [
"[resourceId('microsoft.insights/webtests', variables('tests').vehiclesHealth)]"
]
},
我想我可能使用了错误的指标名称或资源引用,但我不知道如何检查它。是否有任何 Powershell 脚本或 REST API 来获取特定资源的所有可用指标?
我的主要问题是:我做错了什么以及如何让它发挥作用?
【问题讨论】:
-
团队正在调查这个...
标签: azure azure-application-insights