通过标准逻辑应用程序上的 ARM 模板启用诊断设置

问题描述 投票:0回答:1

在诊断设置中可以启用三个类别来记录到日志分析工作区,它们是:工作流运行时日志、函数应用程序日志和应用程序服务身份验证日志;以及所有指标。

我目前已部署以下内容,但无法启用功能应用程序日志和应用程序服务身份验证日志。这些的类别名称是什么?

{
        "type": "Microsoft.Web/sites/providers/diagnosticSettings",
        "name": "[concat(variables('standardLogicApp_name'), '/Microsoft.Insights/', 'diagnosticSettings')]",
        "apiVersion": "2017-05-01-preview",
        "location": "[variables('primaryLocationFull')]",
        "dependsOn": [
            "[resourceId('Microsoft.Web/sites', variables('standardLogicApp_name'))]"
        ],
        "properties": {
          "name": "default",
          "logs": [
            {
              "category": "WorkflowRuntime",
              "enabled": true
            }
          ],
          "metrics": [
            {
              "category": "AllMetrics",
              "enabled": true
            }
          ],
          "workspaceId": "[resourceId('Microsoft.OperationalInsights/workspaces', variables('logAnalyticsWorkspace_name'))]"
        }
      },

我尝试使用以下内容,但我发现它们不受支持。

{
        "category": "AppServiceConsoleLogs",
        "enabled": true
      },
      {
        "category": "AppServiceAppLogs",
        "enabled": true
      },
      {
        "category": "AppServiceAuthLogs",
        "enabled": true
      }
azure azure-devops azure-logic-apps azure-rm-template azure-logic-app-standard
1个回答
0
投票

已通过使用以下类别名称解决此问题:

"properties": {
      "name": "logic-app-diagnostic-settings",
      "logs": [
        {
          "category": "WorkflowRuntime",
          "enabled": true
        },
        {
          "category": "FunctionAppLogs",
          "enabled": true
        },
        {
          "category": "AppServiceAuthenticationLogs",
          "enabled": true
        }
      ],
© www.soinside.com 2019 - 2024. All rights reserved.