Leveraging the XMLServiceReader for Custom Health ChecksPublished on 27 Jul 2009
Tags #Presentation Server#Presentation Server / XenApp#XenApp#XenDesktop#XML service#XmlServiceDigger#XmlServiceExplorer
After having published the XmlServiceReader, I have described how to use this tool to customize health check in XenApp Health Monitoring and Recovery (HMR). In this article I will cover health checks that to not apply to a single server but assure the operation of the farm as a service independently of individual servers.
Therefore, you should not be using the tests included in this article with XenApp Health Monitoring and Recovery (HMR) because they are to be executed only once per farm.
Often, a handful of applications is flagged to be mission-critical to a customer. There are several tests to ensure the availability of such an application. The first of a series of tests checks whether the application is announced by the XML service.
By sending the following request, the XML service replies with a full list of published applications:
<RequestAppData> <Scope traverse="subtree" /> <DesiredDetails>defaults</DesiredDetails> <ServerType>win32</ServerType> <ClientType>ica30</ClientType> </RequestAppData>
In this list of published applications, search for the friendly name of the important application which is enclosed in the FName tag, e.g.
Using this tests, you can check for an application to be present without knowing whether the application is available to a specific user group.
After making sure that an application exists in a XenApp farm, the following test verifies an application to be published to a specific user group by requesting the access list of the application called Notepad. Note that the application name may contain a space which needs to be encoded as %20 in the request.
<RequestAppData> <Scope traverse="subtree" /> <DesiredDetails>access-list</DesiredDetails> <AppName>Notepad</AppName> <ServerType>win32</ServerType> <ClientType>ica30</ClientType> </RequestAppData>
Now parse the reply for the Group tag containing the GroupName and Domain tags, e.g.
<Group> <GroupName>Ctx-User</GroupName> <Domain type="NT">SEPAGOND</Domain> </Group>
You can now be certain that a specific application exists and is visible to a user group.
Now, there is only one piece of information missing. The last test in this series checks whether the XenApp farm is able to assign a server to host a specific application:
<RequestAddress> <Name> <AppName>Notepad</AppName> </Name> <ServerAddress addresstype="no-change" /> </RequestAddress>
If this test is successful, the reply contains a tag called TicketTag which contains a number called the IMAHostId representing a unique server in the farm, e.g.
As mentioned before, you should be using a mechanism external to HMR because the tests ensure an application to available independent of the individual servers. They rather check that the farm knows of an application and is able to name a server responsible for launching the application.