az-scout-plugin-odcr-coverage
An az-scout plugin that analyses On-Demand Capacity Reservation (ODCR) coverage for Azure VMs.
Identifies VMs at risk of allocation failure by combining VM inventory, Activity Log allocation events, and existing ODCR utilization — then classifies each VM by risk level.
Features
- Risk classification — critical (past allocation failures), high (always-on without ODCR), medium, low, covered
- Allocation event timeline — start/deallocate/failed events from Activity Log with configurable lookback (3–30 days)
- ODCR utilization — reserved capacity, used/unused counts per reservation group
- Multi-subscription — analyse across multiple subscriptions with incremental rendering and progress bar
- SSE streaming — two-phase analysis: VMs load instantly, Activity Log events stream page-by-page with day-based progress
- VM detail modal — click any VM row to see risk profile, allocation summary, and event timeline
- Cross-highlighting — hover an ODCR card to highlight associated VMs, and vice versa
- Azure Portal links — direct links to each VM in the Azure Portal
- MCP tools — three tools with tiered performance for AI agents:
get_odcr_coverage_summary— fast overview (no Activity Log)get_odcr_vm_allocation_history— drill-down for specific VMsget_odcr_coverage— full analysis with allocation events
- Chat mode — "ODCR Advisor" with tool selection guidance
- Caching — VM list (5 min), capacity reservations (5 min), activity log (10 min)
Installation
pip install az-scout-plugin-odcr-coverage
# or
uv pip install az-scout-plugin-odcr-coverage
Restart az-scout — the plugin is discovered automatically.
MCP Tools
| Tool | Parameters | Description |
|---|---|---|
get_odcr_coverage_summary |
region, subscription_id, tenant_id? |
Fast ODCR overview — VMs + utilization, no Activity Log |
get_odcr_vm_allocation_history |
region, subscription_id, vm_names, lookback_days? (7), uptime_threshold? (90), tenant_id? |
Allocation events + accurate risk for specific VMs |
get_odcr_coverage |
region, subscription_id, lookback_days? (7), uptime_threshold? (90), tenant_id? |
Full analysis with per-VM allocation history |
RBAC Requirements
| Role | Why |
|---|---|
| Reader | List VMs (via ARG), Capacity Reservation Groups |
| Reader or Monitoring Reader | Activity Log queries |
Setup
uv pip install az-scout-plugin-odcr-coverage
az-scout # plugin is auto-discovered
For development:
git clone https://github.com/az-scout/az-scout-plugin-odcr-coverage
cd az-scout-plugin-odcr-coverage
uv sync --group dev
uv pip install -e .
az-scout # plugin is auto-discovered
Structure
az-scout-plugin-odcr-coverage/
├── .github/
│ ├── copilot-instructions.md # Copilot context for this plugin
│ └── workflows/
│ └── ci.yml # CI pipeline (lint + test, Python 3.11–3.13)
├── pyproject.toml
├── README.md
└── src/
└── az_scout_odcr_coverage/
├── __init__.py # Plugin class + module-level `plugin` instance
├── routes.py # FastAPI APIRouter (optional)
├── tools.py # MCP tool functions (optional)
└── static/
├── css/
│ └── odcr-coverage.css # Plugin styles (auto-loaded via css_entry)
├── html/
│ └── odcr-coverage-tab.html # HTML fragment (fetched by JS at runtime)
└── js/
└── odcr-coverage-tab.js # Tab UI logic (auto-loaded via js_entry)
How it works
- The plugin JS loads the HTML fragment into
#plugin-tab-odcr-coverage. - It listens to
azscout:*context events from the core app. - When tenant and region are set, it fetches subscriptions from
/api/subscriptions. - The user picks subscriptions and clicks Analyse.
- For each subscription, an SSE stream (
GET /plugins/odcr-coverage/coverage/stream) delivers results in two phases:- Phase 1 — VMs and ODCR utilization load instantly via Azure Resource Graph.
- Phase 2 — Activity Log events stream page-by-page, progressively enriching VM risk levels and allocation stats. Progress is displayed as days covered (e.g. "events 12/30d").
- The table, summary cards, and risk bar update incrementally as data arrives.
Quality checks
uv run ruff check src/ tests/
uv run ruff format --check src/ tests/
uv run mypy src/
uv run pytest
Copilot support
The .github/copilot-instructions.md file provides context to GitHub Copilot about
the plugin structure, conventions, and az-scout plugin API.
License
Disclaimer
This tool is not affiliated with Microsoft. All capacity, pricing, and availability information is indicative and not a guarantee of deployment success. Values are dynamic and may change between planning and actual deployment. Always validate in official Microsoft sources and in your target tenant/subscription.
Metadata
Release files for az-scout-plugin-odcr-coverage 2026.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| az_scout_plugin_odcr_coverage-2026.8.0.tar.gz | 138.1 kB | With provenance | Details for az_scout_plugin_odcr_coverage-2026.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| az_scout_plugin_odcr_coverage-2026.8.0-py3-none-any.whl | Python 3 | none | any | Details for az_scout_plugin_odcr_coverage-2026.8.0-py3-none-any.whl |
Total release size: 168.7 kB
Release files / az_scout_plugin_odcr_coverage-2026.8.0.tar.gz
| Download URL | az_scout_plugin_odcr_coverage-2026.8.0.tar.gz |
|---|---|
| Size | 138.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ec0f398136d5232c7591485f0189e1cbaa71c7933e18c7cca36d9b1d6b903b4
|
|
BLAKE2b-256 checksum How to use checksums |
37defc59b55352024b6a34d087455d87d7b8e9e6f0d868c7c10a164ca09f9775
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.
Transparency logRelease files / az_scout_plugin_odcr_coverage-2026.8.0-py3-none-any.whl
| Download URL | az_scout_plugin_odcr_coverage-2026.8.0-py3-none-any.whl |
|---|---|
| Size | 30.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ede16b32f06364c7ad7bb6676d8f350d9b72e498969e6f5217891cea6f8f8b8c
|
|
BLAKE2b-256 checksum How to use checksums |
dec747ab0cf30f57e412e49a41b94a54632933b68e4f89639978cc3a2599c7cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.
Transparency logSecurity for az-scout-plugin-odcr-coverage 2026.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for az_scout_plugin_odcr_coverage-2026.8.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.