Monitor B2B messages with Azure Monitor logs in Azure Logic Apps

After you set up B2B communication between trading partners in your integration account, those partners can exchange messages with each other. To check that this communication works the way you expect, you can monitor AS2, X12, and EDIFACT messages and set up diagnostics logging for your integration account with Azure Monitor logs. This service monitors your cloud and on-premises environments, help you maintain their availability and performance, and collects runtime details and events for richer debugging. You can also use this data with other services such as Azure Storage and Azure Event Hubs.

Note

This page might still have references to Microsoft Operations Management Suite (OMS), which is retiring in January 2019, but replaces those steps with Azure Log Analytics where possible.

Note

This article was recently updated to use the term Azure Monitor logs instead of Log Analytics. Log data is still stored in a Log Analytics workspace and is still collected and analyzed by the same Log Analytics service. We are updating the terminology to better reflect the role of logs in Azure Monitor. See Azure Monitor terminology changes for details.

Prerequisites

Turn on diagnostics logging

You can turn on logging either directly from your integration account or through the Azure Monitor service. Azure Monitor provides basic monitoring with infrastructure-level data. Learn more about Azure Monitor.

Turn on logging from integration account

  1. In the Azure portal, find and select your integration account. Under Monitoring, select Diagnostic settings.

    Find and select your integration account, select "Diagnostic settings"

  2. Now find and select your integration account. In filter lists, select the values that apply to your integration account. When you're done, choose Add diagnostic setting.

    Property Value Description
    Subscription <Azure-subscription-name> The Azure subscription that's associated with your integration account
    Resource group <Azure-resource-group-name> The Azure resource group for your integration account
    Resource type Integration accounts The type for the Azure resource where you want to turn on logging
    Resource <integration-account-name> The name for your Azure resource where you want to turn on logging

    For example:

    Set up diagnostics for your integration account

  3. Provide a name for your new diagnostic setting and select your Log Analytics workspace and the data you want to log.

    1. Select Send to Log Analytics.

    2. Under Log Analytics, select Configure.

    3. Under OMS Workspaces, select the Log Analytics workspace you want to use for logging.

      Note

      OMS workspaces are being replaced by Log Analytics workspaces.

    4. Under Log, select the IntegrationAccountTrackingEvents category, and choose Save.

    For example:

    Set up Azure Monitor logs so you can send diagnostics data to a log

  4. Now set up tracking for your B2B messages in Azure Monitor logs.

Turn on logging through Azure Monitor

  1. In the Azure portal, on the main Azure menu, select Monitor. Under Settings, select Diagnostics settings.

    Select "Monitor" > "Diagnostics settings" > your integration account

  2. Now find and select your integration account. In filter lists, select the values that apply to your integration account. When you're done, choose Add diagnostic setting.

    Property Value Description
    Subscription <Azure-subscription-name> The Azure subscription that's associated with your integration account
    Resource group <Azure-resource-group-name> The Azure resource group for your integration account
    Resource type Integration accounts The type for the Azure resource where you want to turn on logging
    Resource <integration-account-name> The name for your Azure resource where you want to turn on logging

    For example:

    Set up diagnostics for your integration account

  3. Provide a name for your new diagnostic setting and select your Log Analytics workspace and the data you want to log.

    1. Select Send to Log Analytics.

    2. Under Log Analytics, select Configure.

    3. Under OMS Workspaces, select the Log Analytics workspace you want to use for logging.

      Note

      OMS workspaces are being replaced by Log Analytics workspaces.

    4. Under Log, select the IntegrationAccountTrackingEvents category, and choose Save.

    For example:

    Set up Azure Monitor logs so you can send diagnostics data to a log

  4. Now set up tracking for your B2B messages in Azure Monitor logs.

Use diagnostic data with other services

Along with Azure Monitor logs, you can extend how you use your logic app's diagnostic data with other Azure services, for example:

You can then get real-time monitoring by using telemetry and analytics from other services, like Azure Stream Analytics and Power BI. For example:

Based on the options you want set up, make sure that you first create an Azure storage account or create an Azure event hub. You can then select the destinations where you want to send diagnostic data. Retention periods apply only when you choose to use a storage account.

Send data to Azure storage account or event hub

Supported tracking schemas

Azure supports these tracking schema types, which all have fixed schemas except the Custom type.

Next steps