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. 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.
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.
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 that the Nodinite Azure Logic Apps Logging and Monitoring Agent reads.
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
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 to the Log Databases (green).
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 |
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 |
The ARM Template
Review the parameter
eventHubNameand change it according to your design and configuration. The Event Hub Entity has some recommendations that you must be aware of; review the Prerequisites user guide.
Review the
ARMTestnaming example and adjust it to your naming standard.
{
"$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": {}
}
}
]
}
After the Deployment
- Verify the diagnostic setting from the Log Configuration Resource with the Log Configuration Details Remote Action.
- Choose which Actions and payloads become Log Events with the Logging filters.
- 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.
Next Steps
- Prerequisites - Review Azure access, diagnostic settings, and Event Hub requirements.
- Configuration - Configure the agent after deploying the template.
- Configure Event Hubs - Match the agent's Event Hub entry to
eventHubName.