You are on page 1of 8

Monitoring Server Performance with Health Monitoring & Recovery

2012 Citrix Systems, Inc. All rights reserved. Terms of Use | Trademarks | Privacy Statement

Contents

Monitoring Server Performance with Health Monitoring & Recovery Modifying Health Monitoring and Recovery Actions Developing Custom Health Monitoring & Recovery Tests

3 6 8

Monitoring Server Performance with Health Monitoring & Recovery


You can use Health Monitoring and Recovery to run tests on the servers in a server farm to monitor their state and discover any health risks. Citrix provides a standard set of tests; you have the option of importing additional tests, including custom tests that you develop. The Citrix tests included with XenApp allow you to monitor several services and activities including Remote Desktop Services, XML Service, Citrix IMA Service, and logon/logoff cycles. By default, Health Monitoring and Recovery is enabled on all of the servers in your farm, and the tests that are included run on all servers, including the data collector. Typically, you do not need to run these tests on the data collector because, particularly in a large farm, the data collector is not used for serving applications. If you do not want Health Monitoring & Recovery to run on the data collector, you must disable it manually. Store all custom tests in the following location: %Program Files%\Citrix\HealthMon\Tests\Custom\ where %Program Files% is the location in which you installed XenApp. When saving custom tests, do not include spaces in the file names. Configure the Citrix policy for Health Monitoring and Recovery by setting the following options:
q

Health monitoring (enabled by default). Use this setting to allow the Health Monitoring and Recovery feature. Health monitoring tests. Use this setting to specify which tests to run. Select from a standard set of Citrix tests (described below) or add your own customized tests. For descriptions of recovery actions, see Modifying Health Monitoring and Recovery Actions. Maximum percent of offline servers (10 percent by default). Use this setting to specify the number of servers that the Health Monitoring and Recovery feature can exclude from load balancing.

Use the load balancing feature of XenApp with Health Monitoring and Recovery to ensure that if a server in the farm experiences a problem (for example the Citrix IMA Service is down), the state of that server does not interfere with the users ability to access the application because the users connection to that application is redirected through another server. For more information about load balancing and using Load Manager, see the Load Management section in eDocs.

Citrix Tests
Citrix IMA Service test 3

Monitoring Server Performance with Health Monitoring & Recovery This test queries the service to ensure that it is running by enumerating the applications available on the server. Logon monitor test This test monitors session logon/logoff cycles to determine whether or not there is a problem with session initialization or possibly an application failure. If there are numerous logon/logoff cycles within a short time period, the threshold for the session is exceeded and a failure occurs. The session time, interval, and threshold can be configured by modifying the parameters in the Test file field. These parameters are listed and described in the following table.

Logon monitor test parameter SessionTime SessionInterval SessionThreshold

Description Defines the maximum session time for a short logon/logoff cycle. Default is five seconds. The time period designated to monitor logon/logoff cycles. Default is 600 seconds. The number of logon/logoff cycles that must occur within the session interval for the test to fail. Default is 50 cycles.

Remote Desktop Services test This test enumerates the list of sessions running on the server and the session user information, such as user name. XML Service test This test requests a ticket from the XML service running on the server and prints the ticket. Check DNS test This test performs a forward DNS lookup using the local host name to query the local DNS server in the computers environment for the computers IP address. A failure occurs if the returned IP address does not match the IP address that is registered locally. To perform reverse DNS lookups in addition to forward DNS lookups, use the flag /rl when running this test. Check Local Host Cache test Citrix does not recommend running this test unless you have problems with corrupted local host caches. This test ensures the data stored in the XenApp servers local host cache is not corrupted and that there are no duplicate entries. Because this test can be CPU-intensive, use a 24-hour test interval (86,400 seconds) and keep the default test threshold and time-out values. Before running this test, ensure the permissions of the files and registry keys that the test accesses are set properly. To do this, run the LHCTestACLsUtil.exe file located in C:\Program Files (x86)\Citrix\System32 of the XenApp server. To run this utility, you must have local administrator privileges. Check XML Threads test 4

