Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';我看不到我在Azure Portal上创建的警报_Azure_Azure Application Insights_Azureportal - Fatal编程技术网

Can';我看不到我在Azure Portal上创建的警报

Can';我看不到我在Azure Portal上创建的警报,azure,azure-application-insights,azureportal,Azure,Azure Application Insights,Azureportal,我正在Azure门户上的Application Insights中创建警报,但由于某些原因,我无法看到它们。我知道警报正在工作,因为我收到了预期的电子邮件 使用管理API,我可以看到警报: GET https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{schedu

我正在Azure门户上的Application Insights中创建警报,但由于某些原因,我无法看到它们。我知道警报正在工作,因为我收到了预期的电子邮件

使用管理API,我可以看到警报:

GET https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{scheduleQueryName}?api-version=2018-04-16
什么会阻止他们出现在门户上?这是我的手臂模板

{
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "appInsightsName": {
      "type": "string"
    },
    "alertEmail": {
      "type": "string"
    },
    "utilityActionGroup": {
      "type": "string"
    },
    "scheduleQueryName": {
      "type": "string"
    },
    "monitoringUtilityAlertEnabled": {
      "type": "string"
    }
  },
  "variables": {},
  "resources": [
    {
      "apiVersion": "2014-04-01",
      "name": "[parameters('appInsightsName')]",
      "type": "Microsoft.Insights/components",
      "location": "[resourceGroup().location]",
      "properties": {
        "applicationId": "[parameters('appInsightsName')]"
      }
    },
    {
      "type": "Microsoft.Insights/actionGroups",
      "name": "[parameters('utilityActionGroup')]",
      "apiVersion": "2018-03-01",
      "location": "Global",
      "properties": {
        "groupShortName": "Utility",
        "enabled": true,
        "emailReceivers": [
          {
            "name": "AlertEmail",
            "emailAddress": "[parameters('alertEmail')]"
          }
        ]
      },
      "dependsOn": []
    },
    {      
      "type": "Microsoft.Insights/scheduledQueryRules",
      "name": "[parameters('scheduleQueryName')]",
      "apiVersion": "2018-04-16",
      "location": "[resourceGroup().location]",
      "tags": {
        "[concat('hidden-link: ', resourceId('Microsoft.Insights/components', parameters('appInsightsName')))]": "Resource"
      },
      "scale": null,
      "properties": {
        "description": "Sends an alert when the utility stops sending a trace to app insights",
        "enabled": "[parameters('monitoringUtilityAlertEnabled')]",
        "source": {
          "query": "traces\n| where message == \"Utility Service is alive\"  | where timestamp >= ago(30m) ",
          "authorizedResources": [],
          "dataSourceId": "[resourceId('microsoft.insights/components', parameters('appInsightsName'))]",
          "queryType": "ResultCount"
        },
        "schedule": {
          "frequencyInMinutes": 5,
          "timeWindowInMinutes": 5
        },
        "action": {
          "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction",
          "severity": "2",
          "aznsAction": {
            "actionGroup": [ "[resourceId('microsoft.insights/actionGroups', parameters('utilityActionGroup'))]" ],
            "emailSubject": "Monitoring Utility Stopped working"
          },
          "trigger": {
            "thresholdOperator": "Equal",
            "threshold": 0
          }
        }
      },
      "dependsOn": [
        "[resourceId('microsoft.insights/components', parameters('appInsightsName'))]",
        "[resourceId('microsoft.insights/actionGroups', parameters('utilityActionGroup'))]"
      ]
    }
  ],
  "outputs": {  }
}

根据我的测试,我通过azure门户在application insights内部创建了警报,它可以出现在门户中

在门户中检查警报时,请确保选择正确的资源作为创建警报的资源。

首先,你说你正在“在Azure门户上创建警报”,然后你说你有一个ARM模板。当问题发生时,您能否澄清您以何种方式创建它们?我只有在使用ARM模板时才会遇到此问题。