Trying to set up monitor to show real time license use on our Citrix license server. I used a template from PRTGPlugins, but it doesn't list the licenses. Only shows RDP and Ping monitors.
So, with the help of Citrix and a little bit of hard work, I’m very pleased to announce my latest free tool! About the tool: The Citrix Director Notification service sits on an edge server as a service (or local to the delivery controller) and periodically checks the health of: Citrix Licensing. Database Connections. Broker Service. Core Services.
Votes:
0
Your Vote:
Hello,
I'm afraid that might only be possible with Custom EXE-Sensors, but of course you could also contact the developer of PRTGPlugins.
best regards.
I have a custom WMI sensor setup that was monitoring license use fine, until I renewed my Citrix Licenses and restarted the license server. Now the sensor fails with 'Query returned more than one record error: PE078'. I have uninstalled the license server and re installed and also deleted and recreated the sensor. Still no luck getting the sensor to work again.
As the sensor mentions, it seems more than one result is returned, and you need to adjust the query as it needs to be only one. You can use the WMI Tester to help with the testing.
Looks like it does indeed return two records, one looks bogus as it lists 0 in the in use count. They both look identical except for the fact one returns 0 in the in use count. Any idea how to get to read only the correct one?
Sorry, no. How would we know that?
Apparently that record is supposed to be there. I see it on all our license servers. So I'm back to the original problem of getting the 'Query returned more than one record error: PE078' when running the custom WMI sensor with a WQL statement of 'SELECT InUseCount FROM CITRIX_GT_LICENSE_POOL'. Is there a way to get it to total the two records and present that to PRTG? I installed the PRTG Plugins, but it didn't have a template for Citrix Licensing. They have zero support and I haven't been able to get in touch with anyone from there to figure out why it doesn't work.
You could try expanding the query with something like
Or if this does not help, do this with a vb-script which calculates the total itself.
Unfortunately with Citrix licensing you need to enumerate them all to get the full license count and usage since all licenses are individually in WMI. This is why we made the plugin.
I've been beating this horse on and off for a couple days. Here is my powershell script. No promises.It gets the total licenses, the amount in use, computes a percentage, and returns a value.Just copy and paste it the Powershell ISE on your sensor server and try it.You will need to adjust the server...it's all in the comments.
It was requested that we keep track of the actual number of licenses used. I changed the switch statement to return that value instead of 0, 1, or 2.So your graph will now reflect the actual number of licenses used.
hello, i have added your script to my exe folder and added a custom sensor. but it display me 0 # .when i run the powershell script on the prtg server it shows me the correct entry like 100 licenses are active.
can you please help me adding the custom sensor and its settings?
kind regards,
sebastian
Gret Job, but i get this error:
PS C:Program Files (x86)PRTG Network MonitorCustom SensorsEXEXML> C:Program Files (x86)PRTG Network MonitorCustom SensorsEXEXMLCitrix_LIC03.ps1Get-WmiObject : Zugriff verweigert (Ausnahme von HRESULT: 0x80070005 (E_ACCESSDENIED))Bei C:Program Files (x86)PRTG Network MonitorCustom SensorsEXEXMLCitrix_LIC03.ps1:16 Zeichen:20+ $licensePool = gwmi <<<< -class 'Citrix_GT_License_Pool' -Namespace 'ROOTCitrixLicensing' -comp $server+ CategoryInfo : NotSpecified: (:) [Get-WmiObject], UnauthorizedAccessException+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
Es wurde versucht, durch 0 (null) zu teilen.Bei C:Program Files (x86)PRTG Network MonitorCustom SensorsEXEXMLCitrix_LIC03.ps1:37 Zeichen:37+ $PercentUsed = [Math]::Round($inuse/ <<<< $total*100,0)+ CategoryInfo : NotSpecified: (:) [], RuntimeException+ FullyQualifiedErrorId : RuntimeException
Can you help me?
Please log in or register to enter your reply.
Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.
WMI in Windows Server is a treasure trove of information and well worth investigating, particularly when needing to run reports against many servers. In addition it is possible for third-parties to make use of WMI and store their own information in there. This is true of a recent requirement I had to monitor Citrix Licensing.
Whilst it’s obviously critical to purchase enough licenses for Citrix that you need, its also important to not have too many lying around not in use, since you’ll be wasting money. Given that Citrix Licensing is based on concurrency you may have different usage patterns at the time of day, month or year.
Contained within the WMI Namespace ROOTCitrixLicensing is a class Citrix_GT_License_Pool. In this class you can find details for registered licenses and how many are in use. The PowerShell cmdlet Get-WMIObject can be used to retrieve this information. Once you have it you could save the report into a CSV file, write an entry to an event log or send an email alert.
The below example will generate an email alert when then level of licenses in use goes over 90%. The email will contain basic details of how many licenses are currently in use.
sdf