LockstepGroup / citrix-prtg

Custom Powershell sensors for PRTG, to monitor Citrix XenApp 6.5
9 stars 1 forks source link

Lockstep - Citrix Licensing Monitor.ps1 Errors #1

Open xalapa5000 opened 8 years ago

xalapa5000 commented 8 years ago

I was getting the following error when running the Licensing Monitor script:

At C:\Users\username\Desktop\Licensing\Lockstep - Citrix Licensing Monitor - withlookup.ps1:86 char:19

At C:\Users\username\Desktop\Licensing\Lockstep - Citrix Licensing Monitor - withlookup.ps1:88 char:19

At C:\Users\username\Desktop\Licensing\Lockstep - Citrix Licensing Monitor - withlookup.ps1:95 char:18

I removed the ":" after each $computername and the script no longer errors out.

sandersjds commented 8 years ago

I uploaded the "with lookups" version and adjusted the syntax. There was a change in the way string concatenation worked between PowerShell 2 and 3.

https://github.com/sandersjds/citrix-prtg/blob/master/Lockstep%20-%20Citrix%20Licensing%20Monitor%20-%20withlookup.ps1

xalapa5000 commented 8 years ago

Good to see. I downloaded the files initially from the blog. They were labeled "with lookups" but they had the old code in them.

On another point, I'm not getting any errors but I'm also not getting any percent used data. Any ideas?

On Fri, Oct 30, 2015 at 11:12 AM, Josh Sanders notifications@github.com wrote:

I uploaded the "with lookups" version and adjusted the syntax. There was a change in the way string concatenation worked between PowerShell 2 and 3.

https://github.com/sandersjds/citrix-prtg/blob/master/Lockstep%20-%20Citrix%20Licensing%20Monitor%20-%20withlookup.ps1

— Reply to this email directly or view it on GitHub https://github.com/sandersjds/citrix-prtg/issues/1#issuecomment-152589616 .

sandersjds commented 8 years ago

Check to see if it matches what is reported in the licensing console directly. A lot of the products don't actually check out licenses - I've really only seen it with XenDesktop.

xalapa5000 commented 8 years ago

The PowerShell code verifies that the Xendesktop is the only license that shows an InUseCount:

GENUS : 2 CLASS : Citrix_GT_License_Pool SUPERCLASS : DYNASTY : Citrix_GT_License_Pool RELPATH : Citrix_GT_License_Pool.DUP_GROUP=8,FLOAT_OK=FALSE,HOST_BASED=0,HOSTID="",PLATFORMS="",PLD= "XDT_ENT_CCS", PROPERTY_COUNT : 15 DERIVATION : {} SERVER : server NAMESPACE : ROOT\CitrixLicensing PATH : \server\ROOT\CitrixLicensing:Citrix_GT_License_Pool Count : 100 DUP_GROUP : 8 FLOAT_OK : False HOST_BASED : 0 HOSTID : InUseCount : 19 LicenseType : Retail Overdraft : 0 PLATFORMS : PLD : XDT_ENT_CCS PLDFullName : XDT_ENT_CCS PooledAvailable : 81 SubscriptionDate : date USER_BASED : 0 VendorString : ;LT=Retail; PSComputerName : server

However the PRTG console still shows 0% usage:

[image: Inline image 1]

Anything we can do from here?

On Fri, Oct 30, 2015 at 7:08 PM, Josh Sanders notifications@github.com wrote:

Check to see if it matches what is reported in the licensing console directly. A lot of the products don't actually check out licenses - I've really only seen it with XenDesktop.

— Reply to this email directly or view it on GitHub https://github.com/sandersjds/citrix-prtg/issues/1#issuecomment-152682339 .

sandersjds commented 8 years ago

I'll check this code in the next week or so to see if I can duplicate what you're seeing, and find the problem.