Without any ability to self-heal, fixing Citrix usually requires manual intervention to remediate problems. This leads to time spent on mundane tasks managing the care and feeding of Citrix. Automation of these tasks for fixing Citrix provides:
- No more manual intervention
- Fast issue resolution
- A fix before users become aware of problems
- Business continuity
In our latest release, eG Enterprise v7.2, we have added new auto-correction and auto-remediation capabilities for Citrix administrators that remove the need for scripting. There are a few issues that can be a cause of constant frustration for admins. Specifically, unregistered VDAs, full disk drives, lingering sessions, and high memory usage.
Inside the eG Enterprise console, an admin can simply configure auto-correction of these issues by enabling or disabling the following functions to turn on/off automation:
- Restoring Unregistered Citrix VDAs
- Resolving High Disk Space Usage Issues
- Automated Actions for Memory Usage
- Optimizing Resources from Idle and Disconnected Sessions
In future versions, we intend to add additional auto-correction actions via similar GUI interfaces with no need to write any scripts. These auto-correction activities are automatically audited and tracked so administrators are aware correction has occurred and so that they can retrospectively analyze auto-corrected workflows.
Auto-Fix 1: Restoring Unregistered Citrix VDAs
A very common reason as to why a user is unable to launch their published applications is because the Virtual App server is in an “Unregistered” state.
When a VDA is in an Unregistered state, it stops communicating with the Citrix Delivery Controllers. New sessions cannot be allocated to it. Users become frustrated and admins scramble to fix the problem.
eG can monitor the Registration state by using a performance test called Citrix Server Information. This test checks on the status of the server and provides answers to questions around the VDA like “Is it a virtual machine?”, or “Does it have a valid license?”.
One of the new eG Enterprise automatic corrective actions can be used to check the VDA registration state and if it is unregistered during its test interval time (say, 5 minutes or so), it will initiate an automated action to either restart Citrix services or restart the server.
The configuration of this is easy: simply navigate to Tests –> Specific Configuration, select the Virtual App server, and set the buttons to ‘Yes’. By default, these are set to ‘No’. If both the ‘Restart Citrix Services’ and ‘Restart Machine’ are set, then the eG agent will first attempt to restart two of the crucial Citrix services and if that doesn’t fix it, then a server restart will occur.
If you have multiple servers, then apply the configuration to all the others and let the magic begin.
Auto-Fix 2: Resolving High Disk Space Usage Issues in Citrix Environments
Disk space management is very important for file servers, profile servers, exchange servers, virtual app servers, and so on. Low or no disk space can degrade performance, resulting in a poor end user experience.
Most of the temporary files that your system creates are automatically deleted or purged, but others can accumulate. When temporary files accumulate, the server quickly runs out of disk space and may even bring the machine to a halt. Windows OS update failures can also result in large files filling up space.
Another new automation action in eG Agent can delete unwanted files from specific locations. This is supported on both Windows and Linux OSs.
Similar to the registration setting above, eG monitors and alerts on disk space, but if the admin can’t get to it in time, or is on a much-needed holiday, then you can change a setting in the “Admin” tab of the main console under Tests –> Specific Configuration.
Once you have selected ‘Yes’, click on the green plus sign to set up the rule. If you select the C drive, then a list of recommended file folders will automatically show up to help the administrator. You can at this point remove entries or add more files or folders to the list.
Some key facts about the automation:
- Multiple drives can be configured.
- For each drive, indicate when the action must be triggered (at what disk utilization level).
- For the OS drive, the default configuration cleans up the Adobe setup files, Windows defender definition updates, Windows defender scans, downloaded program files, etc.
- You can specify additional files and folders to be cleaned, using ‘;’ as a separator.
- For other drives, you could specify the absolute path of the files and folders to be cleaned once the drive utilization limit is reached.
Auto-fix 3: Automation of Actions for Fixing Memory Usage in Citrix Environments
Let’s start with a quick overview of Windows OS Memory usage:
- Modified memory is memory that was allocated by an application then removed from the application’s working set, usually because it hasn’t been used for a long time.
- Standby memory contains pages that have been removed from process working sets but are still linked to their respective working sets. The Standby list is essentially a cache. Standby memory is supposed to be released when memory is required, but this doesn’t always happen.
Automatic memory optimization in eG Enterprise allows modified and standby memory to be cleared/released so that applications get access to the memory they need, especially when a system is running low on memory.
Again, setting this up is as simple as going to the Agent Specific Configuration, selecting the Memory Usage test and changing the check buttons to ‘Yes’ for Automated Action Enabled and the other items shown in the image below (Figure 5). You can select which method of monitoring memory you prefer: by the amount of free memory remaining, or by the percent of memory utilized. Then select Modified or Standby memory, or both.
Once configuration is completed, eG Enterprise will track this automation process in the ‘Memory Usage’ test in our standard layer view. This way, the admin knows what has happened and when on each server.
If enabled, eG Enterprise will track the resultant automation incidents as shown in Figure 7.
Auto-Fix 4: Automatic Action on Sessions – Optimizing Resources from Idle and Disconnected Sessions
Both Idle and Disconnected Sessions in Citrix environments can waste precious system resources. eG Enterprise now includes automated actions out-of-the-box that can be used to tidy up sessions in these states.
To clarify:
- Idle session: A session where the user does not supply any input for a period of time.
- Disconnected session: A session where the user has left the session running but is not actively using it (typically by clicking on the “Disconnect” button in Workspace App or by closing the Workspace App without signing out). Session processes continue running on the Citrix server/desktop even after a user is disconnected. This can result in a waste of resources.
Actions on Idle Sessions: 1. Change Process Priority
Each process on Windows has a priority based on 6 levels:
- Realtime
- High
- Above normal
- Normal
- Below normal
- Low
Tasks with a higher priority are given preference to the allocation of system resources like CPU time and memory, allowing them to run faster.
How the eG Agent action on Idle Sessions work:
- When a session is idle, the priority of its processes is changed to below normal.
- When the user starts interacting again (session is no longer idle), the eG agent automatically reassigns the session’s processes to normal priority.
- Dynamic re-assignment of priorities helps active sessions have access to more resources.
Actions on Idle Sessions: 2. Trim Memory of Processes
Memory trimming is performed through the OS, where some of the allocated memory of a process from RAM is moved to page files. This makes RAM available for other applications.
Idle sessions have running processes. By trimming the memory of processes belonging to idle sessions forcibly, active sessions/process will get more access to RAM, and in turn, faster application response times.
The TRIM-TO-MEMORY setting sets the min limit below which trimming will not occur. Default limit is set to 10MB. Memory will be reclaimed automatically when the process becomes active in the user session.
Actions on Disconnected Sessions: 3. Log off sessions
How the eG Agent action on Disconnected Sessions works:
- Once a session is disconnected, wait a period of time, then logoff this session.
- Logging off the session terminates processes executed in the session.
- Resources now become available for active sessions on the server/desktop, avoiding unnecessary resource consumption.
To get started with these three actions, change the configuration for the test ‘Citrix Sessions’ and select ‘Yes’ to Automated Action Enabled. After which, you will see more options to set it up according to your best practices.
eG Enterprise will track these automated actions and log entries into the Detailed Diagnosis. This is so the admin is aware of all the steps taken to adjust the sessions accordingly.
eG Enterprise is an Observability solution for Modern IT. Monitor digital workspaces,
web applications, SaaS services, cloud and containers from a single pane of glass.
eG Enterprise is an Observability solution for Modern IT. Monitor digital workspaces,
web applications, SaaS services, cloud and containers from a single pane of glass.
Learn More
- Learn more about Remote Control Actions and Scripting in eG Enterprise: Automation & Scripting for Monitoring Systems (eginnovations.com).
- Read about eG Enterprise’s capabilities for Citrix Monitoring, see Citrix Monitoring Tools | eG Innovations and how eG Enterprise compares to native Citrix tools, see Compare eG Enterprise against APM and IT infrastructure monitoring tools in the market (eginnovations.com).
- Understand how AIOps capabilities in observability and monitoring tools allow the automation of many processes including monitoring deployment, setting thresholds and alerts and remediation in AIOps Powered Monitoring | eG Innovations.