Skip to main content

Task 09: Log Analytics Workspace

Runbook Azure

DOCUMENT CATEGORY: Runbook
SCOPE: Log Analytics Workspace deployment
PURPOSE: Establish centralized monitoring and logging
MASTER REFERENCE: Microsoft Learn - Log Analytics

Status: Active

Overview​

This task creates a Log Analytics workspace that serves as the centralized log destination for all management infrastructure — VMs, networking resources, Key Vault, and eventually the Azure Local cluster itself. Diagnostic settings for other resources will reference this workspace.

Task Classification

Execution Target: Azure-Only (control-plane API operation) Tab Profile: 3 tabs — Azure Portal · PowerShell · Azure CLI

Terraform Reference

Module: azurelocal-toolkit File: log.tf Mode: Management

Components Created​

ResourceName PatternPurpose
Log Analytics Workspacelog-azrlmgmt-{env}-{region}-01Centralized log collection

Workspace Configuration​

SettingValueSource
Namelog-azrlmgmt-{env}-{region}-01landing_zone.log_analytics.name
SKUPerGB2018no key (the script or Azure decides it)
Retention90 daysoperations.monitoring.retention_days

Prerequisites​

  • Resource group exists
  • Log Analytics contributor role on target resource group

Values from infrastructure.yml​

The values for this task come from infrastructure.yml (schema 5). Every key, with its type, default and example, is in the variables reference.


Single Subscription Model​

Landing Zone Placement​

FieldValueConfig Path
SubscriptionCustomer subscriptionlanding_zone.subscriptions[].id
Resource Grouprg-azrlmgmt-{env}-{region}-01operations.monitoring.workspace_resource_group
Workspace Namelog-azrlmgmt-{env}-{region}-01landing_zone.log_analytics.name

Execution Options​

Azure Portal​

When to use: Learning Azure Local, single deployment, prefer visual interface

Procedure​

  1. Create Log Analytics Workspace:
  • Search for Log Analytics workspaces → + Create | Field | Value | Source | |-------|-------|--------| | Name | log-azrlmgmt-{env}-{region}-01 | landing_zone.log_analytics.name | | Subscription | Target subscription | landing_zone.subscriptions[].id | | Resource Group | Management RG | operations.monitoring.workspace_resource_group | | Region | Your region | azure.location |
  1. Configure Pricing Tier (optional):
  • Go to Usage and estimated costs → Select Pay-As-You-Go (Per GB 2018)
  1. Configure Retention:
  • Go to Usage and estimated costs → Data Retention → Set to value from config | Field | Value | Source | |-------|-------|--------| | Retention | 90 days | operations.monitoring.retention_days |
  1. Review + create: Verify → Click Create

Validation​

  • Workspace provisioning state: Succeeded
  • SKU is PerGB2018
  • Retention set to configured value
  • Workspace ID can be retrieved

Validation​

  • Workspace provisioned
  • SKU: PerGB2018
  • Retention: 90 days (or configured value)
  • Workspace ID retrievable

CAF/WAF Landing Zone Model​

In the CAF/WAF model, the Log Analytics workspace is deployed in the Management subscription for centralized observability.

Landing Zone Placement​

FieldValueConfig Path
SubscriptionManagement subscriptionlanding_zone.subscriptions[].id
Resource Grouprg-azrlmgmt-{env}-{region}-01operations.monitoring.workspace_resource_group
Workspace Namelog-azrlmgmt-{env}-{region}-01landing_zone.log_analytics.name

Execution Options​

Azure Portal​

Follow the same procedure as Single Subscription → Azure Portal, targeting the Management subscription.

Validation​

  • Workspace in Management subscription
  • Cross-subscription diagnostic settings can target this workspace

Validation​

  • Workspace in Management subscription
  • Diagnostic settings from other subscriptions can send logs here

Troubleshooting​

IssueRoot CauseRemediation
Workspace name already takenNames are globally uniqueChoose a different name or check for soft-deleted workspace
Data not appearingDiagnostic settings not configuredConfigure diagnostic settings on source resources
Retention change not appliedUI cachingRefresh portal; verify via CLI
Cost unexpectedly highHigh data ingestion volumeReview data collection rules and reduce unnecessary tables


Alternatives​

The procedures in this task use the methods shown in the tabs above. The toolkit is PowerShell 7 only and has no Bash scripts. A few tasks that act on Azure also have an Azure CLI script written in PowerShell. The script status page of the toolkit lists which task has which script.

PreviousUpNext
Task 08: Arc GatewayManual Deployment IndexTask 10: Key Vault

Version Control

  • Created: 2025-09-15 by Hybrid Cloud Solutions
  • Last Updated: 2026-03-03 by Hybrid Cloud Solutions
  • Version: 4.0.0
  • Tags: azure-local, log-analytics, monitoring, observability
  • Keywords: Log Analytics, Azure Monitor, workspace, logging, diagnostics, retention
  • Author: Hybrid Cloud Solutions

Version Control​

VersionDateAuthorChanges
1.0.02025-03-25Azure Local CloudInitial release