From 382b5da2a730f494f8bc45426e7c4abf0752bec3 Mon Sep 17 00:00:00 2001 From: HarshCasper Date: Tue, 17 Mar 2026 15:59:10 +0530 Subject: [PATCH 01/13] add Azure Monitor service doc --- src/content/docs/azure/services/insights.mdx | 11 - src/content/docs/azure/services/monitor.mdx | 220 +++++++++++++++++++ 2 files changed, 220 insertions(+), 11 deletions(-) delete mode 100644 src/content/docs/azure/services/insights.mdx create mode 100644 src/content/docs/azure/services/monitor.mdx diff --git a/src/content/docs/azure/services/insights.mdx b/src/content/docs/azure/services/insights.mdx deleted file mode 100644 index d3a2e974..00000000 --- a/src/content/docs/azure/services/insights.mdx +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: "Insights" -description: API coverage for Microsoft.Insights in LocalStack for Azure. -template: doc ---- - -import AzureFeatureCoverage from "../../../../components/feature-coverage/AzureFeatureCoverage"; - -## API Coverage - - diff --git a/src/content/docs/azure/services/monitor.mdx b/src/content/docs/azure/services/monitor.mdx new file mode 100644 index 00000000..35ecac0c --- /dev/null +++ b/src/content/docs/azure/services/monitor.mdx @@ -0,0 +1,220 @@ +--- +title: "Monitor" +description: Get started with Azure Monitor on LocalStack +template: doc +--- + +import AzureFeatureCoverage from "../../../../components/feature-coverage/AzureFeatureCoverage"; + +## Introduction + +Azure Monitor is a platform service for collecting, analyzing, and acting on telemetry from Azure resources and applications. +It helps you inspect activity logs and configure diagnostic settings for operational visibility. +These capabilities are useful for troubleshooting, auditing, and observability workflows. + +LocalStack for Azure provides a local environment for building and testing applications that make use of Azure Monitor. +The supported APIs are available on our [API Coverage section](#api-coverage), which provides information on the extent of Monitor's integration with LocalStack. + +## Getting started + +This guide is designed for users new to Azure Monitor and assumes basic knowledge of the Azure CLI and our `azlocal` wrapper script. + +Start your LocalStack container using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). + +:::note +As an alternative to using the `azlocal` CLI, users can run: + +`azlocal start-interception` + +This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API. +To revert this configuration, run: + +`azlocal stop-interception` + +This reconfigures the `az` CLI to send commands to the official Azure management REST API. At this time, there is no full parity between `azlocal` and `az` commands after running `az start-interception`. Therefore, this technique is not fully interchangeable. +::: + +### Create a resource group + +Create a resource group to contain your Monitor demo resources: + +```bash +azlocal group create \ + --name rg-monitor-demo \ + --location westeurope +``` + +```bash title="Output" +{ + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-monitor-demo", + "location": "westeurope", + "managedBy": null, + "name": "rg-monitor-demo", + "properties": { + "provisioningState": "Succeeded" + }, + "tags": null, + "type": "Microsoft.Resources/resourceGroups" +} +``` + +### Create a storage account + +Create a storage account to use as a diagnostic settings destination: + +```bash +azlocal storage account create \ + --name stmonitordoc79 \ + --resource-group rg-monitor-demo \ + --location westeurope \ + --sku Standard_LRS +``` + +```bash title="Output" +{ + ... + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-monitor-demo/providers/Microsoft.Storage/storageAccounts/stmonitordoc79", + ... + "name": "stmonitordoc79", + ... + "primaryEndpoints": { + "blob": "https://stmonitordoc79blob.localhost.localstack.cloud:4566", + ... + "table": "https://stmonitordoc79table.localhost.localstack.cloud:4566", + ... + }, + ... +} +``` + +### List activity logs + +List recent activity logs from the subscription: + +```bash +azlocal monitor activity-log list --max-events 5 +``` + +```bash title="Output" +[ + { + "caller": "00000000-0000-0000-0000-000000000000", + "category": { + "value": "Administrative", + ... + }, + "eventName": { + "value": "EndRequest", + ... + }, + "eventTimestamp": "2026-03-17T07:34:43.230050", + "resourceGroupName": "rg-monitor-demo", + "resourceProviderName": { + "value": "Microsoft.Resources", + ... + }, + ... + }, + ... +] +``` + +### Create and inspect diagnostic settings + +Get the resource group resource ID: + +```bash +RESOURCE_ID=$(azlocal group show \ + --name rg-monitor-demo \ + --query id \ + --output tsv) +``` + +Create diagnostic settings for the resource group: + +```bash +azlocal monitor diagnostic-settings create \ + --name rg-monitor-demo \ + --resource "$RESOURCE_ID" \ + --storage-account stmonitordoc79 \ + --logs '[{"category":"Administrative","enabled":true}]' +``` + +```bash title="Output" +{ + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-monitor-demo/providers/microsoft.insights/diagnosticSettings/rg-monitor-demo", + "name": "rg-monitor-demo", + "logs": [ + { + "category": "Administrative", + "enabled": true + } + ], + "metrics": [], + "storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-monitor-demo/providers/microsoft.Storage/storageAccounts/stmonitordoc79", + "type": "microsoft.insights/diagnosticSettings" +} +``` + +Get the diagnostic setting: + +```bash +azlocal monitor diagnostic-settings show \ + --name rg-monitor-demo \ + --resource "$RESOURCE_ID" +``` + +```bash title="Output" +{ + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-monitor-demo/providers/microsoft.insights/diagnosticSettings/rg-monitor-demo", + "name": "rg-monitor-demo", + "logs": [ + { + "category": "Administrative", + "enabled": true + } + ], + "metrics": [], + ... +} +``` + +### Update and delete diagnostic settings + +Update diagnostic settings to include an additional category: + +```bash +azlocal monitor diagnostic-settings update \ + --name rg-monitor-demo \ + --resource "$RESOURCE_ID" \ + --logs '[{"category":"Administrative","enabled":true},{"category":"Security","enabled":false}]' +``` + +```bash title="Output" +{ + "name": "rg-monitor-demo", + "logs": [ + { + "category": "Administrative", + "enabled": true + }, + { + "category": "Security", + "enabled": false + } + ], + ... +} +``` + +Delete the diagnostic setting: + +```bash +azlocal monitor diagnostic-settings delete \ + --name rg-monitor-demo \ + --resource "$RESOURCE_ID" +``` + +## API Coverage + + From 62924ae05752d0abb7327a5b0fc085020bfeb5da Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Thu, 9 Apr 2026 11:47:50 +0530 Subject: [PATCH 02/13] Update src/content/docs/azure/services/monitor.mdx Co-authored-by: Paolo Salvatori --- src/content/docs/azure/services/monitor.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/azure/services/monitor.mdx b/src/content/docs/azure/services/monitor.mdx index 35ecac0c..3bd9ac59 100644 --- a/src/content/docs/azure/services/monitor.mdx +++ b/src/content/docs/azure/services/monitor.mdx @@ -10,7 +10,7 @@ import AzureFeatureCoverage from "../../../../components/feature-coverage/AzureF Azure Monitor is a platform service for collecting, analyzing, and acting on telemetry from Azure resources and applications. It helps you inspect activity logs and configure diagnostic settings for operational visibility. -These capabilities are useful for troubleshooting, auditing, and observability workflows. +These capabilities are useful for troubleshooting, auditing, and observability workflows. For more information, see [Azure Monitor overview](https://learn.microsoft.com/azure/azure-monitor/fundamentals/overview). LocalStack for Azure provides a local environment for building and testing applications that make use of Azure Monitor. The supported APIs are available on our [API Coverage section](#api-coverage), which provides information on the extent of Monitor's integration with LocalStack. From b0d0e2372c5e3c2e7b256be704159f75d2877022 Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Thu, 9 Apr 2026 11:48:01 +0530 Subject: [PATCH 03/13] Update src/content/docs/azure/services/monitor.mdx Co-authored-by: Paolo Salvatori --- src/content/docs/azure/services/monitor.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/azure/services/monitor.mdx b/src/content/docs/azure/services/monitor.mdx index 3bd9ac59..34e06fc6 100644 --- a/src/content/docs/azure/services/monitor.mdx +++ b/src/content/docs/azure/services/monitor.mdx @@ -31,7 +31,7 @@ To revert this configuration, run: `azlocal stop-interception` -This reconfigures the `az` CLI to send commands to the official Azure management REST API. At this time, there is no full parity between `azlocal` and `az` commands after running `az start-interception`. Therefore, this technique is not fully interchangeable. +This reconfigures the `az` CLI to send commands to the official Azure management REST API. ::: ### Create a resource group From 98f5889791aeaf148b509b408eb9cea47c43eb67 Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Thu, 9 Apr 2026 11:48:12 +0530 Subject: [PATCH 04/13] Update src/content/docs/azure/services/monitor.mdx Co-authored-by: Paolo Salvatori --- src/content/docs/azure/services/monitor.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/azure/services/monitor.mdx b/src/content/docs/azure/services/monitor.mdx index 34e06fc6..5cc0f628 100644 --- a/src/content/docs/azure/services/monitor.mdx +++ b/src/content/docs/azure/services/monitor.mdx @@ -64,7 +64,7 @@ Create a storage account to use as a diagnostic settings destination: ```bash azlocal storage account create \ - --name stmonitordoc79 \ + --name mystore \ --resource-group rg-monitor-demo \ --location westeurope \ --sku Standard_LRS From b970369ce747761fe61238d036d67621865cc2fe Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Thu, 9 Apr 2026 11:48:48 +0530 Subject: [PATCH 05/13] Update src/content/docs/azure/services/monitor.mdx Co-authored-by: Paolo Salvatori --- src/content/docs/azure/services/monitor.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/azure/services/monitor.mdx b/src/content/docs/azure/services/monitor.mdx index 5cc0f628..bb9860b0 100644 --- a/src/content/docs/azure/services/monitor.mdx +++ b/src/content/docs/azure/services/monitor.mdx @@ -73,7 +73,7 @@ azlocal storage account create \ ```bash title="Output" { ... - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-monitor-demo/providers/Microsoft.Storage/storageAccounts/stmonitordoc79", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-monitor-demo/providers/Microsoft.Storage/storageAccounts/mystore", ... "name": "stmonitordoc79", ... From 9f22781a8edb939045d49448ef6d5d9ef160c11f Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Thu, 9 Apr 2026 11:49:03 +0530 Subject: [PATCH 06/13] Update src/content/docs/azure/services/monitor.mdx Co-authored-by: Paolo Salvatori --- src/content/docs/azure/services/monitor.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/azure/services/monitor.mdx b/src/content/docs/azure/services/monitor.mdx index bb9860b0..706b2e22 100644 --- a/src/content/docs/azure/services/monitor.mdx +++ b/src/content/docs/azure/services/monitor.mdx @@ -78,7 +78,7 @@ azlocal storage account create \ "name": "stmonitordoc79", ... "primaryEndpoints": { - "blob": "https://stmonitordoc79blob.localhost.localstack.cloud:4566", + "blob": "https://mystore.blob.core.azure.localhost.localstack.cloud:4566", ... "table": "https://stmonitordoc79table.localhost.localstack.cloud:4566", ... From fbdbfcab5a0aba76bc25aa06a909a4b33af01a16 Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Thu, 9 Apr 2026 11:49:58 +0530 Subject: [PATCH 07/13] Update src/content/docs/azure/services/monitor.mdx Co-authored-by: Paolo Salvatori --- src/content/docs/azure/services/monitor.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/azure/services/monitor.mdx b/src/content/docs/azure/services/monitor.mdx index 706b2e22..b0aad58a 100644 --- a/src/content/docs/azure/services/monitor.mdx +++ b/src/content/docs/azure/services/monitor.mdx @@ -210,7 +210,7 @@ azlocal monitor diagnostic-settings update \ Delete the diagnostic setting: ```bash -azlocal monitor diagnostic-settings delete \ +az monitor diagnostic-settings delete \ --name rg-monitor-demo \ --resource "$RESOURCE_ID" ``` From 2d79cf6f0e16fdc6555d609e9dd2999add326214 Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Thu, 9 Apr 2026 11:50:14 +0530 Subject: [PATCH 08/13] Update src/content/docs/azure/services/monitor.mdx Co-authored-by: Paolo Salvatori --- src/content/docs/azure/services/monitor.mdx | 37 +++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/content/docs/azure/services/monitor.mdx b/src/content/docs/azure/services/monitor.mdx index b0aad58a..a6ca2f56 100644 --- a/src/content/docs/azure/services/monitor.mdx +++ b/src/content/docs/azure/services/monitor.mdx @@ -215,6 +215,43 @@ az monitor diagnostic-settings delete \ --resource "$RESOURCE_ID" ``` +## Features + +The Azure Monitor emulator supports the following features: + +- **Activity logs**: List activity log entries for a subscription, with optional filtering by resource ID and time range. +- **Diagnostic settings**: Create, get, update, and delete diagnostic settings on any ARM resource. +- **Application Insights components**: Create, get, update tags, list, delete, and purge Application Insights components. Billing features (get and update) are also supported. +- **Action groups**: Create, get, update, list (by resource group or subscription), and delete action groups. +- **Metric alerts**: Create, get, update, list (by resource group or subscription), and delete metric alert rules. +- **Activity log alerts**: Create, get, update, list (by resource group or subscription), and delete activity log alert rules. +- **Autoscale settings**: Create, get, update, list (by resource group or subscription), and delete autoscale settings. +- **Scheduled query rules**: Create, get, update, list (by resource group or subscription), and delete scheduled query rules. +- **Data collection rules and endpoints**: Create, get, update, list (by resource group or subscription), and delete data collection rules and data collection endpoints. Create, get, list (by resource, by rule, or by endpoint), and delete data collection rule associations. +- **Web tests**: Create, get, update tags, list (by resource group, subscription, or component), and delete availability web tests. +- **Workbooks and workbook templates**: Create, get, update, list (by resource group or subscription), and delete workbooks. Create, get, update, list (by resource group), and delete workbook templates. Workbook revisions (get and list) are also supported. +- **Telemetry ingestion (data plane)**: Accept Application Insights SDK telemetry payloads (`track`), custom metrics publish, and live metrics subscription checks. +- **Query API (data plane)**: Execute and get log analytics queries, retrieve metrics, and list events. + +## Limitations + +- **No data persistence across restarts**: Activity logs, diagnostic settings, and all resource state are held in memory and lost when the emulator is stopped or restarted. +- **Activity log recording**: Only non-read (non-GET) control plane operations are recorded. Data plane operations and read requests do not produce activity log entries. +- **Diagnostic settings are not enforced**: Diagnostic settings are stored but do not route logs or metrics to the specified destination (storage account, Log Analytics workspace, or event hub). +- **Telemetry ingestion is a no-op**: The data plane telemetry endpoints (`track`, `publish`, `isSubscribed`) accept payloads and return success responses, but telemetry data is not stored or queryable. +- **Query API returns empty results**: Log analytics queries, metrics, and event queries return structurally valid but empty responses. +- **Autoscale rules are not evaluated**: Autoscale settings are stored but scaling actions are never triggered. +- **Alert rule evaluation**: Metric alerts, activity log alerts, and scheduled query rules are stored as resources but are never evaluated or fired. +- **Workbook revision history**: Revisions always return the current version of a workbook; historical revision tracking is not implemented. +- **Components purge**: The purge endpoint accepts requests and returns an operation ID, but no data is actually purged. + +## Samples + +Explore the following samples to get started with Service Bus on LocalStack: + +- [Azure Functions App with Service Bus Messaging](https://github.com/localstack/localstack-azure-samples/blob/main/samples/function-app-service-bus/dotnet/) +- [Azure Web App with Azure Cosmos DB for MongoDB](https://github.com/localstack/localstack-azure-samples/blob/main/samples/web-app-cosmosdb-mongodb-api/python/) + ## API Coverage From c088c5da3611650f7f996298e38eb1f6f1413391 Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Thu, 9 Apr 2026 11:50:23 +0530 Subject: [PATCH 09/13] Update src/content/docs/azure/services/monitor.mdx Co-authored-by: Paolo Salvatori --- src/content/docs/azure/services/monitor.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/azure/services/monitor.mdx b/src/content/docs/azure/services/monitor.mdx index a6ca2f56..6e6b485e 100644 --- a/src/content/docs/azure/services/monitor.mdx +++ b/src/content/docs/azure/services/monitor.mdx @@ -212,7 +212,7 @@ Delete the diagnostic setting: ```bash az monitor diagnostic-settings delete \ --name rg-monitor-demo \ - --resource "$RESOURCE_ID" + --resource "${RESOURCE_ID}/blobServices/default" ``` ## Features From 103e70bd4f0a906ec318014ce24e55393722b5c6 Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Thu, 9 Apr 2026 11:50:38 +0530 Subject: [PATCH 10/13] Update src/content/docs/azure/services/monitor.mdx Co-authored-by: Paolo Salvatori --- src/content/docs/azure/services/monitor.mdx | 44 ++++++++++++++++++--- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/src/content/docs/azure/services/monitor.mdx b/src/content/docs/azure/services/monitor.mdx index 6e6b485e..2a5eccb0 100644 --- a/src/content/docs/azure/services/monitor.mdx +++ b/src/content/docs/azure/services/monitor.mdx @@ -193,14 +193,48 @@ azlocal monitor diagnostic-settings update \ ```bash title="Output" { "name": "rg-monitor-demo", - "logs": [ + "logs": [ { - "category": "Administrative", - "enabled": true + "category": "StorageRead", + "enabled": true, + "retentionPolicy": { + "days": 0, + "enabled": false + } + }, + { + "category": "StorageWrite", + "enabled": true, + "retentionPolicy": { + "days": 0, + "enabled": false + } + }, + { + "category": "StorageDelete", + "enabled": false, + "retentionPolicy": { + "days": 0, + "enabled": false + } + } + ], + "metrics": [ + { + "category": "Transaction", + "enabled": true, + "retentionPolicy": { + "days": 0, + "enabled": false + } }, { - "category": "Security", - "enabled": false + "category": "Capacity", + "enabled": true, + "retentionPolicy": { + "days": 0, + "enabled": false + } } ], ... From 99ec395a4da16795d26b4f5ec2cd6b9ebe8c1aed Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Thu, 9 Apr 2026 11:50:51 +0530 Subject: [PATCH 11/13] Update src/content/docs/azure/services/monitor.mdx Co-authored-by: Paolo Salvatori --- src/content/docs/azure/services/monitor.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/content/docs/azure/services/monitor.mdx b/src/content/docs/azure/services/monitor.mdx index 2a5eccb0..6ef19e60 100644 --- a/src/content/docs/azure/services/monitor.mdx +++ b/src/content/docs/azure/services/monitor.mdx @@ -19,7 +19,11 @@ The supported APIs are available on our [API Coverage section](#api-coverage), w This guide is designed for users new to Azure Monitor and assumes basic knowledge of the Azure CLI and our `azlocal` wrapper script. -Start your LocalStack container using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). +Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running: + +```bash +azlocal start-interception +``` :::note As an alternative to using the `azlocal` CLI, users can run: From d7ef57c522528571f895bad9a9577b66b56e2118 Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Thu, 9 Apr 2026 11:52:14 +0530 Subject: [PATCH 12/13] Apply suggestions from code review Co-authored-by: Paolo Salvatori --- src/content/docs/azure/services/monitor.mdx | 60 ++++++++++++++------- 1 file changed, 42 insertions(+), 18 deletions(-) diff --git a/src/content/docs/azure/services/monitor.mdx b/src/content/docs/azure/services/monitor.mdx index 6ef19e60..560c6145 100644 --- a/src/content/docs/azure/services/monitor.mdx +++ b/src/content/docs/azure/services/monitor.mdx @@ -43,7 +43,7 @@ This reconfigures the `az` CLI to send commands to the official Azure management Create a resource group to contain your Monitor demo resources: ```bash -azlocal group create \ +az group create \ --name rg-monitor-demo \ --location westeurope ``` @@ -67,7 +67,7 @@ azlocal group create \ Create a storage account to use as a diagnostic settings destination: ```bash -azlocal storage account create \ +az storage account create \ --name mystore \ --resource-group rg-monitor-demo \ --location westeurope \ @@ -84,7 +84,7 @@ azlocal storage account create \ "primaryEndpoints": { "blob": "https://mystore.blob.core.azure.localhost.localstack.cloud:4566", ... - "table": "https://stmonitordoc79table.localhost.localstack.cloud:4566", + "table": "https://mystore.table.core.azure.localhost.localstack.cloud:4566", ... }, ... @@ -125,23 +125,25 @@ azlocal monitor activity-log list --max-events 5 ### Create and inspect diagnostic settings -Get the resource group resource ID: +Get the resource ID of the storage account: ```bash -RESOURCE_ID=$(azlocal group show \ - --name rg-monitor-demo \ +RESOURCE_ID=$(az storage account show \ + --name mystore \ + --resource-group rg-monitor-demo \ --query id \ --output tsv) ``` -Create diagnostic settings for the resource group: +Create a diagnostic setting for the bob service of the storage account. For more information, see [Diagnostic settings in Azure Monitor](https://learn.microsoft.com/en-us/azure/azure-monitor/platform/diagnostic-settings): ```bash -azlocal monitor diagnostic-settings create \ +az monitor diagnostic-settings create \ --name rg-monitor-demo \ - --resource "$RESOURCE_ID" \ - --storage-account stmonitordoc79 \ - --logs '[{"category":"Administrative","enabled":true}]' + --resource "${RESOURCE_ID}/blobServices/default" \ + --storage-account mystore \ + --logs '[{"category":"StorageRead","enabled":true},{"category":"StorageWrite","enabled":true}]' \ + --metrics '[{"category":"Transaction","enabled":true},{"category":"Capacity","enabled":true}]' ``` ```bash title="Output" @@ -163,9 +165,9 @@ azlocal monitor diagnostic-settings create \ Get the diagnostic setting: ```bash -azlocal monitor diagnostic-settings show \ +az monitor diagnostic-settings show \ --name rg-monitor-demo \ - --resource "$RESOURCE_ID" + --resource "${RESOURCE_ID}/blobServices/default" ``` ```bash title="Output" @@ -174,11 +176,32 @@ azlocal monitor diagnostic-settings show \ "name": "rg-monitor-demo", "logs": [ { - "category": "Administrative", + "category": "StorageRead", + "enabled": true + }, + { + "category": "StorageWrite", "enabled": true } ], - "metrics": [], + "metrics": [ + { + "category": "Transaction", + "enabled": true, + "retentionPolicy": { + "days": 0, + "enabled": false + } + }, + { + "category": "Capacity", + "enabled": true, + "retentionPolicy": { + "days": 0, + "enabled": false + } + } + ], ... } ``` @@ -188,10 +211,11 @@ azlocal monitor diagnostic-settings show \ Update diagnostic settings to include an additional category: ```bash -azlocal monitor diagnostic-settings update \ +az monitor diagnostic-settings update \ --name rg-monitor-demo \ - --resource "$RESOURCE_ID" \ - --logs '[{"category":"Administrative","enabled":true},{"category":"Security","enabled":false}]' + --resource"${RESOURCE_ID}/blobServices/default" \ + --logs '[{"category":"StorageRead","enabled":true},{"category":"StorageWrite","enabled":true},,{"category":"StorageDelete","enabled":true}]' \ + --metrics '[{"category":"Transaction","enabled":true},{"category":"Capacity","enabled":true}]' ``` ```bash title="Output" From be172037fb7a4da765eaea5372bbd03e8514f64f Mon Sep 17 00:00:00 2001 From: HarshCasper Date: Thu, 9 Apr 2026 11:56:54 +0530 Subject: [PATCH 13/13] final fixes --- src/content/docs/azure/services/monitor.mdx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/content/docs/azure/services/monitor.mdx b/src/content/docs/azure/services/monitor.mdx index 560c6145..16d9958b 100644 --- a/src/content/docs/azure/services/monitor.mdx +++ b/src/content/docs/azure/services/monitor.mdx @@ -25,18 +25,14 @@ Launch LocalStack using your preferred method. For more information, see [Introd azlocal start-interception ``` -:::note -As an alternative to using the `azlocal` CLI, users can run: - -`azlocal start-interception` - This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API. To revert this configuration, run: -`azlocal stop-interception` +```bash +azlocal stop-interception +``` This reconfigures the `az` CLI to send commands to the official Azure management REST API. -::: ### Create a resource group