Using EdgeSight with Provisioned XenApp Servers

Share Button

Using EdgeSight in provisioned XenApp environments can be tricky if you don’t follow the proper installation steps.  Monitoring provisioned XenApp servers is pretty straight forward and easy to setup with minimal requirements.  In this blog post I am going to go over what the requirements are for provisioned XenApp servers and how to setup the EdgeSight for XenApp agent.

What is required to use the EdgeSight for XenApp Agent when provisioning XenApp servers?

The EdgeSight for XenApp agent requires a local persistent disk when used in provisioned XenApp environments.  What this means is you need to setup a local disk, whether streaming XenApp to virtual or physical machines, for the EdgeSight data.  This local persistent disk is already setup if you using the Standard vDisk mode with write cache on target device hard drive.  If don’t have this setup, you are either placing the Provisioning Services write cache in the target device RAM or on the Provisioning Servers/shared location. 

Along with EdgeSight data, you can also store Windows Event Logs, Crash Dumps, Windows Page File, and Application Streaming rade cache on the local persistent disk.

Installing the EdgeSight for XenApp Agent

Installing the EdgeSight for XenApp Agent is the same process as installing it on a non provisioned XenApp server except for the following:

  • When installing the EdgeSight for XenApp agent, the vDisk must be in Private Mode.
  • At the Agent Location dialog, change the default location  of the data files folder to your persistent local disk.  Default location is C:Documents and SettingsAll UsersApplication DataCitrixSystem MonitoringData for Windows 2003 or C:ProgramDataCitrixSystem MonitoringData for Windows 2008.  Change this to your local persistent disk.  For example if my local persistent disk is E:, I would change the data files folder to something like E:CitrixSystem MonitoringData.

  • When the install completes, click NO when prompted to reboot.

  • Set the Citrix System Monitoring Agent service startup type to Manual.

 

  • Reboot

If you accidentally reboot before setting the Citrix System Monitoring Agent service startup type to Manual, see the EdgeSight Install Guide pages 47 to 48 for steps to clean up the XenApp for EdgeSight Agent install.  Starting the Citrix System Monitoring Agent while in Private Mode can cause registry settings to be generated that only apply the vDisk image that is in Private Mode that are pushed out to all Target Devices when the vDisk is change back to Standard Mode.

Now before shutting down the XenApp server and placing the vDisk image back into Standard Mode, you have two options:

  • Change the Citrix System Monitoring Agent service startup type to Automatic so the service starts automatically in Standard Mode.
  • Leave the Citrix System Monitoring Agent service startup type to Manual and control service via startup scripts.

I like to control the service via startup scripts so the Citrix System Monitoring Agent service only starts when the vDisk is in Standard Mode.  See the following example script that detects the vDisk mode and only starts the Citrix System Monitoring Agent service if the vDisk is in Standard Mode.  The script will also write and event to the Windows Event Log.

@Echo off
REM Script by Jarian Gibson for Provisioning Services and EdgeSight
REM Add this script as a startup script in Group Policy.
REM Set the Citrix System Monitoring Agent service (EdgeSight) to manual startup.
REM ***************************************************
REM This section will check to see the PVS vDisk Mode.
REM If the PVS vDisk is in Private Mode, then the EdgeSight service will not start.
Type C:Personality.ini | FIND /I “$WriteCacheType=0” >nul
If %errorlevel%==0 (
Echo “Warning: Private Mode vDisk – Citrix System Monitoring Agent Service (EdgeSight) Will Not Start”
REM Write Warning to Windows Application Event Log                         
eventcreate /t warning /id 100 /l application /so EdgeSight /d “Private Mode vDisk – Citrix System Monitoring Agent Service(EdgeSight) will not start.”
GoTo NoEdgeSight 
)
Net Start RSCorSVC
Echo “Info: Standard Mode vDisk – Citrix System Monitoring Agent Service (EdgeSight) Will Start”                             
REM Write Info to Windows Application Event Log                          
eventcreate /t information /id 100 /l application /so EdgeSight /d “Standard Mode vDisk – Citrix System Monitoring Agent Service(EdgeSight) will start.”
:NoEdgeSight
REM ***************************************************

