New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Citrix Concurrent user count

Votes:

0

Your Vote:

Up

Down

I need a sensor for monitoring the concurrent user of our Citrix farm. I a sensor available for monitoring this?

citrix concurrent count counter users xenapp

Created on Sep 9, 2011 1:28:32 PM by  mhuisman (0) 1



9 Replies

Votes:

0

Your Vote:

Up

Down

Hello,

I'm afraid there is no dedicated sensor in PRTG for this. But maybe you can use the Custom Script Sensors to do that.

best regards

Created on Sep 9, 2011 3:48:31 PM by  Torsten Lindner [Paessler Support]

Last change on May 7, 2014 5:03:30 PM by  Gerald Schoch [Paessler Support]



Votes:

0

Your Vote:

Up

Down

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.

# Setup Variables
$Total = 0
$InUse = 0
$PercentUsed = 0
$Retstring = 0
$RetValue = 0

# Get Citrix licensing Info
# Use the IP address of the License server(-comp switch).  I got inconsistent results using the hostname
$licensePool = gwmi -class "Citrix_GT_License_Pool" -Namespace "ROOT\CitrixLicensing" -comp 172.16.10.14

# This will display all the license info....Uncomment for troubleshooting
# $licensePool | Select-Object @{n="Product";e={$_.PLD}},
#                            @{n="Installed";e={$_.Count}},
#                            @{n="In Use";e={$_.InUseCount}},
#                            @{n="Available";e={$_.PooledAvailable}},
#                            @{n="% in use";e={($_.InUseCount/$_.Count)*100}}
                            
# This loops through all the license info and adds up the total license count and in use count for MPS_ENT_CCU licenses
# If you do not have MPS_ENT_CCU licenses, uncomment the section above and look at the output.  Figure out your license count from that.  Edit Script as needed                            
$LicensePool | ForEach-Object{ If ($_.PLD -eq "MPS_ENT_CCU"){
    $Total = $Total + $_.count
    $InUse = $InUse + $_.InUseCount
    }
}

#  Uncomment to confirm values are correct    
# "Total = ", $Total
# "In Use = ", $Inuse

$PercentUsed = [Math]::Round($inuse/$total*100,0)

#  Determine return code.  Less than 90%, ok, 90-97 Warning, 98-100 Error
switch ($PercentUsed)
    {
        {$PercentUsed -lt 90} {
            $RetString = "0:OK"	
            $RetVal = 0
            break
            }
        {$PercentUsed -ge 90 -and $PercentUsed -lt 98} {
            $RetString = "1:Warning 90-97% License Usage"	
            $RetVal = 1
            break
            }
        {$PercentUsed -ge 98} {
            $RetString = "2:ALERT 98-100% License Usage"	
            $RetVal = 2
            }
}

# Return Info
Write-Host $RetString
exit $RetVal

Created on Jan 8, 2013 6:47:50 PM by  jcayer (0)

Last change on Jan 9, 2013 10:22:35 AM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi,

great job, that looks pretty nice.

I made two little improvement to the script:

  • use a parameter for submitting the ip from prtg as parameter '-server <ip-address>', your ip-address is set as default if no parameter is given
  • rewritten the output to use xml-syntax of our Custom Script-advanced-Sensor in which you have 2 values: the percentage itself as well as a calculated state. This way you can follow the history of license-usage.

Unfortunately we don't have a citrix-server to test the script. May you create a new sensor to test it before we publish your solution?

Param( $server="172.16.10.14" )
# Setup Variables

$Total = 0
$InUse = 0
$PercentUsed = 0
$Retstring = 0
$RetValue = 0

$returnStateOK = 0
$returnStateWarning = 1
$returnStateCritical = 2

# Get Citrix licensing Info
# Use the IP address of the License server as parameter -server <ip-address>.  I got inconsistent results using the hostname
$licensePool = gwmi -class "Citrix_GT_License_Pool" -Namespace "ROOT\CitrixLicensing" -comp $server

# This will display all the license info....Uncomment for troubleshooting
# $licensePool | Select-Object @{n="Product";e={$_.PLD}},
#                            @{n="Installed";e={$_.Count}},
#                            @{n="In Use";e={$_.InUseCount}},
#                            @{n="Available";e={$_.PooledAvailable}},
#                            @{n="% in use";e={($_.InUseCount/$_.Count)*100}}
                            
