Citrix XenApp and XenDesktop 7.x (Advanced)

Version 5

    This template assesses the status and overall health of the Citrix XenApp and XenDesktop 7.x installed on Windows by using PowerShell scripts.

     

    Prerequisites: WMI access to the target server.

    Credentials: Windows Administrator on the target server.

    This template was tested on version 7.5.

     

    CONFIGURING WINDOWS REMOTE MANAGEMENT (WINRM)

    1. 1. 1. If not already done so, install PowerShell 2.0 and WinRM on the SAM and target servers. Powershell 2.0 can be found here: http://support.microsoft.com/kb/968930.
    2. 2. 2. On the SAM server, open a command prompt as an administrator. To do this, perform the following step:
    • Go to the Start menu and right-click the cmd.exe and then select Run as Administrator.
    1. 1. 3. Enter the following in the command prompt:
             winrm quickconfig
      winrm set winrm/config/client @{TrustedHosts="*"}
    2. 2. 4. On the target server, open a command prompt as an Administrator and enter the following:
             winrm quickconfig
      winrm set winrm/config/client @{TrustedHosts="IP_ADDRESS"}

    where IP address is the IP address of your SAM server.

    Monitored Components

    Controllers

    This monitor returns the status of controllers running broker services in the site. The returned values are as follows:

         Active – This component returns the current number of controllers in the Active state.

         Transitioning – This component returns the current number of controllers in the Transitioning state.

         Off – This component returns the current number of controllers in the Off state.

         Failed – This component returns the current number of controllers in the Failed state.

     

    Desktop Groups

    This monitor returns broker desktops status. The returned values are as follows:

         Off – This component returns the current number of broker desktops in the Off state.

         Unregistered – This component returns the current number of broker desktops in the Unregistered state.

         Available – This component returns the current number of broker desktops in the Available state.

         Disconnected – This component returns the current number of broker desktops in the Disconnected state.

         In Use – This component returns the current number of broker desktops in the Use state.

         Preparing – This component returns the current number of broker desktops in the Preparing state.

     

    Machines

    This monitor returns machines status. The returned values are as follows:

         Off – This component returns the current number of machines in the Off state.

         Unregistered – This component returns the current number of machines in the Unregistered state.

         Available – This component returns the current number of machines in the Available state.

         Disconnected – This component returns the current number of machines in the Disconnected state.

         In Use – This component returns the current number of machines in the Use state.

         Preparing – This component returns the current number of machines in the Preparing state.

     

    Sessions

    This monitor returns broker sessions status. The returned values are as follows:

         Other – This component returns the current number of broker sessions in the Other state.

         Preparing Session – This component returns the current number of broker sessions in the Preparing session state.

         Connected – This component returns the current number of broker sessions in the Connected state.

         Active – This component returns the current number of broker sessions in the Active state.

         Disconnected – This component returns the current number of broker sessions in the Disconnected state.

         Reconnecting – This component returns the current number of broker sessions in the Reconnecting state.

         Non Brokered Session – This component returns the current number of broker sessions in the Non-Brokered session state.

         Unknown – This component returns the current number of broker sessions in the Unknown state.

     

    Broker Service Status

    This monitor determines the current state of the Broker Service on the controller. Possible values include the following:

         0 – The broker is connected to a database that is valid, and the service is running.
         1 – A database schema upgrade is in progress.
         2 – The broker is connected to a database that is valid, but it does not have the full functionality required for optimal performance. Upgrading the database is advisable.
         3 – The broker does not have a database connection configured.
         4 – The database rejected the logon from the Broker Service. This may be caused by bad credentials, or the database not being installed.
         5 – The database schema is missing (possibly just the stored procedures in it).
         6 – The specified database could not be located with the configured connection string.
         7 – The broker is connected to a database that is valid, but it does not have the full functionality required so the broker cannot function. Upgrading the database is required.
         8 – The broker is too old to use the database. A newer version is required.
         9 – The database is too old for the Broker Service. Upgrade the database.
         10 – Connectivity between the Broker Service and the database has been lost. This may be a transitory network error, but may indicate a loss of connectivity that requires administrator intervention.
         11 – Connectivity between the broker and the database has been lost for an extended period of time, or has failed due to a configuration problem. The broker service cannot operate while its connection to the database is unavailable.
         12 – The Services status cannot be determined.

     

    Specific Desktop Catalog State

    This monitor returns specific desktop catalog state. The returned values are as follows:

    Machine Internal State – This component returns the internal state of the machine associated with the desktop. Possible values include the following:

    0 – Available;
    1 – Pending;
    2 – SoftRegistered;
    3 – FullCapacity;
    4 – Unavailable;
    5 – Unregistered;
    6 – Unknown;

    Power State – This component returns the current power state of the desktop. Possible values include the following:

    0 – On;
    1 – Suspending;
    2 – Resuming;
    3 – TurningOn;
    4 – TurningOff;
    5 – Suspended;
    6 – Off;
    7 – Unmanaged;
    8 – Unavailable;
    9 – NotSupported;
    10 – Unknown;

    Registration State – This component indicates the registration state of the desktop. Possible values include the following:

    0 – Registered;
    1 – Initializing;
    2 – Unregistered;
    3 – AgentError;
    4 – Unknown;

    Summary State – This component indicates the overall state of the desktop. Possible values include the following:

    0 – Available;
    1 – Preparing;
    2 – InUse;
    3 – Disconnected;
    4 – Unregistered;
    5 – Off;
    6 – Unknown;

    Is Assigned – This component denotes whether a private desktop has been assigned to a user/users, or a client name/address. Possible values include the following:

    0 – True;
    1 – False;
    2 – Unknown;

    In Maintenance Mode – This component denotes whether the desktop is in maintenance mode. Possible values include the following:

    0 – True;
    1 – False;
    2 – Unknown;

    Note: Before using this monitor you should provide correct Desktop Catalog Name as an argument.

    Note: By default, this monitor is disabled.

     

    Specific Machine State

    This monitor returns specific machine status. The returned values are as follows:

    Machine Internal State – This component returns the internal state of the machine associated with the desktop. Possible values include the following:

    0 – Available;
    1 – Pending;
    2 – SoftRegistered;
    3 – FullCapacity;
    4 – Unavailable;
    5 – Unregistered;
    6 – Unknown;

    Power State – This component returns the current power state of the machine. Possible values include the following:

    0 – On;
    1 – Suspending;
    2 – Resuming;
    3 – TurningOn;
    4 – TurningOff;
    5 – Suspended;
    6 – Off;
    7 – Unmanaged;
    8 – Unavailable;
    9 – NotSupported;
    10 – Unknown;

    Registration State – This component indicates the registration state of the machine. Possible values include the following:

    0 – Registered;
    1 – Initializing;
    2 – Unregistered;
    3 – AgentError;
    4 – Unknown;

    Summary State – This component indicates the overall state of the machine. Possible values include the following:

    0 – Available;
    1 – Preparing;
    2 – InUse;
    3 – Disconnected;
    4 – Unregistered;
    5 – Off;
    6 – Unknown;

    Is Assigned – This component denotes whether a private machine has been assigned to a user/users, or a client name/address. Possible values include the following:

    0 – True;
    1 – False;
    2 – Unknown;

    In Maintenance Mode – This component denotes whether the machine is in maintenance mode. Possible values include the following:

    0 – True;
    1 – False;
    2 – Unknown;

    Note: Before using this monitor you should provide the correct Machine Name as an argument.

    Note: By default, this monitor is disabled.

     

    This template is based on the following link: http://support.citrix.com/proddocs/topic/citrix-broker-admin-v2-xd7/get-brokermachine-xd7.html.

    Last updated: 1/21/2015