Azure Monitor Workbooks are interactive reports that can combine data from multiple sources (Log Analytics, Azure Resource Graph, Azure Monitor Metrics, and Cost Management) into a single view. For teams that want to correlate cost trends with operational data, Workbooks provide more flexibility than the built-in Cost Management dashboards.
This post walks through building a cost visibility Workbook that surfaces resource group spend, Log Analytics ingestion costs, and a resource inventory, all consolidated in a single view.
1. Creating a New Workbook
- Navigate to Azure Monitor > Workbooks
- Select + New
- The Workbook opens in edit mode with an empty canvas
- Select Add > Add text to add a title and description section at the top
Workbooks are saved to a Log Analytics workspace or an Application Insights resource. Save early by selecting the Save icon and choosing a workspace, name, and category. Using the category Cost Management keeps cost-related workbooks discoverable.
2. Adding a Cost by Resource Group Tile
The first tile will show monthly spend by resource group using Azure Resource Graph, which supports querying billing data at scale.
- Select Add > Add query
- Set Data source to Azure Resource Graph
- Enter the following query:
resourcecontainers
| where type == "microsoft.resources/subscriptions/resourcegroups"
| project resourceGroup = name, subscriptionId
For cost data specifically, add a Log Analytics query tile pointing to your workspace and use the AzureActivity or custom cost export data if you have ingested exports into Log Analytics.
Alternatively, use the Add > Add metric option to embed a Cost Management view directly as an iframe tile within the Workbook.
3. Adding a Log Analytics Ingestion Tile
- Select Add > Add query
- Set Data source to Logs and select your Log Analytics workspace
- Enter the following query to show daily ingestion volume by data type:
Usage
| where TimeGenerated > ago(30d)
| summarize TotalGB = sum(Quantity) / 1024 by DataType, bin(TimeGenerated, 1d)
| order by TimeGenerated desc
- Set the Visualisation to Bar chart
- Set Size to Large
This tile gives a continuous view of which log sources are driving workspace cost, updated each time the Workbook is opened.
4. Adding a Resource Inventory Table
A resource inventory table helps identify resources that may be idle or oversized. Following is a Resource Graph query that lists all VMs with their size and location:
resources
| where type == "microsoft.compute/virtualmachines"
| project name, resourceGroup, location, vmSize = properties.hardwareProfile.vmSize, powerState = properties.extended.instanceView.powerState.displayStatus
| order by resourceGroup asc
Add this as a Grid visualisation tile. Columns can be formatted using the Column settings to highlight VMs in a stopped or deallocated state for follow-up.
5. Sharing the Workbook
Once the Workbook is complete, it can be shared in several ways:
- Pin to Azure Dashboard — select any tile and use the pin icon to add it to a shared dashboard
- Share link — Workbooks generate a direct URL accessible to anyone with the appropriate RBAC role
- Export as ARM template — allows the Workbook to be deployed consistently across multiple subscriptions via Infrastructure as Code
Navigate to the Workbook's toolbar and select Share to access these options.
Summary
Azure Monitor Workbooks provide a flexible canvas for combining cost, performance, and inventory data that would otherwise require switching between multiple portal blades. Building a shared cost visibility Workbook gives teams a consistent, always-current view of the metrics that matter most for cost governance.