A PowerShell based collector to get metrics from a Citrix XenDesktop instance and format
them in a way they can be digested by the windows_exporter for Prometheus using its
textfile collector.
- Copy the entire directory to a suitable place, e.g.
C:\Tools\citrix-collector\may be a good location. - Make sure to have the Citrix Broker PowerShell snap-in installed. You can find it
in the CVAD installation ISO in the
\x64\Citrix Desktop Delivery Controller\folder. Just extractBroker_PowerShellSnapIn_x64.msifrom the ISO (the other snap-ins are not required) and install it viamsiexec.exe /i. - Download the WinSW executable and place it inside the
citrix-collectorfolder, rename it towinsw.exe. - Copy
winsw-example.xmltowinsw.xmland adjust if necessary. Most likely you'll want to uncomment the<serviceaccount>section and set the account used for running the service. Please note that the account needs to have appropriate permissions to query the Delivery Controller for collecting the metrics. - Run
.\winsw.exe installin the collector directory to register the service. - Make sure the target location (
textfile_inputs) has its permission set in a way so the account used to run the service is allowed to write there (or at least the configured output file). - Finally run
Start-Service citrix_collectorto start it. - Watch the log files and / or the generated Prometheus textfile.