Add Azure Monitor Health Model as Bicep module#3064
Conversation
bfd252f to
9900d35
Compare
Adds a health model (Microsoft.CloudHealth/healthModels) that deploys
alongside the existing infrastructure via azd. The module:
- Creates a dedicated managed identity with Monitoring Reader + Reader roles
- Organizes entities by use case: RAG Chat, Document Ingestion, Platform, Observability
- Conditionally creates entities based on deployment flags (deploymentTarget,
deployAzureOpenAi, useApplicationInsights, useSpeechOutputAzure, etc.)
- Includes 31 signal definitions covering:
- OpenAI: availability, latency, throttle, tokens (input/output split),
client errors (context-too-long), rate limiting, content policy blocks
- App Performance: failed requests, exceptions, response time,
dependency failures, dependency duration
- Search: latency, QPS, throttle, documents processed, index storage
- Container Apps: CPU%, memory%, restarts, request volume
- Storage: transactions, latency
- Document Intelligence: success rate, latency, errors, pages processed
- Platform: ACA ingress CPU
- Observability: telemetry trace volume
- Computes canvas layout positions with Bicep arithmetic (no overlaps)
- All resource IDs parameterized, no hardcoded subscriptions or names
Files changed:
infra/core/monitor/health-model.bicep (new)
infra/main.bicep (module call + useHealthModel param)
infra/main.parameters.json (AZURE_USE_HEALTH_MODEL env var)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9900d35 to
3e6493f
Compare
…del Bicep module Signed-off-by: Andre Bossard <anbossar@microsoft.com>
|
@abossard Is there an AVM module for it? We prefer AVM modules now when possible, to avoid adding infra bloat to this repo itself. And are there restrictions for region, Azure account type (free trial), etc? |
|
There's no AVM module, but that's good info. It currently is in public preview and in limited regions. I'll check what account types are supported. Thanks! |
|
Then it needs to be default-off in main.parameters.json, otherwise it would break most deploys, no? |
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
…ard/azure-search-openai-demo into feature/health-model-bicep
Check Country Locale in URLsWe have automatically detected added country locale to URLs in your files. Check the file paths and associated URLs inside them.
|
Check Country Locale in URLsWe have automatically detected added country locale to URLs in your files. Check the file paths and associated URLs inside them.
|
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
…ard/azure-search-openai-demo into feature/health-model-bicep
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
|
Hi @pamelafox
|
|
I merged a fix for this issue in #3147 "The azd provision command has a pre-existing template validation issue (duplicate resource group names) unrelated to this change. Direct az deployment group create works." |
Remove trailing whitespace (MD009) and add single trailing newline (MD047). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds an Azure Monitor Health Model (Microsoft.CloudHealth/healthModels) to the infra deployment as a Bicep module, wiring it into the main template behind a feature flag and documenting how to enable/configure it via azd environment variables.
Changes:
- Introduces
infra/core/monitor/health-model.bicepdefining the health model, managed identity, role assignments, signal definitions, entities, and relationships. - Wires the module into
infra/main.bicepbehinduseHealthModeland adds parameters/env-var mappings for enablement and location. - Updates deployment docs and CI pipelines to pass through
AZURE_USE_HEALTH_MODELandAZURE_HEALTH_MODEL_LOCATION.
Show a summary per file
| File | Description |
|---|---|
| infra/main.parameters.json | Adds useHealthModel and healthModelLocation parameter mappings to azd env vars. |
| infra/main.bicep | Adds health model parameters and deploys the new health model module conditionally. |
| infra/core/monitor/health-model.bicep | New module implementing the Azure Monitor Health Model resource hierarchy, signals, and identity/roles. |
| docs/deploy_features.md | Documents how to enable Health Models and how to pick a supported region. |
| .github/workflows/azure-dev.yml | Passes health model env vars through GitHub Actions workflow. |
| .azdo/pipelines/azure-dev.yml | Passes health model env vars through Azure DevOps pipeline. |
Review details
- Files reviewed: 6/7 changed files
- Comments generated: 2
- Review effort level: Low
The App Service backend entity variant (entityBackendComputeAppSvc) was missing canvasPosition, causing it to render at a default/overlapping location on App Service deploys. Use the same computed position as the Container Apps variant so the canvas layout is consistent. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Shift entityAiInference X offset to slot 2+(useApplicationInsights?1:0) so it no longer overlaps the first Document Ingestion leaf when App Insights is not deployed. Also fix 'role are assigned' -> 'roles are assigned' and comment indentation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>






What this does
Adds a health model (
Microsoft.CloudHealth/healthModels) that deploys alongside the existing infrastructure. It gives you a single-pane view of application health in the Azure portal, organized by use case.It will help you to quickly figure out if things are not working.
Entity hierarchy
How it works
deployAzureOpenAi,useApplicationInsights,useSpeechOutputAzure, etc.).availabilityResults(requires configured tests), noEnvCoresQuotaUtilization(doesn't emit on Consumption plan).useHealthModelparam (default: false). SetAZURE_USE_HEALTH_MODEL=trueto enable.Notes
Microsoft.CloudHealth/healthModels@2026-01-01-preview(preview API)azd provisioncommand has a pre-existing template validation issue (duplicate resource group names) unrelated to this change. Directaz deployment group createworks.