Here’s a detailed step-by-step guide on how to create an Azure Monitor Workbook to visualize session data for an Azure Virtual Desktop (AVD) host pool:
Step 1: Access Azure Monitor Workbooks
- Log in to the Azure portal.
- In the search bar at the top, type Monitor and select Monitor.
- In the Monitor blade, go to the Workbooks section under Insights.
Step 2: Create a New Workbook
- Click + New to start creating a new workbook.
- A blank workbook canvas will appear.
Step 3: Add a Query to Retrieve Session Data
- Click Add > Query.
- Select the Log Analytics Workspace that is linked to your AVD diagnostics.
- Enter the following query to retrieve session data:
WVDConnections | where TimeGenerated > ago(24h) | summarize ActiveSessions = count() by bin(TimeGenerated, 1h) | order by TimeGenerated asc- Explanation:
WVDConnections: This table logs AVD session data.where TimeGenerated > ago(24h): Filters data for the last 24 hours.summarize ActiveSessions: Counts active sessions, grouped by 1-hour intervals.order by TimeGenerated: Ensures the data is displayed in chronological order.
- Explanation:
- Click Run Query to see the results.
Step 4: Visualize the Data
- After running the query, click Visualization Settings in the query editor.
- Choose the type of visualization:
- For trends: Select Line Chart.
- For summary stats: Select Bar Chart or Grid.
- Configure the x-axis and y-axis:
- Set the x-axis to
TimeGenerated. - Set the y-axis to
ActiveSessions.
- Set the x-axis to
- Apply and save the visualization.
Step 5: Customize the Workbook Layout
- Add additional components to the workbook by clicking Add and selecting from:
- Query: To add more queries for other metrics (e.g., session failures, logins).
- Text: To include titles, descriptions, or instructions for your workbook.
- Metrics: To display real-time metrics like “Total Sessions.”
- Use Drag & Drop to arrange components in your desired layout.
Step 6: Save the Workbook
- Click Save at the top of the workbook editor.
- Enter a Name and Description for your workbook (e.g., “AVD Session Monitoring”).
- Choose a Category (e.g., “Shared Reports”) and click OK.
Step 7: Share the Workbook
- To share your workbook with others:
- Go to the Workbooks section in Azure Monitor.
- Select your saved workbook.
- Click Share and configure access permissions (e.g., share with specific users or groups).
- Alternatively, embed the workbook in an Azure dashboard:
- Open the workbook and click Pin to dashboard.
Step 8: Add Alerts (Optional)
You can add alerts for specific thresholds directly from your workbook:
- In the workbook query, define conditions (e.g.,
ActiveSessions > 100). - Use the Alerts option in Azure Monitor to trigger notifications based on query results.
Step 9: Automate Workbook Updates
To keep your workbook updated with the latest session data:
- Azure Workbooks refresh automatically based on data updates in the Log Analytics Workspace.
- Ensure that diagnostics settings for AVD are correctly forwarding logs to the workspace.
Step 10: Additional Enhancements
- Add Filters:
- Click Add Parameter to create dropdowns or filters (e.g., filter by host pool or user).
- Use parameters to refine queries dynamically.
- Combine Metrics:
- Use multiple queries in the same workbook to display related metrics (e.g., CPU/memory usage of session hosts alongside session counts).
- Integrate with Other Data Sources:
- If applicable, include metrics from other Azure services like load balancers, storage, or network performance.
This method provides a centralized and customizable view of AVD session data, perfect for 24-hour capacity monitoring and planning.