Cloudwatch alarm on Workspace health


I have a cloudwatch alarm that alerts if any workspace in a given directory has status change to unhealthy. It works fine but I am looking for a way to have the workspace ID, username or machine name added to the alert.

If it was possible to search the workspace list in the gui for status, this would be just as well but it's not. Also if it was possible to sort the whole workspace list in the gui, this would work well but is not an option. You can only sort one page at a time. Thanks

2 Answers
Accepted Answer

You can modify your CloudWatch alarm to include the workspace ID, username, or machine name in the alert by using CloudWatch Alarms with Metric Filters and CloudWatch Logs.

Here are the steps you can follow:

Enable Amazon WorkSpaces logging: To enable Amazon WorkSpaces logging, you need to create a CloudWatch Logs group and a log stream for your Amazon WorkSpaces. You can follow the instructions provided in the AWS documentation to set up logging for your Amazon WorkSpaces.

Create a CloudWatch Logs Metric Filter: Once you have set up logging for your Amazon WorkSpaces, you can create a CloudWatch Logs Metric Filter to extract the workspace ID, username, or machine name from the log messages generated by your Amazon WorkSpaces. You can use filter patterns to extract specific fields from the logs.

Create a CloudWatch alarm with the Metric Filter: After you have created a Metric Filter, you can create a CloudWatch alarm and select the Metric Filter as the source for your alarm. In the alarm configuration, you can customize the message that will be sent when the alarm is triggered to include the workspace ID, username, or machine name.

By following these steps, you can customize the alert message to include the relevant information about the Amazon WorkSpaces that triggered the alarm.

answered 19 days ago

I can graph and see Unhealthy/Healthy/InLatency machine counts etc but I don't know how to query or filter to get the information I needed sent with the alarm message. I currently get an alert if unhealthy machines > 0. I can filter results by workspace ID but I don't want to filter them, I want so send the name of the workspaceID that's in alarm status. I know I am missing something or in the wrong place.

answered 19 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions