Skip to content

Commit

Permalink
style(Minor copyedit): caps consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
barbnewrelic committed Feb 28, 2022
1 parent 3decb01 commit c318fd9
Showing 1 changed file with 26 additions and 23 deletions.
49 changes: 26 additions & 23 deletions src/content/docs/logs/forward-logs/azure-log-forwarding.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,50 +22,50 @@ We currently offer two ARM templates to achieve this: the EventHub-based (recomm

## Send logs from an Azure Event Hub (recommended) [#azure-eventhub]

The [New Relic Event Hub ARM template](https://github.com/newrelic/newrelic-azure-functions/blob/master/armTemplates/azuredeploy-eventhubforwarder.json) allows you to attach a consumer to an existing/new Event Hub to forward the incoming stream of logs to New Relic. By using this setup, you can configure multiple Azure resources to send their logs to an Event Hub and have these logs automatically forwarded to New Relic. The template also allows you to easily configure your **subscription** Activity Logs to be sent to New Relic.
The [New Relic Event Hub ARM template](https://github.com/newrelic/newrelic-azure-functions/blob/master/armTemplates/azuredeploy-eventhubforwarder.json) allows you to attach a consumer to an existing or new Event Hub to forward the incoming stream of logs to New Relic. By using this setup, you can configure multiple Azure resources to send their logs to an Event Hub and have these logs automatically forwarded to New Relic. The template also allows you to easily configure your **subscription** Activity Logs to be sent to New Relic.

To send the logs from your Event Hub:
1. [Deploy](#eventhub-arm-setup) the New Relic Event Hub ARM template.
2. Optionally, [configure your **subscription** Activity Logs to be sent to New Relic](#subscription-activity-logs).
3. Optionally, [configure a given Azure resource to send its individual Activity Logs](#resource-activity-logs).
2. Optional: [configure your **subscription** Activity Logs to be sent to New Relic](#subscription-activity-logs).
3. Optional: [configure a given Azure resource to send its individual Activity Logs](#resource-activity-logs).
4. [Explore your log data](#find-data).

### Deploy the New Relic Event Hub ARM template [#eventhub-arm-setup]

Follow these steps:

1. Make sure you have a [New Relic license key](/docs/apis/intro-apis/new-relic-api-keys/#ingest-license-key).
2. Log in to [New Relic Logs](https://one.newrelic.com/launcher/logger.log-launcher) and click **Add more data sources** on the top right of the page.
2. Log in to **[one.newrelic.com > Logs](https://one.newrelic.com/launcher/logger.log-launcher)** and click **Add more data sources** on the top right of the page.
3. Under **Log ingestion**, click the `Microsoft Azure Event Hub` tile:

![Microsoft Azure Event Hub data sources button](./images/azure-eventhub-tile.png)

4. Select the account you want to send the logs, and click **Continue**.
5. Click **Generate API Key** and copy the generated **API Key**.
5. Click **Generate API Key** and copy the generated API key.
6. Click **Deploy to Azure** and a new tab will be open with the ARM template loaded in Azure.
7. Select the **Resource Group** where you want to create the necessary resources, and a **Region**. Despite not being mandatory, we recommend installing the template in a new resource group, to avoid deleting any of the components it creates accidentally.
8. In the **New Relic License Key** field, paste the previously copied **API Key**.
8. In the **New Relic License Key** field, paste the previously copied API key.
9. Ensure the [New Relic One endpoint](/docs/logs/log-api/introduction-log-api/#endpoint) is set to the one corresponding to your account.
10. Optional: Set to `true` the [Azure subscription Activity logs](https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/activity-log) you want to forward. See [this section](#subscription-activity-logs) for more details.
10. Optional: Set to `true` the [Azure subscription activity logs](https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/activity-log) you want to forward. See [the subscription information](#subscription-activity-logs) in this document for more details.
11. Click **Review + create**, review the data you've inserted, and click **Create**.

Note that the template is idempotent. You can start forwarding logs from EventHub and then rerun the same template to configure [Azure subscription Activity logs](#subscription-activity-logs) forwarding by completing step 10.
Note that the template is idempotent. You can start forwarding logs from Event Hub and then rerun the same template to configure [Azure Subscription Activity Logs](#subscription-activity-logs) forwarding by completing step 10.

### Optional: send Azure Activity Logs from your subscription [#subscription-activity-logs]

[Azure activity logs](https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/activity-log) provide:
[Azure Activity Logs](https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/activity-log) provide:

- More visibility of your Azure resources
- Activity of the Azure resources
- Information about performed actions
- Events and their timestamps
- The user who performed an action, if applicable.
- The user who performed an action, if applicable

Note that all the above are subscription-level events. If you wish to forward Activity Logs from a specific resource instead, please refer to [this section](#resource-activity-logs).
These are all subscription-level events. If you wish to forward Activity Logs from a specific resource instead, please refer to the [Resource Activity Logs information](#resource-activity-logs) in this document.

For more information about the shape of the Activity Logs, see the [Microsoft Azure Activity Log event schema](https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/activity-log-schema).

The [New Relic Event Hub ARM template deployment](#eventhub-arm-setup) optionally allows to select which [Azure activity logs](https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/activity-log) you want to forward to New Relic, including:
The [New Relic Event Hub ARM template deployment](#eventhub-arm-setup) optionally allows you to select which [Azure Activity Logs](https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/activity-log) you want to forward to New Relic, including:

* Administrative Azure Activity Logs
* Alert Azure Activity Logs
Expand All @@ -78,22 +78,22 @@ The [New Relic Event Hub ARM template deployment](#eventhub-arm-setup) optionall

### Optional: configure an Azure resource to send its Activity Logs [#resource-activity-logs]

By default, this template only configures the needed function and resources to forward logs from an Event Hub to New Relic One. We can also configure the subscription Activity Logs to be forwarded, but there isn't a default log forwarding from your Azure resources. If you want to forward logs from any resource that produces them, you need to configure it by creating a diagnostic setting for the given resource.
By default, this template only configures the function and resources needed to forward logs from an Event Hub to New Relic One. We can also configure the subscription Activity Logs to be forwarded, but there isn't a default log forwarding from your Azure resources. If you want to forward logs from any resource that produces them, you need to configure it by creating a diagnostic setting for the given resource.

For example, if you have a function running on Azure and you want to forward the logs to New Relic One, you'll need to configure a diagnostic setting to forward the logs to EventHub. For more information, see the [Microsoft documentation to create diagnostic settings for sendig platform logs and metrics to different destinations](https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/diagnostic-settings?tabs=CMD).
For example, if you have a function running on Azure and you want to forward the logs to New Relic One, you'll need to configure a diagnostic setting to forward the logs to Event Hub. For more information, see the [Microsoft documentation to create diagnostic settings for sending platform logs and metrics to different destinations](https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/diagnostic-settings?tabs=CMD).

In the following example, we will demonstrate how to forward the Activity Logs from a Kubernetes Service resource running on Azure.

1. [Deploy the New Relic Event Hub ARM template](#eventhub-arm-setup)
2. Navigate to your Kubernetes Service:
1. [Deploy the New Relic Event Hub ARM template](#eventhub-arm-setup).
2. Navigate to your Kubernetes service:

![Kubernetes Service Button](./images/azure-eventhub-k8s-service.png)

3. In the left-hand menu, select `Monitoring` > `Diagnostic Settings`:
3. In the left-hand menu, select **Monitoring` > `Diagnostic Settings**:

![Diagnostic Settings menu](./images/azure-eventhub-diagnosticsettings.png)

4. Click on `Add diagnostic setting`:
4. Click **Add diagnostic setting**:

![Add Diagnostic Setting button](./images/azure-eventhub-add-diagnostic-setting.png)

Expand All @@ -105,23 +105,26 @@ In the following example, we will demonstrate how to forward the Activity Logs f

![Kubernetes logs](./images/azure-eventhub-diagnostic-logs.png)

7. On the `Destination details`, select `Stream to an event hub`, and configure the `Event hub namespace`, `Event hub name` and `Event hub policy name`. If you opted to create a new Event Hub and a namespace during the [ARM template deployment](#eventhub-arm-setup), select the following automatically created settings (the namespace name will have a different suffix):
7. On the **Destination details**, select **Stream to an event hub**, and configure the `Event hub namespace`, `Event hub name`, and `Event hub policy name`. If you opted to create a new Event Hub and a namespace during the [ARM template deployment](#eventhub-arm-setup), select the following automatically created settings (the namespace name will have a different suffix):

![Destination details settings](./images/azure-eventhub-destination-details-settings.png)

8. Click on `Save` to start forwarding your Kubernetes logs to New Relic:
8. Click **Save** to start forwarding your Kubernetes logs to New Relic:

![Diagnostic setting save button](./images/azure-eventhub-save-button.png)

## Send logs from Azure Blob storage
## Send logs from Azure Blob storage [#azure-blob-storage]

[Azure Blob Storage](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction) allows to store massive amounts of unstructured data, including log files. Using the [New Relic Blob Storage ARM template](https://github.com/newrelic/newrelic-azure-functions/blob/master/armTemplates/azuredeploy-blobforwarder.json), you will be able to create a function that forwards the contents of a [container placed in a Storage Account](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction#blob-storage-resources).
[Azure Blob Storage](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction) allows you to store massive amounts of unstructured data, including log files. Using the [New Relic Blob Storage ARM template](https://github.com/newrelic/newrelic-azure-functions/blob/master/armTemplates/azuredeploy-blobforwarder.json), you will be able to create a function that forwards the contents of a [container placed in a Storage Account](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction#blob-storage-resources).

<Callout variant="important">
New Relic Blob Storage ARM template deploys a function that forwards all the blob files within the specified container **at their current state**. If any of these blobs is modified thereafter, the **complete** contents of the file will be resent. The provided solution is aimed at forwarding static blob files to New Relic and it does not support file tailing. If you need to forward a stream of logs, we recommend to send your application logs to an `Event Hub` and use the [Event Hub based template](#azure-eventhub) instead.
New Relic Blob Storage ARM template deploys a function that forwards all the blob files within the specified container **at their current state**. If any of these blobs is modified thereafter, the **complete** contents of the file will be resent.

This solution aims to forward static blob files to New Relic, and it does not support file tailing. If you need to forward a stream of logs, we recommend to send your application logs to an `Event Hub` and use the [Event Hub based template](#azure-eventhub) instead.
</Callout>

To send the blobs from a container in your Storage Account, follow these steps:

1. [Deploy](#blobstorage-arm-setup) the New Relic Blob Storage ARM template.
2. [Explore your log data](#find-data).

Expand Down

0 comments on commit c318fd9

Please sign in to comment.