---
title: Enable Logic Apps Logging in Azure for the Nodinite Logic Apps Agent
description: "Set up Azure for logging Logic Apps to Nodinite: a Diagnostic setting with WorkflowRuntime on each Logic App, a dedicated Event Hub in the same region, and one checkpoint Storage Container per Event Hub."
---

# <i class="fal fa-hard-drive" aria-hidden="true"></i> Enable Logic Apps Logging in Azure

Monitoring needs only the Azure REST API, but [Logging Logic Apps][] and failed-run monitoring need Azure to stream each run's events to 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][Azure Logic Apps Agent]. That stream is three pieces you set up in Azure: a **Diagnostic setting** on every Logic App, an **Event Hub** that carries the events, and a **Storage Container** where the agent keeps its read position. Get them right once, and every new Logic App only needs its Diagnostic setting. This page is part of the [Prerequisites][]; the roles the agent needs on these resources are in [Azure Access and Roles][Prerequisites - Azure access].

## <i class="fal fa-list-check" aria-hidden="true"></i> What to set up

To log to <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> from your Logic Apps, set up the following in the [Azure portal](https://portal.azure.com)<sup><i class="fal fa-arrow-up-right-from-square" aria-hidden="true"></i></sup>, or script it with the [ARM Template][] in your build and deployment process.

* <i class="fal fa-sliders" aria-hidden="true"></i> **Diagnostic setting** on each Logic App (see [Supported Logic App types][Prerequisites - Supported Logic App types] for where), with the `WorkflowRuntime` log category and an **Event Hub** as destination. Leave `AllMetrics` disabled.
* <i class="fal fa-code-branch" aria-hidden="true"></i> **Event Hub** that receives the diagnostics. The agent can read many Event Hubs at the same time.
* <i class="fal fa-boxes" aria-hidden="true"></i> **Storage Container** for the checkpoint, the agent's read position in the Event Hub stream. Event Hubs only support client-side checkpointing.

<aside aria-label="Important" class="nodinite-note nodinite-note--important">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
<div class="nodinite-note__content"><p>Use <strong>one unique Storage Container per Event Hub</strong>. Two Event Hubs sharing a container overwrite each other's checkpoint, and Logging stops working correctly.</p></div>
</aside>

## <i class="fal fa-code-branch" aria-hidden="true"></i> Event Hub Entity

The Event Hub is the destination of the Logic Apps Diagnostic settings. Match every Event Hub that a Diagnostic setting sends to with an entry in the agent's [Event Hubs tab][Configuration - Event Hubs].

* Use one or more **dedicated** Event Hubs for Logic Apps diagnostics.
  <aside aria-label="Important" class="nodinite-note nodinite-note--important">
  <p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
  <div class="nodinite-note__content"><p>If you also use diagnostic logging for other Azure resources, such as API Management, use different Event Hubs for each <strong>type</strong> of resource.</p></div>
  </aside>
* The Event Hub must be in the **same region** as the Logic Apps that send to it ([Microsoft: Diagnostic settings destinations](https://learn.microsoft.com/en-us/azure/azure-monitor/data-collection/diagnostic-settings#destinations)<sup><i class="fal fa-arrow-up-right-from-square" aria-hidden="true"></i></sup>).
* The Event Hub can be in a **different subscription** than your Logic Apps; map it in [Configure Event Hubs][Configuration - Event Hubs].
* Keep the number of Event Hubs small: many Diagnostic settings can share one Event Hub.
* Use at least 2 partitions.
  <aside aria-label="Important" class="nodinite-note nodinite-note--important">
  <p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
  <div class="nodinite-note__content"><p>For <strong>high volume</strong> solutions (more than 2,000,000 events per day), you might need to re-create the Event Hub with 4 or more partitions.</p></div>
  </aside>
* Set the retention to cover your longest expected agent outage; [Configure Event Hubs][Configuration - Event Hubs] covers tiers and cost.

![Azure Event Hub Entity][6]  
*Example of an Azure Event Hub entity used for Azure Logic Apps Logging.*  

![Event Hub Details][9]  
*Details about the Azure Event Hub entity.*  

![Event Hub Properties][7]  
*The Event Hub properties show that data arrives regularly.*  

### Additional comments about the Event Hub

Logic Apps diagnostics need their own Event Hubs:

<div class="mermaid">
graph LR
  subgraph "Integration solution"
    C["Azure Function<br/>with Serilog Logging"] --- C1("Serilog Event Hub Sink")
    A["Azure API Management Service API<br/>with Policy"] --- A1("Policy")
    B["Azure Logic App<br/>with the diagnostic setting"]
  end
  subgraph "Event Hub"
    A1 -->|"1. Nodinite JSON Log Event"| AA("EH1")
    C1 -->|"1. Nodinite JSON Log Event"| AA
    C1 -.- CC("EH2")
    B -->|"2. Azure Diagnostics log"| BB("EH3")
  end
</div>

*Diagram: (1) [Logging from Azure Functions][Serilog] and API Management can share an Event Hub when the content is a <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [JSON Log Event][], read by the [Pickup Log Events Service Logging Agent][]. (2) Logic Apps diagnostics use another format and need their own Event Hubs.*

<aside aria-label="Tip" class="nodinite-note nodinite-note--tip">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-lightbulb"></i> Tip</p>
<div class="nodinite-note__content"><p>Use <strong>separate</strong> Event Hubs per purpose. A shared Event Hub saves administration, but can cost performance and complicates pricing, scaling, retention, and partitions; see <a href="https://docs.nodinite.com/logging-and-monitoring/custom-logging/troubleshooting/azure-costs-for-blob-storage-and-event-hub/">Azure Costs for Blob Storage and Event Hub</a>.</p></div>
</aside>

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

* <i class="fal fa-square-plus" aria-hidden="true"></i> [Back to Prerequisites][Prerequisites]  
* <i class="fal fa-cloud" aria-hidden="true"></i> [Azure Access and Roles][Prerequisites - Azure access]  
* <i class="fal fa-shield-check" aria-hidden="true"></i> [Firewall Settings][Prerequisites - Firewall]  
* <i class="fal fa-code-branch" aria-hidden="true"></i> [Configure Event Hubs][Configuration - Event Hubs]  

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

* <i class="fal fa-file-code" aria-hidden="true"></i> [ARM Template][]  
* <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-coins" aria-hidden="true"></i> [Azure Costs for Blob Storage and Event Hub][]  
* <i class="fal fa-hard-drive" aria-hidden="true"></i> [Azure Logic Apps Logging and Monitoring Agent][Azure Logic Apps Agent]  

[6]:https://docs.nodinite.com/media/Documentation%20Pictures/MonitorAgent/LogicApps/EventHubs.png
[7]:https://docs.nodinite.com/media/Documentation%20Pictures/MonitorAgent/LogicApps/EventHubProperties.png
[9]:https://docs.nodinite.com/media/Documentation%20Pictures/MonitorAgent/LogicApps/EventHubEntity.png

[About Logic Apps Logging options]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/troubleshooting/about-logic-apps-logging-options/
[ARM Template]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/troubleshooting/arm-template/
[Azure Costs for Blob Storage and Event Hub]:https://docs.nodinite.com/logging-and-monitoring/custom-logging/troubleshooting/azure-costs-for-blob-storage-and-event-hub/
[Azure Logic Apps Agent]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/overview/
[Configuration - Event Hubs]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/getting-started/configuration-event-hubs/
[JSON Log Event]:https://docs.nodinite.com/core-services/log-event/features/json-log-event/
[Logging Logic Apps]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/features/logging-logic-apps/
[Pickup Log Events Service Logging Agent]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/overview/
[Prerequisites]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/getting-started/prerequisites/
[Prerequisites - Azure access]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/getting-started/prerequisites/azure-access-and-roles/
[Prerequisites - Firewall]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/getting-started/prerequisites/firewall-settings/
[Prerequisites - Supported Logic App types]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/getting-started/prerequisites/#supported-logic-app-types
[Serilog]:https://docs.nodinite.com/logging-and-monitoring/serilog/overview/