---
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 <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> 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][].

## <i class="fal fa-network-wired" aria-hidden="true"></i> 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 <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [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).*

### <i class="fal fa-puzzle-piece" aria-hidden="true"></i> 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 <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> needs|Keep it enabled|
|`metrics` → `AllMetrics`|Azure metrics|Keep it disabled; <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> doesn't use it, and it only adds Azure costs|

## <i class="fal fa-file-code" aria-hidden="true"></i> 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": {}
            }
        }
    ]
}

```

## <i class="fal fa-list-check" aria-hidden="true"></i> 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 <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> 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][].

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* <i class="fal fa-clipboard-check" aria-hidden="true"></i> [Prerequisites][] - Review Azure access, diagnostic settings, and Event Hub requirements.  
* <i class="fal fa-edit" aria-hidden="true"></i> [Configuration][] - Configure the agent after deploying the template.  
* <i class="fal fa-code-branch" aria-hidden="true"></i> [Configure Event Hubs][Configuration - Event Hubs] - Match the agent's Event Hub entry to `eventHubName`.  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-book" aria-hidden="true"></i> [About Logic Apps Logging options][]  
* <i class="fal fa-hard-drive" aria-hidden="true"></i> [Logging Logic Apps][]  
* <i class="fal fa-desktop" aria-hidden="true"></i> [Monitoring Logic Apps][]  
* <i class="fal fa-bolt" aria-hidden="true"></i> [Managing Logic Apps][]  
* <i class="fal fa-coins" aria-hidden="true"></i> [Reduce Azure Logic Apps Run History Retention to Lower TCO][]  
* <i class="fal fa-screwdriver-wrench" aria-hidden="true"></i> [Troubleshooting][]  

[About Logic Apps Logging options]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/troubleshooting/about-logic-apps-logging-options/
[Configuration]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/getting-started/configuration/
[Configuration - Event Hubs]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/getting-started/configuration-event-hubs/
[Configuration - Logging]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/getting-started/configuration-logging/
[Custom Logging]:https://docs.nodinite.com/logging-and-monitoring/custom-logging/overview/
[Log Databases]:https://docs.nodinite.com/core-services/log-databases/overview/
[Log Event]:https://docs.nodinite.com/core-services/log-event/overview/
[Log Views]:https://docs.nodinite.com/administration/log-management/log-views/features/what-is-a-log-view/
[Logging Logic Apps]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/features/logging-logic-apps/
[LogicAppsAgent]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/overview/
[Managing Logic Apps]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/features/managing-logic-apps/
[Managing Logic Apps - Log Configuration]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/features/managing-logic-apps/#fa-circle-info-log-configuration-details
[Managing Logic Apps - Manage Diagnostics Settings]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/features/managing-logic-apps/#fa-share-square-manage-diagnostics-settings
[Monitor Views]:https://docs.nodinite.com/administration/monitor-management/monitor-views/features/what-is-a-monitor-view/
[Monitoring Logic Apps]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/features/monitoring-logic-apps/
[Prerequisites]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/getting-started/prerequisites/
[Prerequisites - Logic Apps]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/getting-started/prerequisites/enable-logic-apps-logging-in-azure/
[Reduce Azure Logic Apps Run History Retention to Lower TCO]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/troubleshooting/reduce-azure-logic-apps-run-history-retention-to-lower-tco/
[Remote Actions]:https://docs.nodinite.com/getting-started/monitor/remote-actions/
[Resources]:https://docs.nodinite.com/administration/monitor-management/resources/features/what-is-a-resource/
[Troubleshooting]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/troubleshooting/overview/
[Users]:https://docs.nodinite.com/administration/access-management/users/features/what-is-a-user/