The first part of Citrix Monitoring that we’re going to focus on today is one of the first parts of any Citrix deployment or upgrade: Licensing. Citrix’s Operations/Monitoring Guide lists two things to monitor:
- Citrix Licensing Service
- Citrix Licensing WMI
This first service is Licensing; if this service isn’t running, Citrix Licensing isn’t working. The second service is interesting for our purposes today, but isn’t actually mandatory for Licensing to function. But let’s take a sidebar to talk about the Citrix Licensing WMI service for a bit.
The WMI service provides WMI access to licensing data. There’s a namespace (ROOT\CitrixLicensing) with a few classes (notably, Citrix_GT_License_Pool) that gives license usage and availability counts. However, this service has a nasty habit of malfunctioning if you upgrade from an old version of Licensing to a newer version without uninstalling and rebooting in between. So if you install this sensor and can’t get any license counts to work properly, the fix might be to uninstall Citrix Licensing, reboot, and then reinstall. The only way you’d ever notice this problem is if you attempted to get data out of the WMI service. The service appears to be running fine, but simply fails to return any data through WMI queries.
In addition to monitoring the two services recommended in the Operations Guide, it’s also useful to monitor license availability and usage. It’s great to have some warning that your XenDesktop deployment is refusing to allow new connections because you’ve exhausted your license pool. It’s even better to know it ahead of time. There are a bunch of scripts available on the Internet that perform basically this same function – they read data from the WMI namespace provided by the licensing service and give back some counts and percentages.
> Get-WmiObject -Class "Citrix_GT_License_Pool" -Namespace "ROOT\CitrixLicensing" -ComputerName "LicensingServer.domain.local"
The one big drawback to this method of monitoring is that you get what the Licensing Service calls a PLD, which is an abbreviated identifier for the various products that the License Service service monitors. These are largely intuitive for those of us that have gone through a few years of Citrix upgrades, but to anyone that doesn’t have some knowledge of Citrix product naming history (what is this “presentation server” you speak of?) and their licensing models, it may as well be pig latin. To mediate this somewhat, I’ve also rolled in a translation function that uses the database that the licensing service pulls from to convert the PLD back to the common names you can see in the Licensing Console.
Using PRTG for Monitoring your License Server
In our previous blog post (Citrix Monitoring Made Easy – Part 1) we show you how Lockstep-developed custom sensors for PRTG could be used for overall Citrix monitoring. If you’re not a PRTG user, you can download a trial version here and try our Citrix sensors out.
Download the attached code for the PRTG sensor that we’ve been installing for our clients to monitor your own Citrix Licensing. It has a few supporting files to do some neat tricks within PRTG to further simplify the display. We hope that it serves you as well as it has served our clients.