# This loops through all the license info and adds up the total license count and in use count for MPS_ENT_CCU licenses
# If you do not have MPS_ENT_CCU licenses, uncomment the section above and look at the output.  Figure out your license count from that.  Edit Script as needed                            
$LicensePool | ForEach-Object{ If ($_.PLD -eq "MPS_ENT_CCU"){
    $Total = $Total + $_.count
    $InUse = $InUse + $_.InUseCount
    }
}

#  Uncomment to confirm values are correct    
# "Total = ", $Total
# "In Use = ", $Inuse

$PercentUsed = [Math]::Round($inuse/$total*100,0)

#  Determine return state.  Less than 90%, ok, 90-97 Warning, 98-100 Error
switch ($PercentUsed)
    {
        {$PercentUsed -lt 90} {
            $RetString = "OK"    
            $RetState = $returnStateOK
            break
            }
        {$PercentUsed -ge 90 -and $PercentUsed -lt 98} {
            $RetString = "Warning"    
            $RetState = $returnStateWarning
            break
            }
        {$PercentUsed -ge 98} {
            $RetString = "ALERT"    
            $RetState = $returnStateCritical
            }
}

$retXml = "<prtg>`n"
$retXml += "  <result>`n"
$retXml += "    <channel>Value</channel>`n"
$retXml += "    <value>$PercentUsed</value>`n"
$retXml += "    <unit>Percent</unit>`n"
$retXml += "    <limitMaxError>98</limitMaxError>`n"
$retXml += "    <limitErrorMsg>ALERT 98-100% License Usage</limitErrorMsg>`n"
$retXml += "    <limitMaxWarning>90</limitMaxWarning>`n"
$retXml += "    <limitWarningMsg>Warning 90-97% License Usage</limitWarningMsg>`n"
$retXml += "  </result>`n"
$retXml += "  <result>`n"
$retXml += "    <channel>State</channel>`n"
$retXml += "    <value>$RetState</value>`n"
$retXml += "  </result>`n"
$retXml += "  <text>$RetString</text>`n"
$retXml += "</prtg>`n"

# Return Info
write-host $retXml
exit 0

Created on Jan 9, 2013 3:44:44 PM by  Dieter Loskarn [Paessler Support]

Last change on Jan 9, 2013 3:57:42 PM by  Dieter Loskarn [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hey, we also need a solution for this. Is it possible to monitor the login and logoff length? I miss some good sensors for XenApp monitoring.

Created on Jan 17, 2013 1:17:04 PM by  Marcel (0) 1



Votes:

0

Your Vote:

Up

Down

I'm not quite sure what you are asking for? Are you looking to gather the amount of time a user is connected? Would you build a sensor for every user than? I'm confused. Sorry.

Can you explain a bit more?

Created on Jan 17, 2013 7:04:47 PM by  jcayer (0)



Votes:

1

Your Vote:

Up

Down

Marcel, we've implemented PRTGplugins.com to monitor Citrix login/logoff times. http://www.prtgplugins.com/

We bought it especially for Citrix performance measurement, but there are a lot of others features included in the price.

The implementation didn't went smoothly, so I contacted the developers. Now it's running on 30 locations. If you have questions about the implementation, write a reply. I can post the " shortened but clearer steps " here.

Created on May 3, 2013 2:25:57 PM by  Pieter Reitsma (140) 1 1



Votes:

0

Your Vote:

Up

Down

Hello Pieter,

I have recently tried to install prtgplugins on my network, and i'm running into issues as well. would you be able to help me implement it on my network? I would appreciate it. Thank you

Created on Jul 26, 2013 8:18:19 PM by  williampham (0)



Votes:

0

Your Vote:

Up

Down

Hello,

this might be an interesting blog post to follow if you want to monitor your citrix environment:

How can I monitor Citrix environments?

Created on Jul 29, 2013 6:47:47 AM by  Aurelio Lombardi [Paessler Support]

Last change on May 7, 2014 5:02:26 PM by  Gerald Schoch [Paessler Support]



Votes:

0

Your Vote:

Up

Down

William, today I'm not available. Send me a email with your contact information. My email can be found on my LinkedIn profile. http://bit.ly/preitsma

Created on Jul 29, 2013 7:19:10 AM by  Pieter Reitsma (140) 1 1



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.