---
title: Deploy Azure Logic Apps with Diagnostics Logging via ARM Template – Nodinite Guide
description: Deploy Azure Logic Apps with ARM Template automation and enable diagnostics logging to Event Hub for Nodinite logging by configuring WorkflowRuntime diagnostic settings.
---

# How to deploy Logic Apps and enable diagnostics logging using an ARM Template

You enable :Nodinite: logging by adding diagnostic settings to your individual [Azure Logic Apps][LogicAppsAgent]. If you have hundreds of these, use infrastructure as code and automation instead of manual administration in the Azure portal or with the **Manage diagnostic settings** [Remote Action][Managing Logic Apps - Manage Diagnostics Settings].

This page gives you an ARM Template that deploys Azure Logic Apps and configures diagnostics logging, WorkflowRuntime events, and Event Hub integration in one step. Read [About Logic Apps Logging options][] first if you have not yet decided between Diagnostics Logging and [Custom Logging][].

## :fa-network-wired: Understanding the ARM Template Deployment

The template deploys the workflow together with a diagnostic setting as a child resource. Azure then streams the **WorkflowRuntime** events to the [Event Hub][Configuration - Event Hubs] that the :Nodinite: [Azure Logic Apps Logging and Monitoring Agent][LogicAppsAgent] reads.

<div class="mermaid">
graph LR
    ARM["fa:fa-file-code ARM Template"] -->|"deploys"| LA["fa:fa-sitemap Logic App workflow"]
    ARM -->|"deploys"| DS["fa:fa-gear Diagnostic setting<br/>WorkflowRuntime"]
    DS -->|"streams events"| EH["fa:fa-code-branch Event Hub"]
    EH --> AG["fa:fa-filter Nodinite Logic Apps agent"]
    AG --> LDB["fa:fa-database Log Databases"]
    style ARM fill:#2678BD
    style DS fill:#E47528
    style EH fill:#3F827B
    style AG fill:#E47528
    style LDB fill:#93d16d
</div>

*Diagram: The ARM Template (blue) deploys the workflow and its diagnostic setting (orange). Azure streams the events to the Event Hub (teal), and the agent writes the matching [Log Events][Log Event] to the [Log Databases][] (green).*

### :fa-puzzle-piece: Key Template Settings Explained

|Setting in the template|Purpose|What to change|
|---|---|---|
|`workflows_DiagnosticARMTest_name`|Name of the Logic App workflow|Follow your naming standard|
|`Microsoft.Insights/NodiniteLoggingTest`|Name of the diagnostic setting|Follow your naming standard|
|`eventHubAuthorizationRuleId`|SAS policy that grants Azure access to the Event Hub namespace|Your subscription, resource group, namespace, and policy|
|`eventHubName`|The Event Hub entity that receives the events|Must match the entity in the agent's [Event Hubs configuration][Configuration - Event Hubs]|
|`logs` → `WorkflowRuntime`|The only log category :Nodinite: needs|Keep it enabled|
|`metrics` → `AllMetrics`|Azure metrics|Keep it disabled; :Nodinite: doesn't use it, and it only adds Azure costs|

## :fa-file-code: The ARM Template

> Review the parameter `eventHubName` and change it according to your design and configuration. The **Event Hub Entity** has some recommendations that you must be aware of; review the [Prerequisites][Prerequisites - Logic Apps] user guide.

> Review the `ARMTest` naming example and adjust it to your naming standard.

```json
{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "workflows_DiagnosticARMTest_name": {
            "defaultValue": "DiagnosticARMTest",
            "type": "String"
        }
    },
    "variables": {},
    "resources": [
        {
            "type": "Microsoft.Logic/workflows",
            "apiVersion": "2017-07-01",
            "name": "[parameters('workflows_DiagnosticARMTest_name')]",
            "resources": [
                  {
                    "name": "Microsoft.Insights/NodiniteLoggingTest",
                    "type": "/providers/diagnosticSettings",
                    "apiVersion": "2017-05-01-preview",
                    "dependsOn": [
                          "[parameters('workflows_DiagnosticARMTest_name')]"
                        ],
                    "location": "westeurope",
                    "properties": {
                      "eventHubAuthorizationRuleId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.eventhub/namespaces/{eventHubNamespace}/authorizationrules/RootManageSharedAccessKey",
                      "eventHubName": "nodinitelogging",
                      "metrics": [
                        {
                          "category": "AllMetrics",
                          "enabled": false
                        }
                      ],
                      "logs": [
                        {
                          "category": "WorkflowRuntime",
                          "enabled": true
                        }
                      ]
                    }
                  }
                ],
            "location": "westeurope",
            "properties": {
                "state": "Enabled",
                "definition": {
                    "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
                    "contentVersion": "1.0.0.0",
                    "parameters": {},
                    "triggers": {
                        "manual": {
                            "type": "Request",
                            "kind": "Http",
                            "inputs": {
                                "schema": {}
                            }
                        }
                    },
                    "actions": {},
                    "outputs": {}
                },
                "parameters": {}
            }
        }
    ]
}

```

