部署microsoft.insights / metricAlerts时出现“找不到度量标准名称”

时间:2019-07-12 00:39:20

标签: azure-resource-manager arm-template

我正在尝试使用我的流量管理器配置文件部署MetricAlert,并且我总是得到{   “代码”:“ BadRequest”,   “消息”:“找不到度量标准名称。” }

我正在尝试使用“按端点分类的端点状态”度量标准,并且没有运气。知道正确的度量名称是什么或如何找到它?

enter image description here

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {},
    "variables": {},
    "resources": [
        {
            "type": "microsoft.insights/metricAlerts",
            "apiVersion": "2018-03-01",
            "name": "All-PPE-Endpoints-Down",
            "location": "global",
            "tags": {
                "displayName": "Alert-AllEndpointsDown"
            },
            "properties": {
                "actions": [
                    {
                        "actionGroupId": "[resourceId('microsoft.insights/actionGroups', 'TDFFCEmailActionGroup')]"
                    }
                ],
                "criteria": {
                    "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
                    "allOf": [
                        {
                            "criterionType": "DynamicThresholdCriterion",
                            "name": "1st criterion",
                            "metricName": "Endpoint Status by Endpoint(Platform)",
                            "dimensions": [],
                            "operator": "LessThan",
                            "alertSensitivity": "Medium",
                            "failingPeriods": {
                                "numberOfEvaluationPeriods": "4",
                                "minFailingPeriodsToAlert": "3"
                            },
                            "timeAggregation": "Maximum"
                        }
                    ]
                },
                "description": "All endpoints are not responding to ping",
                "enabled": true,
                "evaluationFrequency": "PT5M",
                "scopes": [
                    "/subscriptions/84eba200-00a9-41d3-9916-d63b2e25da02/resourceGroups/tdff5-rg-ppe/providers/Microsoft.Network/trafficManagerProfiles/tdfppegas"
                ],
                "severity": 3,
                "windowSize": "PT5M"
            }
        }
    ]
}

1 个答案:

答案 0 :(得分:0)

描述所有内置指标的指标文档网页可以在这里找到:https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported#microsoftnetworktrafficmanagerprofiles

在这种情况下,我正在寻找的密钥是 ProbeAgentCurrentEndpointStateByProfileResourceId