Desktop and Application Streaming
Creating custom Amazon CloudWatch dashboards and widgets for Amazon WorkSpaces
Customers often ask how to gain additional insights into their Amazon WorkSpaces operating system resource utilization, such as CPU utilization and memory consumption. In addition, they want to use these metrics with Amazon CloudWatch dimensions to dive into trends and compare WorkSpaces instances. In a previous blog, we highlighted how to use CloudWatch to understand how users are connecting to WorkSpaces. In this article, you will learn how to build 6 widgets in CloudWatch to gain additional insight into WorkSpace instance health.
Dashboard examples include:
- Top 10 WorkSpaces by CPU Usage
- Top 10 WorkSpaces by Memory Usage
- Top 10 WorkSpaces by Packet Loss
- CPU Usage by compute Type
- CPU Usage by bundleId
- Data table for CPU Utilization
Walkthrough
Time to read | 20 minutes |
Time to complete | 30 minutes |
Cost to complete | Detailed cost information on CloudWatch can be found at: Amazon CloudWatch Pricing – Amazon Web Services (AWS) |
Learning level | 300 |
Services used |
Top 10 WorkSpaces based on CPU Utilization
In this step, you will create a dashboard showing the top 10 WorkSpaces based on CPU utilization.
- Open the CloudWatch Console.
- Choose Dashboards from the navigation menu.
- On the Custom dashboards tab, select Create dashboard.
- For Dashboard name, enter
WorkSpacesInformation
. - Choose Create dashboard.
- Under Data sources types, select CloudWatch, choose Metrics for the Data type, and choose Bar for Widget type.
- Choose Next.
- On the Browse tab, select WorkSpaces.
- Navigate to the Multi source query tab.
- Under CloudWatch Metric Insights – query builder, for the Namespace enter
AWS/WorkSpaces
. - For Metric name, select AVG then AVG(CPUUsage).
- For Group by, select WorkspaceId.
- For Order by, select AVG() then AVG(DESC).
- For Limit, select 10.
- Choose Graph query.
- Choose Rename graph (pencil icon) on the widget title and enter Top 10 WorkSpaces by CPU utilization, and choose Apply.
- Choose Create widget.
- Choose Save.
Top 10 WorkSpaces Based on memory utilization
In this step, you will create a dashboard showing the top 10 WorkSpaces based on memory utilization.
- Open the CloudWatch Console.
- Choose Dashboards from the navigation menu.
- Open the WorkSpaceInformation Dashboard, choose + (Add Widget).
- Under Data sources types, select CloudWatch, choose Metrics for the Data type, and choose Bar for Widget type.
- Choose Next.
- On the Browse tab, select WorkSpaces.
- Navigate to the Multi source query tab.
- Under CloudWatch Metric Insights – query builder, for the Namespace enter
AWS/WorkSpaces
. - For Metric name, select AVG then AVG(MemoryUsage).
- For Group by, select WorkspaceId.
- For Order by, select AVG() then AVG(DESC).
- For Limit, select 10.
- Choose Graph query.
- Choose Rename graph (pencil icon) on the widget title and enter Top 10 WorkSpaces by memory utilization, and choose Apply.
- Choose Create widget.
- Choose Save.
Top 10 WorkSpaces by packet loss rate
In this step, you will create a dashboard showing the top 10 WorkSpaces based on packet loss rate.
- Open the CloudWatch Console.
- Choose Dashboards from the navigation menu.
- Open the WorkSpaceInformation Dashboard, choose + (Add Widget).
- Under Data sources types, select CloudWatch, choose Metrics for the Data type, and choose Bar for Widget type.
- Choose Next.
- On the Browse tab, select WorkSpaces.
- Navigate to the Multi source query tab.
- Under CloudWatch Metric Insights – query builder, for the Namespace enter
AWS/WorkSpaces
. - For Metric name, select AVG then AVG(UDPPacketLossRate).
- For Group by, select WorkspaceId.
- For Order by, select AVG() then AVG(DESC).
- For Limit, select 10.
- Choose Graph query.
- Choose Rename graph (pencil icon) on the widget title and enter Top 10 WorkSpaces by packet loss rate, and choose Apply.
- Choose Create widget.
- Choose Save.
Average CPU by instance type
In this step, you will create a dashboard showing the average CPU grouped by instance type.
- Open the CloudWatch Console.
- Choose Dashboards from the navigation menu.
- Open the WorkSpaceInformation Dashboard, choose + (Add Widget).
- Under Data sources types, select CloudWatch, choose Metrics for the Data type, and choose Bar for Widget type.
- Choose Next.
- On the Browse tab, select WorkSpaces.
- Navigate to the Multi source query tab.
- Under CloudWatch Metric Insights – query builder, for the Namespace enter
AWS/WorkSpaces
. - For Metric name, select AVG then AVG(CPUUsage).
- For Group by, select ComputeType.
- For Order by, select AVG() then AVG(DESC).
- For Limit, select 10.
- Choose Graph query.
- Choose Rename graph (pencil icon) on the widget title and enter Average CPU by instance type, and choose Apply.
- Choose Create widget.
- Choose Save.
Average CPU by BundleId
In this step, you will create a dashboard showing the average CPU for WorkSpaces based on their bundleId.
- Open the CloudWatch Console.
- Choose Dashboards from the navigation menu.
- Open the WorkSpaceInformation Dashboard, choose + (Add Widget).
- Under Data sources types, select CloudWatch, choose Metrics for the Data type, and choose Bar for Widget type.
- Choose Next.
- On the Browse tab, select WorkSpaces.
- Navigate to the Multi source query tab.
- Under CloudWatch Metric Insights – query builder, for the Namespace enter
AWS/WorkSpaces
. - For Metric name, select AVG then AVG(CPUUsage).
- For Group by, select BundleId.
- For Order by, select AVG() then AVG(DESC).
- For Limit, select 10.
- Choose Graph query.
- Choose Rename graph (pencil icon) on the widget title and enter Average CPU by BundleId, and choose Apply.
- Choose Create widget.
- Choose Save.
Create a Data table for CPU Utilization by each WorkSpace
In this step you will create a widget to show the CPU for each WorkSpace over time.
- Open the CloudWatch Console.
- Choose Dashboards from the navigation menu.
- Open the WorkSpaceInformation Dashboard, choose + (Add Widget).
- Under Data sources types, select CloudWatch, choose Metrics for the Data type, and choose Data table for Widget type.
- Choose Next.
- On the Browse tab, select WorkSpaces.
- Navigate to the Multi source query tab.
- Under CloudWatch Metric Insights – query builder, for the Namespace enter
AWS/WorkSpaces
. - For Metric name, select AVG then AVG(CPUUsage).
- For Group by, select WorkspaceId.
- For Order by, selectAVG() then AVG(DESC).
- For Limit, select 10.
- Choose Graph query.
- Choose Rename graph (pencil icon) on the widget title and enter WorkSpaces data points over time, and choose Apply.
- Choose Create widget.
- Choose Save.
Conclusion
In this post, you created widgets to provide insight into WorkSpaces resource utilization; CPU usage, memory consumption, and packet loss. These widgets can be further customized to provide additional insight into the user experience connecting to WorkSpaces. For more information on CloudWatch Logs, review the guide on Amazon CloudWatch Logs. For more information on CloudWatch dashboards, review the guide on using Amazon CloudWatch dashboards.
Dave Jaskie is a Senior AWS End User Compute Solutions Architect, bringing 15 years of experience in the end-user computing space. Outside of work, Dave enjoys traveling and hiking with his wife and 3 kids. | |
Aamir Khan, a seasoned Senior Technical Program Manager within the End User Computing Product team, boasts 12 years of industry expertise. Guided by a customer-first approach, his work methodology sets a standard. Beyond the professional realm, Aamir finds joy in family moments and indulges in occasional off-road escapades on his LC-100 series, exploring the wonders of the Pacific Northwest. | |
Mehrdad Montazeri is a Senior Software Developer with 6+ years experience in Cloud Desktop Visualization and lots of contribution from deep in protocols, platforms and development stacks to users interfaces and clients. When not working, he enjoys being in the sky and flying with different types of planes such as gliders, para-gliders and small planes. . |