## :fa-list-check: After the Deployment

* Verify the diagnostic setting from the **Log Configuration** [Resource][Resources] with the [Log Configuration Details][Managing Logic Apps - Log Configuration] [Remote Action][Remote Actions].
* Choose which Actions and payloads become [Log Events][Log Event] with the [Logging filters][Configuration - Logging].
* Keep the Azure run history short when :Nodinite: keeps the long-term history; see [Reduce Azure Logic Apps Run History Retention to Lower TCO][].
* Give [Users][] access to the logged data through [Log Views][] and to the monitored workflows through [Monitor Views][].

## :fa-hand-point-right: Next Steps

* :fa-clipboard-check: [Prerequisites][] - Review Azure access, diagnostic settings, and Event Hub requirements.  
* :fa-edit: [Configuration][] - Configure the agent after deploying the template.  
* :fa-code-branch: [Configure Event Hubs][Configuration - Event Hubs] - Match the agent's Event Hub entry to `eventHubName`.  

## :fa-link-horizontal: Related Topics

* :fa-book: [About Logic Apps Logging options][]  
* :fa-hard-drive: [Logging Logic Apps][]  
* :fa-desktop: [Monitoring Logic Apps][]  
* :fa-bolt: [Managing Logic Apps][]  
* :fa-coins: [Reduce Azure Logic Apps Run History Retention to Lower TCO][]  
* :fa-screwdriver-wrench: [Troubleshooting][]  

[About Logic Apps Logging options]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Troubleshooting/About%20Logic%20Apps%20Logging%20options.md
[Configuration]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Getting%20started/3.%20Configuration.md
[Configuration - Event Hubs]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Getting%20started/3B.%20Configuration%20-%20Event%20Hubs.md
[Configuration - Logging]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Getting%20started/3C.%20Configuration%20-%20Logging.md
[Custom Logging]:{ndr}/Logging%20and%20Monitoring/Custom%20Logging/Overview.md
[Log Databases]:{ndr}/Core%20Services/Log%20Databases/Overview.md
[Log Event]:{ndr}/Core%20Services/Log%20Event/Overview.md
[Log Views]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/What%20is%20a%20Log%20View.md
[Logging Logic Apps]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Features/Logging%20Logic%20Apps.md
[LogicAppsAgent]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Overview.md
[Managing Logic Apps]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Features/Managing%20Logic%20Apps.md
[Managing Logic Apps - Log Configuration]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Features/Managing%20Logic%20Apps.md#fa-circle-info-log-configuration-details
[Managing Logic Apps - Manage Diagnostics Settings]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Features/Managing%20Logic%20Apps.md#fa-share-square-manage-diagnostics-settings
[Monitor Views]:{ndr}/Administration/2.%20Monitor%20Management/1.%20Monitor%20Views/Features/What%20is%20a%20Monitor%20View.md
[Monitoring Logic Apps]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Features/Monitoring%20Logic%20Apps.md
[Prerequisites]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Getting%20started/1.%20Prerequisites.md
[Prerequisites - Logic Apps]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Getting%20started/Prerequisites/Enable%20Logic%20Apps%20Logging%20in%20Azure.md
[Reduce Azure Logic Apps Run History Retention to Lower TCO]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Troubleshooting/Reduce%20Azure%20Logic%20Apps%20Run%20History%20Retention%20to%20Lower%20TCO.md
[Remote Actions]:{ndr}/Getting%20Started/3.%20Monitor/Remote%20Actions.md
[Resources]:{ndr}/Administration/2.%20Monitor%20Management/3.%20Resources/Features/What%20is%20a%20Resource.md
[Troubleshooting]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Troubleshooting/Overview.md
[Users]:{ndr}/Administration/3.%20Access%20Management/2.%20Users/Features/What%20is%20a%20User.md