azureazure-devopsazure-logic-appsazure-rm-templateazure-logic-app-standard

Enable Diagnostic settings through ARM template on Standard Logic App


There are three categories to enable in diagnostics settings to be logged to an log analytics workspace, these are: workflow runtime logs, function application logs and app service authentication logs; along with all metrics.

I've currently got the following deployed, but I've been unable to enable Function Application Logs and Application Service Authentication Logs. What are the category names for these?

{
        "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'))]"
        }
      },

I've tried to use the following but I was getting that they are not supported.

{
        "category": "AppServiceConsoleLogs",
        "enabled": true
      },
      {
        "category": "AppServiceAppLogs",
        "enabled": true
      },
      {
        "category": "AppServiceAuthLogs",
        "enabled": true
      }

Solution

  • This has been resolved by using the following category names:

    "properties": {
          "name": "logic-app-diagnostic-settings",
          "logs": [
            {
              "category": "WorkflowRuntime",
              "enabled": true
            },
            {
              "category": "FunctionAppLogs",
              "enabled": true
            },
            {
              "category": "AppServiceAuthenticationLogs",
              "enabled": true
            }
          ],