Skip to content

Add VM Insights V2 onboarding scenario with ARM and Bicep templates - #304

Open
Austin McCollum (austinmccollum) wants to merge 1 commit into
microsoft:masterfrom
austinmccollum:vmi-v2-onboarding-templates
Open

Add VM Insights V2 onboarding scenario with ARM and Bicep templates#304
Austin McCollum (austinmccollum) wants to merge 1 commit into
microsoft:masterfrom
austinmccollum:vmi-v2-onboarding-templates

Conversation

@austinmccollum

Copy link
Copy Markdown

Adds a new scenario with ARM and Bicep templates that onboard an existing Azure VM to VM Insights V2 in a single deployment, instead of running the agent install, DCR creation, and DCR association steps separately.

These templates are long (the ARM template is ~750 lines), so they live here rather than inline in Microsoft Learn. The Azure Monitor VM onboarding article will link to this folder.

What changed

  • New scenario folder Scenarios/How to onboard VMs to VM Insights V2/.
  • vmi-v2-onboard.json deploys at resource group scope and uses nested deployments so resources can land in different resource groups.
  • bicep/main.bicep is the equivalent modular implementation with nine resource modules. It sets targetScope = 'subscription' because its modules span resource groups.
  • Six parameter files in each format cover the standard (free) and per-process (paid) tiers, new versus existing AMW / Log Analytics / DCR, and optional alert rules.
  • README.md documents the scenarios, prerequisites, full parameter reference, deployed resources, and the eight recommended alert rules.

Scope

Onboards existing Azure virtual machines. Does not create the VM or resource groups, and does not cover scale sets or Arc-enabled servers.

Verified

  • All seven JSON files parse cleanly.
  • az bicep build on bicep/main.bicep succeeds (Bicep CLI 0.43.8).
  • One BCP037 warning on scheduledTransferPeriod is a Bicep type-definition gap, not a template defect. The property is valid on the DCR API and appears in the published Azure Monitor DCR samples.
  • .bicepparam deployment requires Azure CLI 2.53.0+ or Azure PowerShell 9.7.1+, per the Bicep parameters file documentation.
  • No credentials, subscription IDs, or tenant identifiers in any file.

Adds a parameterized ARM template and an equivalent modular Bicep
implementation that onboard an existing Azure VM to VM Insights V2 in a
single deployment. Covers managed identity, Azure Monitor workspace, Log
Analytics workspace, data collection rule and association, the Azure
Monitor Agent extension, and optional recommended alert rules.

Six parameter files cover the common standard and per-process scenarios
in both ARM and Bicep parameter formats.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 4a30eb2e-5701-4a75-bae0-489b7a8fb2b7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant