---
title: Azure Manual Log Forwarding Setup
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > Log Management > Logs Guides > Azure Manual Log Forwarding Setup
---

# Azure Manual Log Forwarding Setup

## Overview{% #overview %}

Use this guide to manually set up log forwarding from Azure to any Datadog site.

**Note**: To collect logs from Azure Log Analytics workspaces, use the [automated ARM template](https://docs.datadoghq.com/logs/guide/azure-automated-log-forwarding.md) or [Azure Container App](https://docs.datadoghq.com/getting_started/integrations/azure.md#container-app-log-forwarding-setup) process.

{% alert level="info" %}
Starting April 30, 2025, Azure no longer supports Node.js 18. To ensure compatibility, update using the Azure Resource Manager (ARM) template with the same parameters.
{% /alert %}

## Setup{% #setup %}

You can forward your logs through an [Azure Container App](https://learn.microsoft.com/azure/container-apps/), or [Azure Blob Storage](https://learn.microsoft.com/azure/storage/blobs/) account.

{% tab title="Container App (recommended)" %}

1. Click the button below, and fill in the form on the Azure Portal. Datadog automatically deploys the Azure resources required to forward logs into your Datadog account.

[](https://portal.azure.com/#create/Microsoft.Template/uri/CustomDeploymentBlade/uri/https%3A%2F%2Fraw.githubusercontent.com%2FDataDog%2Fintegrations-management%2Fmain%2Fazure%2Flogging_install%2Fdist%2Fforwarder.json)
After the template deployment finishes, set up [diagnostic settings](https://learn.microsoft.com/azure/azure-monitor/platform/diagnostic-settings) for each log source to send Azure platform logs (including resource logs) to the Storage Account created during deployment.
**Note**: Resources can only stream to a Storage Account in the same Azure region.
{% /tab %}

{% tab title="Blob Storage" %}

1. If you haven't already set up [Azure Blob Storage](https://learn.microsoft.com/azure/storage/blobs/), use one of the following methods to get started:
   - [Azure portal](https://docs.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-portal)
   - [Azure Storage Explorer](https://docs.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-storage-explorer)
   - [Azure CLI](https://docs.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-cli)
   - [PowerShell](https://docs.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-powershell)
1. Set up the Datadog-Azure Function to forward logs from Blob Storage using the instructions below.
1. Configure your Azure App Services to [forward their logs to Blob Storage](https://learn.microsoft.com/training/modules/store-app-data-with-azure-blob-storage/).

##### Create a function app{% #create-a-function-app %}

If you already have a function app configured for this purpose, skip to Add a new function to your Function App using the Event Hub trigger template.

1. In the Azure portal, navigate to the [Function App overview](https://portal.azure.com/#view/HubsExtension/BrowseResource/resourceType/Microsoft.Web%2Fsites/kind/functionapp) and click **Create**.
1. In the **Instance Details** section, configure the following settings:
   1. Select the **Code** radio button.
   1. For **Runtime stack**, select `Node.js`.
   1. For **Version**, select `18 LTS`.
   1. For **Operating System**, select `Windows`.
1. Configure other settings as desired.
1. Click **Review + create** to validate the resource. If validation is successful, click **Create**.

##### Add a new function to your Function App using the Azure Blob Storage trigger template{% #add-a-new-function-to-your-function-app-using-the-azure-blob-storage-trigger-template %}

1. Select your new or existing function app from the [Function App overview](https://portal.azure.com/#view/HubsExtension/BrowseResource/resourceType/Microsoft.Web%2Fsites/kind/functionapp).
1. Under the **Functions** tab, click **Create**.
1. For the **Development environment** field, select **Develop in portal**.
1. Under **Select a template**, choose [Azure Blob storage trigger](https://learn.microsoft.com/azure/azure-functions/functions-bindings-storage-blob-trigger?tabs=python-v2%2Cisolated-process%2Cnodejs-v4%2Cextensionv5&pivots=programming-language-csharp).
1. Select your **Storage account connection**. **Note**: See [Configure a connection string for an Azure storage account](https://learn.microsoft.com/azure/storage/common/storage-configure-connection-string#configure-a-connection-string-for-an-azure-storage-account) for more information.
1. Click **Create**.

See [Getting started with Azure Functions](https://learn.microsoft.com/azure/azure-functions/functions-get-started) for more information.

##### Point your Blob Storage trigger to Datadog{% #point-your-blob-storage-trigger-to-datadog %}

1. On the detail page of your Event Hub trigger function, click **Code + Test** under the **Developer** side menu.
1. Add the [Datadog-Azure Function code](https://github.com/DataDog/datadog-serverless-functions/blob/master/azure/blobs_logs_monitoring/index.js) to the function's `index.js` file.
1. Add your Datadog API key with a `DD_API_KEY` environment variable, or copy it into the function code by replacing `<DATADOG_API_KEY>` on line 20.
1. If you're not using the Datadog US1 site, set your [Datadog site](https://docs.datadoghq.com/getting_started/site.md) with a `DD_SITE` environment variable under the configuration tab of your function app, or copy the site parameter into the function code on line 21.
1. **Save** the function.
1. Click **Integration** under the **Developer** side menu.
1. Click **Azure Blob Storage** under **Trigger and inputs**.
1. Set the **Blob Parameter Name** to `blobContent` and click **Save**.
1. Verify your setup is correct by checking the [Datadog Log Explorer](https://app.datadoghq.com/logs) for logs from this resource.

{% /tab %}

## Log archiving{% #log-archiving %}

Archiving logs to Azure Blob Storage requires an App Registration. If you haven't already, follow the [automatic](https://docs.datadoghq.com/logs/guide/azure-automated-log-forwarding.md) or [manual](https://docs.datadoghq.com/logs/guide/azure-manual-log-forwarding.md) setup instructions to configure the integration using an App Registration. App Registrations created for archiving purposes do not need the `Monitoring Reader` role.

After configuring an App Registration, [create a log archive](https://docs.datadoghq.com/logs/log_configuration/archives.md?tab=azurestorage#configure-an-archive) that writes to Azure Blob Storage.

**Note**: If your storage bucket is in a subscription being monitored through the Azure Native integration, a redundancy warning appears in the Azure integration tile. This warning can be safely ignored for log archiving.

## Further Reading{% #further-reading %}

- [Learn how to explore your logs](https://docs.datadoghq.com/logs/explorer.md)
- [How to send logs to Datadog while reducing data transfer fees](https://docs.datadoghq.com/logs/guide/reduce_data_transfer_fees.md)