Monitoring Server Performance with Health Monitoring & Recovery This test inspects the threshold of the current number of worker threads running in the Citrix XML Service. When running this test, use a single integer parameter to set the maximum allowable threshold value. The test compares the current value on the XenApp server with the input value. A failure occurs if the current value is greater than the input value. Citrix Print Manager Service test This test enumerates session printers to determine the health of the Citrix Print Manager service. A failure occurs if the test cannot enumerate session printers. Microsoft Print Spooler Service test This test enumerates printer drivers, printer processors, and printers to determine whether or not the Print Spooler Service in Windows Server 2008 is healthy and ready for use ICA Listener test This test determines whether or not the XenApp server is able to accept ICA connections. The test detects the default ICA port of the server, connects to the port, and sends test data in anticipation of a response. The test is successful when the server responds to the test with the correct data.

Modifying Health Monitoring and Recovery Actions


The Health Monitoring and Recovery tests included with XenApp are configured with default settings. You can modify the settings for each test. Monitor error messages in the Events log. For a description of the Citrix tests, see Monitoring Server Performance with Health Monitoring & Recovery. To set recovery actions, configure the Citrix policy settings for Health Monitoring and Recovery > Health monitoring tests.

Recovery Actions
Alert Only Sends an error message to the Event log but takes no other action. The test continues to run, and if it subsequently successfully passes, an event is sent to the system log. This recovery action is the default for all tests except the Citrix XML Service test. Remove Server from load balancing Excludes the server from load balancing. Clients do not attempt to make new connections to this server through Load Manager. However, existing connections are maintained, and attempts are made to reconnect disconnected sessions. You can make new direct connections to the server; this enables you to try to correct any problems. To prevent possible farm-wide outages, this is the default recovery action for the Citrix XML Service test. Note: To restore one or more servers to load balancing, use the enablelb command-line utility. Shut Down IMA Shuts down the Citrix IMA Service. After this happens, tests continue to run but failures will not trigger events to be sent to the Event log until the Citrix IMA Service is up and running again. Restart IMA Shuts down and then restarts the Citrix IMA Service. After this happens, tests will run but failures will not trigger events to be sent to the Event log until the Citrix IMA Service is up and running again. Reboot Server Restarts the server. An alert is triggered before the server is restarted. After the system is restarted, the tests resumes.

Modifying Health Monitoring and Recovery Actions Note: If the Recovery Action list contains the entry Action ID followed by a number, this means that Citrix supplied a new action through a hotfix. Although you applied the hotfix to the selected server, you did not apply it to the computer on which the Access Management Console or Delivery Services Console is running. When the hotfix is fully applied, a meaningful name for the new action is added to the list.

Developing Custom Health Monitoring & Recovery Tests


If you want to perform particular tests that are not included in Health Monitoring & Recovery, you can develop custom tests using the Health Monitoring & Recovery SDK. This SDK includes a Readme file and white papers that contain information required to use the SDK, including security requirements and return values. In addition, the SDK contains various sample test scripts that you can use as examples to develop custom tests that can be run on a server farm or on individual servers in a farm. The Health Monitoring & Recovery SDK is available for download from the Citrix Knowledge Center. After developing the custom test:
q

Save the test in the custom test location, such as c:\program files (x86)\Citrix\HealthMon\Tests\Custom Specify the custom test in a Citrix policy

To specify custom tests in a Citrix policy


1. Configure the Citrix policy setting for Health monitoring to enable the feature. 2. Configure the Citrix policy setting for Health monitoring tests, and select Add Custom. 3. In the Add Custom Test dialog box:
q

Provide a name for the test. Provide the file location using the following example: If the file location is: c:\program files (x86)\Citrix\HealthMon\Tests\Custom\mytest.exe The path you enter is: Custom\mytest.exe The rest of the path is added by the Health Monitoring & Recovery feature based on the installed location.

Complete the remaining options as preferred.

You might also like