"The metric names were not found" 部署 Microsoft 时。insights/metricAlerts

"The metric names were not found" when deploying microsoft.insights/metricAlerts

我正在尝试使用我的流量管理器配置文件部署 MetricAlert,但我总是收到 { "Code": "BadRequest", "Message": "The metric names were not found ." }

我正在尝试按端点指标使用端点状态,但没有成功。知道正确的指标名称是什么或如何找到它吗?

{
    "$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"
            }
        }
    ]
}

可在此处找到描述所有 built-in 指标的指标文档网页:https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported#microsoftnetworktrafficmanagerprofiles

在这种情况下,我正在寻找的关键是 ProbeAgentCurrentEndpointStateByProfileResourceId