Troubleshooting the eG Citrix Monitor

As mentioned already, the eG agent monitoring Citrix Virtual Apps servers of version 6.0/6.5 uses powershell scripts to run tests and pull out metrics from these servers. If the Virtual Apps tests fail, then, first check whether the Powershell SDK pre-exists on the eG agent host. If not, download the SDK from http://community.citrix.com/display/xa/Virtual Apps+6+PowerShell+SDK, and install it on the monitored Virtual Apps server. Once the SDK is installed, the eG agent should be able to execute the powershell scripts on the monitored Citrix Virtual Apps servers (v6.0/6.5) without any additional configuration. However, if the tests continue to fail, then check whether any Active Directory Group Policy has been configured to prevent the execution of powershell scripts. If so, you can do either of the following:

  1. Change the Group Policy definition to allow the execution of the powershell scripts, (OR)
  2. Reconfigure the target Virtual Apps server alone to allow script execution

Each of these steps have been detailed below:

Changing Group Policy Definition

To modify the Active Directory Group Policy to allow script execution, do the following:

  1. Login to the Active Directory server.
  2. On Windows 2012, follow the Start -> Programs -> Administrative Tools -> Group Policy Management menu sequence. 
  3. From the tree-structure in the left panel of the window that appears, select the node that represents the group policy of interest to you.
  4. Right-click on the group policy and select the Edit option.
  5. The window depicted by Figure 1 will then appear. In the left panel of this window, expand the node representing the policy you have chosen to modify, and then follow the node sequence, Computer Configuration -> Administrative Templates -> Windows Components -> Windows Powershell (as indicated by Figure 1).

    Figure 1 : Editing the group policy

  6. The right panel will change to display a Turn on Script Execution setting (see Figure 1). Right-click on that setting and select Edit. This will invoke Figure 2.
  7. Select the Enabled option from Figure 2 to turn on script execution, and then click the Apply and ok buttons to save the changes.

    Figure 2 : Turning on script execution

Reconfiguring the monitored Citrix Virtual Apps server

Typically, if the powershell script execution policy has been set to Restricted for a Virtual Apps server, then, upon installing an eG agent on that server, the execution policy will automatically change to RemoteSigned. This will enable the eG agent to execute powershell scripts on that server and report metrics.

Note:

If the execution policy for a Virtual Apps server has already been set to Unrestricted or RemoteSigned, the eG agent setup process will not alter that setting.

However, if you later define an AD group policy setting that restricts script execution, then the group policy setting will over-ride the server-specific setting. In such cases, the Virtual Apps tests will fail. If you do not want to change the Group Policy definition to allow script execution, then, you can set the script execution policy of the target Virtual Apps server alone to RemoteSigned, so that the eG agent on that server can execute powershell scripts on the server. For this, do the following:

  1. Login to the agent host.
  2. First, check the execution policy of the Virtual Apps server. For this, from the PowerShell command prompt, switch to the root directory, and issue the following command:

    get-ExecutionPolicy

  3. If the output of this command is RemoteSigned, it indicates that the eG agent has the privileges required for script execution. On the other hand, if the output of this command is Restricted, you may have to change the policy to RemoteSigned to enable the eG agent to execute the scripts. For this, from the PowerShell command prompt, switch to the root directory, and issue the following command:

    set-ExecutionPolicy remotesigned