[ad_1]
Amazon WorkSpaces provides different options to monitor the service usage for your workload. These available metrics offer different ways to monitor your WorkSpaces connections. These metrics are all emitted at the service level, so granular in-session metrics are not available. With WorkSpaces Streaming Protocol (WSP) adopting NICE DCV as its desktop streaming mechanism, customers unlock an array of session metrics provided by DCV. Customers leverage these DCV metrics to build custom WSP WorkSpaces in-session usage reports. These reports provide the same reporting for any WorkSpaces client the user is accessing with.
In this blog, you deploy a PowerShell script to generate granular WSP usage reports for Windows users. The report is invoked by Windows Task Scheduler on a schedule. The report generated by the script is a daily CSV file that tracks each user WSP session with exact times the user connects and disconnects. The script calculates the total time of each session so administrators have visibility into how long and when the user was connected. The walkthrough of this blog will illustrate how to deploy the reporting on a single WorkSpace. For details on how to build onto the report and how to apply it throughout your environment, see the Conclusion section.
To follow this blog, you need to have a deployed WSP WorkSpace running a Windows-based operating system. On this WorkSpace, you will need to have administrator rights to the operating system. These administrator rights are delegated through Active Directory or the WorkSpaces service.
In this step, you create a PowerShell script that is invoked to generate the usage reports locally on the WorkSpace.
In this step, you will create a local scheduled task to routinely invoke the script. For this walkthrough, the task is created locally on a single machine. See the Conclusion section on how to scale this to your entire WorkSpaces environment.
-noprofile -ExecutionPolicy Unrestricted -file "C:\ProgramData\Amazon\WSP\UsageReports\Build-WSPUsageReports.ps1" -usageReportsFolder "C:\ProgramData\Amazon\WSP\UsageReports"
-usageReportsFolder
can be modified to a different reporting storage location.In this step, you validate that your reporting task is being invoked properly. To test the functionality, you will login and logout to generate session inputs to the reporting. If you do not see the reports generating, Task Scheduler will provide an error code when it fails. Running the script manually in PowerShell is an additional troubleshooting step.
By following this blog, you did not incur any additional costs. The reporting mechanism does use a small amount of disk space on the WorkSpace. To cleanup your WorkSpace, delete the scheduled task and the UsageReports folder.
In this walkthrough, you utilized DCV metrics on a WSP WorkSpace to generate a custom usage report. The provided script can act as a foundation to build additional reporting within the report. For instance, you can capture the applications the user opens or lock screen events, since a locked screen does not disconnect the session. All of the interactions to create the report rely on DCV and the Windows operating system.
The reporting you implemented during this walkthrough was on a single WorkSpace. If you plan to apply this reporting to all of your WorkSpaces, you may enforce the reporting via GPOs. The two GPOs you will need to apply are:
With the walkthrough, the usage reports are stored locally on the WorkSpace. In a production scenario, it is simpler to handle the reports if they are consolidated to a single location, like a network file share. Once consolidated, the reports can be ingested into a log analysis platform. For example, the logs can be ingested into Amazon QuickSight to get a visual representation of the log results. If you have questions or requests for the provided script, you can open issues on the dcv-samples Github repository.
Andrew came to AWS in 2019 from a large datacenter environment where he specialized in VMware, Cisco UCS, and automation. Through his time at AWS, he developed a passion for visualization workloads. In 2022, he started his current role as a Sr. Developer Advocate for DCV. |
[ad_2]
Original article Source link