Question

Difficulty: MediumAzure Monitor Metrics and Diagnostic Settings

You have an Azure Storage account named `storeprodlogs`. You need to configure diagnostic logging to collect read, write, and delete transaction logs for the Blob service. The configuration must meet the following requirements:

- Allow operations teams to analyze the transaction logs using Kusto Query Language (KQL) queries.
- Archive the logs to a separate storage account named `storearchive` for long-term retention.

Which two actions should you perform? (Select two.)

  1. Create the diagnostic setting at the Blob service level (`storeprodlogs/blobServices/default`).Answer
  2. B
    Create the diagnostic setting at the Storage account level (`storeprodlogs`).
  3. Select both a Log Analytics workspace and the `storearchive` storage account as destinations in the diagnostic setting.Answer
  4. D
    Configure the 365-day log retention policy within the diagnostic setting when targeting the Log Analytics workspace.
  5. E
    Assign the Storage Blob Data Contributor role to the Azure Monitor service principal on the `storearchive` storage account.

Answer

To meet the requirements, you must create the diagnostic setting at the Blob service level (`storeprodlogs/blobServices/default`) and select both a Log Analytics workspace and the `storearchive` storage account as the export destinations.
To capture Blob transaction logs, the diagnostic setting must be created on the Blob service sub-resource (`storeprodlogs/blobServices/default`). Additionally, to allow KQL analysis and long-term archiving, both a Log Analytics workspace and a storage account must be specified as export destinations.

Step-by-Step Solution

1
Navigate to the Blob service sub-resource of the storage account (`storeprodlogs/blobServices/default`) in Azure.
Accessed the correct service-level resource scope for data-plane logging.
Blob, Queue, Table, and File transaction logs must be configured on their respective sub-resources, not the parent storage account.
2
Add a new diagnostic setting, select the transaction log categories (e.g., StorageRead, StorageWrite, StorageDelete), and check the boxes for Log Analytics workspace and Archive to a storage account.
Configured multiple destinations to receive the transaction logs.
A Log Analytics workspace enables KQL queries, while the target storage account (`storearchive`) archives logs for long-term retention.

Key Concept

Configuring service-level diagnostic settings for Azure Storage and routing logs to multiple diagnostic destinations.
Rate this question