Workbooks & Dashboards
Overview
Azure Monitor Workbooks provide a flexible canvas for creating rich, interactive reports from your telemetry data. Unlike static dashboards, workbooks support parameterized queries, conditional visibility, and multiple visualization types — making them ideal for operational and business reporting.
Workbooks vs Azure Dashboards
| Feature | Workbooks | Azure Dashboards |
|---|---|---|
| Interactivity | Parameters, drill-down, conditional sections | Static tiles |
| Data sources | KQL, Metrics, Resource Graph, custom endpoints | Limited to pinned charts |
| Sharing | Shared via resource group or gallery | Shared via portal |
| Complexity | Rich multi-step reports | Quick overview panels |
| Best for | Investigation, reporting, runbooks | At-a-glance monitoring |
Creating a Workbook
- Navigate to Azure Monitor → Workbooks (or Application Insights → Workbooks)
- Click + New
- Add steps: text, queries, metrics, parameters, links
Query Steps
A query step runs KQL and renders results as a visualization:
requests
| where timestamp > {TimeRange:start} and timestamp < {TimeRange:end}
| summarize
avgDuration = avg(duration),
p95Duration = percentile(duration, 95),
requestCount = count(),
failureRate = countif(success == false) * 100.0 / count()
by bin(timestamp, {TimeRange:grain})
| order by timestamp asc
Visualization Types
- Table — Raw data with sorting and filtering
- Time chart — Line/area chart over time
- Bar chart — Categorical comparisons
- Scatter — Correlation between two metrics
- Tiles / Heatmap — Summary KPIs
- Map — Geographic distribution
- Graph — Network/topology visualization
Parameters
Parameters make workbooks interactive and reusable:
Time Range Parameter
{
"type": "time",
"name": "TimeRange",
"defaultValue": "Last 24 hours"
}
Use in queries: {TimeRange:start}, {TimeRange:end}, {TimeRange:grain}
Dropdown Parameter (from query)
// Parameter query — populates a dropdown
requests
| distinct name
| order by name asc
Reference in subsequent queries:
requests
| where timestamp > {TimeRange:start}
| where name == "{Endpoint}"
| summarize count() by resultCode
Resource Parameter
Lets users select which Application Insights resource to query — useful for multi-environment workbooks.
Conditional Visibility
Show or hide sections based on parameter values:
{
"conditionalVisibility": {
"parameterName": "ShowDetails",
"comparison": "isEqualTo",
"value": "Yes"
}
}
Common Workbook Patterns
Service Health Overview
// Availability by endpoint
requests
| where timestamp > {TimeRange:start}
| summarize
availability = countif(success == true) * 100.0 / count(),
avgLatency = avg(duration),
totalRequests = count()
by name
| order by availability asc
Dependency Performance Matrix
dependencies
| where timestamp > {TimeRange:start}
| summarize
calls = count(),
failures = countif(success == false),
avgDuration = avg(duration),
p95 = percentile(duration, 95)
by target, type
| extend failRate = round(failures * 100.0 / calls, 1)
| order by failRate desc
Error Investigation Drill-Down
Step 1 — Show error summary (table with row selection):
exceptions
| where timestamp > {TimeRange:start}
| summarize count() by type, outerMessage
| order by count_ desc
Step 2 — Show details for selected error (linked to row selection):
exceptions
| where timestamp > {TimeRange:start}
| where type == "{ErrorType}"
| project timestamp, operation_Id, details
| take 20
Sharing and Templates
Gallery Templates
Azure provides built-in workbook templates:
- Failure Analysis — Error breakdown and trends
- Performance — Response time percentiles
- Usage — User sessions and page views
- Reliability — SLA tracking
Exporting as ARM Template
# Export workbook as ARM template for IaC
az monitor app-insights workbook show \
--resource-group myRG \
--name "my-workbook-id" \
--query "serializedData"
Sharing Options
- Private — Only you can see it
- Shared — Saved to the resource group, visible to anyone with access
- Gallery — Published as a template others can instantiate
Programmatic Workbook Creation (Bicep)
resource workbook 'Microsoft.Insights/workbooks@2022-04-01' = {
name: guid('service-health-workbook')
location: resourceGroup().location
kind: 'shared'
properties: {
displayName: 'Service Health Overview'
category: 'workbook'
serializedData: loadTextContent('workbook-template.json')
sourceId: appInsights.id
}
}
Best Practices
- Use parameters for time range — Never hardcode
ago(24h)in workbook queries - Set appropriate grain — Match time bucket to the selected range (
{TimeRange:grain}) - Limit query results — Use
takeortopto prevent slow-loading workbooks - Use tiles for KPIs — Show key numbers (availability %, error count) at the top
- Link workbooks to alerts — Include a workbook link in alert action group emails
- Version control templates — Export workbook JSON and store in Git
- Use conditional sections — Hide detail panels until the user drills down
- Test with different time ranges — Ensure queries perform well for 7d and 30d ranges
Azure Dashboard Integration
Pin workbook visualizations to Azure Dashboards for a quick-glance view:
- Open the workbook
- Click the pin icon on any visualization
- Select the target dashboard
- The pinned tile updates automatically
Key Takeaways
- Workbooks are the richest reporting tool in Azure Monitor
- Parameters make workbooks interactive and reusable across environments
- Use drill-down patterns (summary → detail) for investigation workflows
- Export workbook templates as JSON/ARM for version control and IaC
- Combine workbooks with dashboards: workbooks for depth, dashboards for breadth
- Built-in gallery templates cover common scenarios out of the box