This document discusses health monitoring and alerting for Citrix XenApp, XenDesktop, and NetScaler. It provides an overview of health monitoring and recovery policies in XenApp 6, key monitoring commands and techniques, and how to monitor XenDesktop 5.x and Citrix services using NetScaler or Access Gateway Enterprise Edition. The document also covers various monitoring tools for XenDesktop like Desktop Studio, Desktop Director, HDX Monitor, and PowerShell, as well as how to configure alerting on XenServer hosts.
Health monitoring and alerting for xen app, xendesktop and netscaler
1. SUM 307 - Health Monitoring
and alerting for XenApp,
XenDesktop and Netscaler
Download this slide
http://ouo.io/f5RyS
2. • Health Monitoring and Recovery Policies in XenApp 6
• Key monitoring commands and techniques with XenApp
• XenDesktop 5.x Monitoring and Alerting Policies
• XenDesktop Monitoring Tools
• XenDesktop Miscellaneous
• Health Checking of Citrix Services using CAG-EE
• Alerting and Logging using CAG-EE
Agenda
3. • Verifies specified XenApp services
• Take an action when the verification fails
• Implemented as one or more XenApp policies
• Must be applied to a worker group or organizational unit.
• Numerous tests available
.
XA Health monitoring and Recovery Policies
XML Service TestIMA Service TestPrint Spooler TestLogon Monitor TestICA Listener TestCheck DNS TestLHC Test
4. Typical Problems to Be Addressed
• Enumeration of published applications
• XML Service hangs
• IMA Service hangs
• XML Ticket requests fail
• Terminal Service hangs
• Printing issues
9. • Convenient to use
• Native on W2K8 R2
• Setup permissions
• Add the required module
• Leverage .Net objects
Monitoring through Powershell 2.0
10.
11. • Manage XenApp servers
• Assign published applications and
Citrix policies to worker groups
• Farm Servers
• Domain OUs
• Shared Settings
• Load Balancing and failover
XenApp 6 Worker Groups
Worker Group 1
Worker Group 2Worker Group 3
12. XML service
IMA service
LHC
User’s login
Credential
(in http/https form)
User’s login
Credential
(in http form)
XA
XA
XA
XA
XA
XA
Web Interface
Miami
Domain
Controller
Data Collector
XA
London
Local Security Authority
Service (Lsass.exe)
Sydney
US-UK Zone
AU Zone
User’s
SIDs
Data Collector
US users
User’s login
Credential
(in http/https form)
XYZ Corp
13. XML service
IMA service
Local Security Authority
Service (Lsass.exe)
LHC
XA
XA
XA
XA
XA
XA
Web Interface
Miami
Domain
Controller
User’s
SIDs
Worker Group Preference Policy
Worker Group Preference Policy
Data Collector
Sydney
US-UK Zone
AU Zone
XA
Data Collector
US users
London
XYZ Corp
14. XML serviceXA
CPS
XA
CPS
XA
CPS
IMA service
Web Interface
WGPF:
1. Miami
2. London
3. Sydney
Domain
Controller
Data Collector
Worker Group Preference
Policy
Miami
Sydney
US-UK Zone
AU Zone
IMA service
Worker Group Preference Policy
Citrix Services
Manager
Domain Controller
Address of least busy
XA in Miami WG
Data Collector
XYZ Corp
US users
London
15. • LBDiag utility
• Useful for diagnosing load balancing issue in XenApp 6.
• It simulates the load balancing process for a user launching a specific
application
• Calculates load balancing policies, worker groups, server and application load
evaluators and checks on application installation
How to monitor load balancing policies
16. Citrix Confidential - Do Not Distribute
LBDiag utility User’s AD group
membership
User’s worker group
preference list
List of server loads,
application and server
status for each worker
group
17. • CDF trace
• CDF trace on a zone data collector while users are connecting to the farm
• Use CDFControl
• IMA_Subsystems_LMS and IMA_Subsystems_ImaWorkerGroup
Troubleshooting worker group load balancing issue
18.
19. • Citrix Medevac 2.5
• Troubleshooting Utility developed by the Citrix Escalation Team
• XML, Terminal Services, IMA and RPC related issues
• Standalone Utility
• Run it from any machine on the network
XML Broker Health Monitoring and Alerting
20. • XML Service health – verifies XML response
• Verify Data Collector health – IMA Service
• Least Loaded Server health – TS and RPC
• Standalone EXE that runs on the server and can be used on
remote servers as well
XML Broker Health Monitoring and alerting
22. Using Medevac: Case Study
The Problem … Some things we know …
• Environment: W2K8 R2, XA6
Enterprise Edition, Windows
7 clients, Online Plugin v 12.1
• Some users affected
• Nothing has changed in the
environment
• Web interface 5.4 correctly
enumerates resources
A user attempts to
launch a published
application and receives
an error - "Server
unavailable" or
“Application launch
request failure“
23. The Least Loaded Server
wsxica.dll
XML IMA Service
CCTicket.dll
credentialsticket
credentialsticket
credentialsticket
CCTicket.dll
Web Interface
Web Server
XML Ticket
Request
XML
Broker
End User Client
Connection / Logon To The
Citrix Server’s Published
Application
Trmsrv / Remote Desktop Services
24. Using Medevac: Case Study
• MedEvac identified the “Least Loaded Server”
• So how do we verify the IMA service is functioning properly on the
“Least Loaded Server?”
• By running the LLS test and specifying the Least Loaded Server
in MedEvac, we are making the LLS use it’s IMA service to
communicate to the Zone Data Collector to return itself as the
Least Loaded Server…
• If this test returns success, we know that the IMA service on the
Least Loaded Server is working properly…
25. Using Medevac: The results
LLS Test against the Least Loaded Server (IMA TEST)
26. Using Medevac: Case Study
RESOLUTION:
• Using PSKill from the Microsoft sysinternals suite, we
manually forced termination the IMA service
• Recreated the local host cache
• Restarted IMA - started successfully
• Users able to launch their published resources as normal
30. • First Introduced in XenDesktop 5
• Driven by the FullArmor policy engine
• Configured through Desktop Studio or
Active Directory
• Alerts displayed in Desktop Studio and
Desktop Director
XenDesktop Monitoring & Alerting Policies
Tip: To manage policies through AD - install
CitrixGroupPolicymanagement_x86/x64.msi on a Domain controller
31. • What can an administrator monitor once
these policies are enabled and filtered
accordingly?
1. CPU Usage on Virtual Desktops
2. Network latency on ICA connections
3. Pm managed profile load time
• All of the above affect the user experience
which is a key consideration when adopting
VDI…
XenDesktop 5.x Monitoring & Alerting Policies
32. • Desktop Studio or
Active Directory?
• The choice is yours…
• My Choice?
•Active Directory
• Why?
•HA VDA
•VDI-in-a-Box
•GPMC Results wizard
Configuring Monitoring & Alerting Policies
33. • Machine PolicyVirtual
Desktop Agent Settings
• Two configurable
values:
•Monitoring period
•Threshold
• Default Values:
•Monitoring period: 60 Sec
•Threshold: 95%
HDX Policy - CPU Usage Monitoring
34. • User PolicyVirtual
Desktop Agent Settings
• Two configurable
values:
•Monitoring period
•Threshold
• Default Values:
•Monitoring period: 30 Sec
•Threshold: 200ms
HDX Policy - ICA Latency Monitoring
35. • User PolicyVirtual
Desktop Agent Settings
• Single configurable
value
• Threshold
• Default Value:
•Threshold: 60 seconds
HDX Policy - Profile Load Time Monitoring
Note: Profile management must be installed on VMs for this policy to trigger alerts..
36. • Q. How do Desktop Studio &
Desktop Director know when an
alert should be triggered?
• A. Both DS and DD use WinRM to
retrieve policy values and system
counter information which is
exposed through the WMI
infrastructure
How does it all work?
37. 1. WMI exposes data using
various WMI providers
2. WinRM retrieves the exposed
data (HDX data, systems
counters, Policies...)
3. Desktop Director, Desktop
Studio & HDX Monitor
request this data from
WinRM
Under the Hood - Component Interaction
38. • Citrix HDX WMI provider is the frontend to the Windows
WMI infrastructure on the VDA
• Citrix.HDX.WMI.Provider.dll (%ProgramFiles
%CitrixICAService)
Citrix HDX WMI Provider
• Retrieves HDX data from the Registry
& Shared memory on VM
• New updated version installed with
VDA 5.5 to support HDX Monitor v2
41. • Key tools which can be used to actively monitor a
XenDesktop 5 Site
1. Desktop Studio
2. Desktop Director
3. HDX Monitor
4. XDPing
5. Xnapshot (XMLMon)
6. PowerShell
7. Honourable Mentions...
Key XenDesktop Monitoring Tools
43. • Provides a high level
view of all machines
in a Site
• Categorized
• All
• Unregistered
• High CPU*
• High Latency*
• High Profile Load Time*
• Last Connection Failed
• Pending Update
Desktop Studio Dashboard - Machines pane
44. • Provides machine
state information for
each desktop group
in the site
• Realtime graph
shows % of
machines in use for
each Desktop Group
at specific times
Desktop Studio Dashboard - Usage pane
45. • Displays health
status icons for all
hosts and controllers
in the Site
Desktop Studio Dashboard – Infrastructure pane
46. • Used to monitor all
resources in a site
and manage VM’s
• Alerts appear as
dynamic links which
can be followed for
further investigation
• Shadow functionality
built-in
Desktop Director
47. • New Features
•Enhanced HDX Monitoring
pane
•Flexible UI includes
collapsible panes
•Reporting feature
•Improved support for
multiple XenDesktop sites
Desktop Director v2.0
48.
49. • Used to validate/monitor the
operation of the HDX stack
on VM
• Supports updated WMI
provider installed with VDA
5.5
• NEW Remote access
capabilities
HDX Monitor v2.0
50. • Traditionally used for troubleshooting
common configuration issues on both the
DDC and VDA but can also be used to
monitor the state of key services and WCF
endpoints
• http://support.citrix.com/article/CTX123278
XDPing
51. • Profiling tool which can take a complete
picture of all controllers in a farm/site
• BIOS information, Registry information, Device Drivers,
Windows Services, Installed Hotfixes, Citrix Binaries, and
Citrix XenDesktop Farm information
• Includes compare functionality & XMLMon
utility for monitoring the XML broker
• http://support.citrix.com/article/CTX126699
Citrix Xnapshot
Xnapshotshot
52. • PowerShell tab
allows admins to
each script which
is run while
performing
admin defined
actions
• Built-in
automation
through Launch
PowerShell Tab
PowerShell (PoSH)
53. • Add-Pssnapin Citrix.*
• Adds all XenDesktop Snapin’s (cmdlets)
• Required when launching PowerShell manually through
Windows
• Not required when launching Posh through Desktop Studio
• Get-Command -Module Citrix.*
• Returns full list of available XenDesktop cmdlets
• XenDesktop 5 SDK Cmdlet Help
•http://support.citrix.com/article/CTX127254
Useful Commands
55. • Get-BrokerSession
• Retrieves sessions based on specified criteria
• Without parameters - all sessions enumerated
• Usage example: Get-BrokerSession -UserName %Domain%%account%
-SessionState connected
Get-BrokerSession
56. • Get-BrokerDesktopUsage
• Returns Information recorded (hourly) by Broker about number of desktops in
use for each desktop group
• Without parameters, the first 250 records are returned
• Information deleted after 7 days
Get-BrokerDesktopUsage
57. • Get-BrokerHypervisorAlert
• Gets alerts reported by the hypervisor(s) that the controller is monitoring
• Without Parameters - All alerts are returned
• Usage examples:
Get-BrokerHypervisorAlert -HostingServerName TestHyp* -Severity Red
Get-BrokerHypervisorAlert -MaxRecordCount %Value% (250 by default)
• Supported Metrics
• VMware ESX (CPU, Memory, Network, Disk)
• Citrix XenServer (CPU, Network (Bandwidth))
• Microsoft Hyper-V (None)
Get-BrokerHypervisorAlert
58. • Perfmon & EdgeSight
• The Controller and VDA both install
system counters which can be used to
collect real-time and historical data…
Honourable Mentions
60. • If using XenServer as your
host you take advantage of
the built-in alerting
mechanism
• Note: SNMP daemon can
also be configured to
interact with 3rd
party
monitoring software
XenServer - Configuring email alerts
61. • XenServer uses SSMTP to deliver emails
• Edit /etc/mail-alarm.conf
• Configure Options
• Use STMP relay server for testing
• smtp.gmail.com:587
• Test (XenServer Console)
• ssmtp recipient_email@example.com
• CTRL+D
XenServer - Configuring email alerts
62. • Once alerting is enabled and
configured correctly on the
XenServer host, automatic
alerts will be sent to the
specified email address
once the threshold levels are
exceeded…
Automatic Alerts
63. Success Accelerator for XenDesktop
• Guided Design. Follow a comprehensive
checklist of questions and options
• Peer Benchmarks. Compare your design
against thousands of others
• Best Practices. Use Citrix best practices to
make informed decisions
• Step-by-Step Installation. Get custom-
generated installation instructions & resources
Free, customized, step-by-step implementation guidance online
citrix.com/successaccelerator
See a demo, create your project
Station 46 in the Citrix Solutions & Services Showcase
64. • If you want to talk further about XenDesktop, VDI-in-a-Box,
Profile management or App virtualization then you will find
me at the XD booth at the following days & times:
Ask The Expert Booths
65. Health checking of Citrix and
3rd
party services using
NetScaler or
Access Gateway Enterprise
Edition
66. “I already have a monitoring and alerting
system, so why do I need this?”
Why Monitor & Alert Component Services
App Servers
NetScaler AGEE
Monitoring
Alerting
67. • AGEE NetScaler have the same health checking abilities
• Allows appliance determine if a “service” is up or down
• "Service" = XD DDC, XenApp WI, STA, XML Service
• Configurable health probe frequency, default 5 seconds
• Intelligent application logic – not just TCP port
• Intelligent health probe logic
Health checking of Citrix Services
68. • On AGEE - under
VServers and
Services
• On NetScaler –
under Load Balancing
Creating a Service
69. • Here is the create service window – supply the server IP
address and the
port that WI is
listening on
• HTTP Monitor is
chosen… for now.
• Service name is
arbitrary
Creating a Service
70. Health checking of Citrix Services XenApp Farm
XML Broker
STA
Web Interface
NetScaler AGEE
• No production traffic needed for health check
• Appliance uses MIPSNIP as source IP for communication
• Firewall must allow traffic from MIPSNIP
71. • In the Config Utility – we can see the health of all services.
• Double clicking the service and selecting the monitor shows
specific information, and a reason if the monitor is down.
Health checking of Citrix Services
72. • Citrix Infrastructure specific monitors
Citrix Confidential - Do Not Distribute
Health checking of Citrix Services
73. • New Intelligent Customisable
Monitoring…
1. SNMP Alert Retries
2. Success Retries
3. Failure retries
• Default values of above set to
replicate old behaviour, and need
to be changed to get the benefit
Health checking of Citrix Services
74. Transition Service to DOWN for Failed Probes
add monitor FAIL2 HTTP –failureRetries 3 –retries 5
1
S
Probes
Status
2
F
3
F
4
S
5
F
6
S
Service transitions to DOWN
7
S
8
S
Sliding retries window as probes continue
75. • Monitoring Web
Interface, note the
WI site path
• New in 9.3!
Adds
Auth/nocookies.aspx
to the Site Path URL
• This tests that the WI is running along with .Net
Health checking of Citrix Services
76. • Extended WI Monitor (New in 9.3)
• It establishes a
dummy WI
session and
validates the logon.
Health checking of Citrix Services
77. • Custom monitor for the XenApp XML service.
• Verifies the published application name which we get from
the XML service.
Health checking of Citrix Services
78. • Xen Desktop Delivery Controller
• Option to use credentials (new in 9.3)
Health checking of Citrix Services
79. • There may be other components in your DMZ, or part of
your infrastructure that relate to your Citrix
NetScaler / AGEE appliance.
Health checking of 3rd
party Services
XenApp Farm
FTP
SMTP
LDAP
80. • We can use the same intelligent monitoring to check and
alert on these components:
• Examples are FTP, HTTP, SMTP, DNS, SIP, SMTP, LDAP,
POP3, RTSP
• New in 9.3 – MySQL, RDP, MS-SQL
Health checking of 3rd
party Services
81. All of these health checks are specific & indepth e.g.
1.FTP health check can log onto an FTP
server, and check for the existence of a file
2.LDAP monitor can verify that a bind
username and password are correct
3.SMTP monitor sends the EHLO command
and checks for the 250 response
4.HTTP can send a request, and look for a
string in the response body
Health checking of 3rd
party Services
83. • If you don’t have your own alerting infrastructure to plug the
appliance into, you can download Citrix Command Center
• Designed for NetScaler, AGEE, Branch Repeater
• Configurable alerting (e-mail etc) when services go down
Health checking of Citrix Services
84. • How do I know if a service is down?
• SNMP Trap gets sent
• Command Center can send an e-mail alert.
Health checking of Citrix Services
85. • How do I know if a service went down?
Health checking of Citrix Services
86. • If you want to talk further about NetScaler or Access
Gateway Enterprise edition, then you will find me at the Ask
the Expert booth at the following days & times:
Ask The Expert Booths
87. Before you leave…
• Tools as a Service (TaaS) - Ask one of our experts for a demo
Location: TaaS Booth, Solutions Expo Hall and
Citrix Education Learning Lounge, CCIB, Level 0, Doors 01
• Session surveys are available online at www.citrixsummit.com
starting Thursday, 27 October
• Provide your feedback and pick up a complimentary gift at the registration desk
• Download presentations starting Monday, 7 November, from your
My Organiser tool located in your My Account