This script can be combined with my script from my previous blog Updating Provisioned XenApp vDisks: To XenAppPrep to not to XenAppPrep? to detect the vDisk mode and only start the XenAppPrep service and Citrix System Monitoring Agent service if the vDisk image is in Standard Mode. 

@Echo off
REM Script by Jarian Gibson for Provisioning Services for XenApp with EdgeSight and XenAppPrep
REM Add this script as a startup script in Group Policy.
REM Set the XenAppPrep service to manual startup.
REM Make Sure EdgeSight Agent for XenApp Agent is installed, set service to manual startup, and local database files are on local PVS cache disk.
REM ***************************************************
REM This section will check to see the PVS vDisk Mode.
REM If the PVS vDisk is in Private Mode, then the Citrix System Monitoring Agent Service(EdgeSight) and XenAppPrep service will not start.
Type C:Personality.ini | FIND /I “$WriteCacheType=0” >nul
If %errorlevel%==0 (
Echo “Warning: Private Mode vDisk – Citrix System Monitoring Agent Service (EdgeSight) and XenAppPrep Service Will Not Start”
REM Write Warning to Windows Application Event Log                         
eventcreate /t warning /id 100 /l application /so EdgeSight_XenAppPrep /d “Private Mode vDisk – Citrix System Monitoring Agent Service(EdgeSight) and XenAppPrep Service will not start.”
GoTo NoEdgeSightXenAppPrep 
)
Net Start XenAppPrep
Net Start RSCorSVC
Echo “Info: Standard Mode vDisk – Citrix System Monitoring Agent Service (EdgeSight) and XenAppPrep Service Will Start”                             
REM Write Info to Windows Application Event Log                          
eventcreate /t information /id 100 /l application /so EdgeSight_XenAppPrep /d “Standard Mode vDisk – Citrix System Monitoring Agent Service(EdgeSight) and XenAppPrep Service will start.”
:NoEdgeSightXenAppPrep
REM ***************************************************

So as you can see, using EdgeSight with provisioned XenApp Servers is pretty straight forward as long as you following the proper installation steps.  Just make sure you have a local persistent disk for the EdgeSight database files, do not reboot when the EdgeSight for XenApp agent install completes, and set the Citrix System Monitoring Agent service to startup type to Manual.  Using the script examples above you can control the services thru Group Policy startup scripts.

Update: As of EdgeSight 5.2 Service Pack 1, you no longer need to set the Citrix System Monitoring Agent Service to manual.  The EdgeSight Agent is smart enough to detect the vDisk mode and won’t start in Private Mode just like it does with the EdgeSight for Virtual Desktop Agents in XenDesktop.  Thanks to Joe Shonk for pointing that out.

How do I use the EdgeSight for XenApp Agent with provisioned XenApp Servers in Private Mode?

All you have to do is set the REG_DWORD IgnorePVSMode to 1 in the registry at HKLMSoftwareCitrixSystem MonitoringAgentCore4.00.  Thanks to David Sachon from Citrix for helping me out in the Citrix Support Forums.

If you have found this article interesting or if you have any other insights, please feel free to leave comments on this article.

Share Button
  1. VibranzeVibranze02-28-2012

    Hi Jarian,
    I have an issue where the persistent disk used for edgesight always went offline everytime i restart the target device and this has caused the edgesight server didn’t receive any reporting. Any pointers on this?
    Thanks.

  2. Jeem JeemJeem Jeem12-20-2011

    Worth noting that if you copy and paste the script into a Notepad doc that some of the characters do not translate properly and cause issues when you run the script as a batch file. The characters in question seem to the beginning and ending quotation marks and the dash or hyphen in the information messages.

Leave a Reply to Jeem Jeem Click here to cancel reply.