Home Directory Plugins Remote Access check_number_of_citrix_sessions

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_number_of_citrix_sessions

Rating
2 votes
Favoured:
1
Current Version
1.0
Last Release Date
2010-08-11
Compatible With
  • Nagios 3.x
Hits
112973
Files:
FileDescription
check_number_of_citrix_sessions.wsfcheck_number_of_citrix_sessions.wsf
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
check_number_of_citrix_sessions
check_number_of_citrix_sessions by Marko Pavlovic.

Check number of specific (or all) Citrix sessions, on specific Citrix Presentation Server (or entire Citrix farm), depends on arguments. Also, total number of (unique) users is displayed.
Check number of specific (or all) Citrix sessions, on specific Citrix Presentation Server (or entire Citrix farm), depends on arguments. Also, total number of (unique) users is displayed.

This script uses MFCOM. MFCOM is COM-based management interface, programming interface for the administration of MetaFrame XP farms and servers. MFCOM runs on every Citrix Presentation Server by default. No installation/configuration required. Just be sure that "Citrix MFCOM Service" is running on Citrix Presentation Server.

The main idea is to run this script using NRPE (Nagios Remote Plugin Executor) on one server (must be Citrix Presentation Server) and get information about sessions/users on every server in the farm (or entire farm). Hostname (name of Citrix Presentation Server) is specified as argument.

This script requires Citrix Administrator privileges and must be run from Citrix Presentation server. Practically, that means that NRPE service (on Citrix Presentation Server) must be run with Citrix Admin privileges.

Usage:

cscript check_number_of_citrix_sessions.wsf hostname application_name warning critical


Examples:

1. Check number of Internet Explorer 8 sessions on presentation server "citrixps12":

cscript check_number_of_citrix_sessions.wsf citrixps12 "Internet Explorer 8" 10 20

output: OK: 7 sesions - 7 active, 0 disconnected. Number of users:7. |sessions_total=7;sessions_active=7 sessions_disconnected=0;users=7;



2. Check number of Internet Explorer 8 sessions on entire Citrix farm:

cscript check_number_of_citrix_sessions.wsf all "Internet Explorer 8" 100 200

output: Critical: 332 sesions - 329 active, 3 disconnected. Number of users:309. |sessions_total=332;sessions_active=329;sessions_disconnected=3;users=309;



3. Check number of all sessions on presentation server "citrixps12":

cscript check_number_of_citrix_sessions.wsf citrixps12 all 50 70

output: OK: 18 sesions - 17 active, 1 disconnected. Number of users: 11. |sessions_total=18;sessions_active=17 sessions_disconnected=1;users=11;



4. Check number of all sessions on entire Citrix farm:

cscript check_number_of_citrix_sessions.wsf all all 500 1000

output: Warning: 809 sesions - 797 active, 12 disconnected. Number of users: 347. |sessions_total=809 sessions_active=797;sessions_disconnected=12;users=347;

Reviews (2)
bygradecke, February 8, 2013
To get it to work with XenApp 6.0 replace all occurrences of "MetaFrame" with "XenApp"

also I commented out lines 102-113 as they were throwing errors that objects/methods didn't exist. it doesn't seem to limit the script functionality.

Script with all updates can be found here: http://pastie.org/6095017#24
byMeyer, June 5, 2012
1 of 1 people found this review helpful
I had a small problem. The NSClient run as SYSTEM account, which is not CitrixAdministrator. I removed the lines 110-113 and everything seems to work. I'm not sure if this is special to my environment.
Line 110: If theFarm.WinFarmObject.IsCitrixAdministrator = 0 then

I had a problem with NSClient 0.4.172 which doesn' t like the perf data, because the perf data is not divided by a space. I added a space after every ';'
outputMessage=intSessions& " sesions - "& intActive& " active, "_
& intDisconnected& " disconnected. Number of users: "_
& numberOfUniqueUsers& ". |sessions_total="& intSessions& "; sessions_active="_
& intActive& "; sessions_disconnected="& intDisconnected& "; users="& numberOfUniqueUsers