Virtualized desktop performance evaporates over time: Scheduling custom tasks to Login PI events

Performance in your virtualized desktop environment will often degrade over time. When this happens, it is so gradual that end users may not even notice. Until they do. Why does it happen? Applications gradually save more files, which again individually increase in file size each time an application is started by the end-user.
If left unchecked, performance degradation will eventually be noticeable and users will become frustrated. As we all know, unhappy end users not only make the IT administrator’s life difficult, but also result in lost productivity, potentially affecting the bottom line. In scenarios where workspaces or desktop-as-a-service is delivered from a provider, poor performance can indicate a failure to meet Service Level Agreements.
In this blog post I will share how to use Login PI to be notified if applications become slower and how you can add Custom Tasks to Login PI Events.
Microsoft Outlook becomes slower over multiple days, due to Outlook’s User Profile gradually increasing in size
By default Login PI calculates its standard threshold. The threshold is the median of the collected historical data, on top of this Login PI adds a fixed 60%. This conversion rate is based on research at many different customers with their own unique virtualized desktop environments. This means that if for example Outlook takes 1 second to start, Login PI adds the 60% on top of it and the Auto Threshold would be 1.60 seconds. When this threshold is reached Login PI will provide an alert. This is why a gradual increase, as explained, may not always generate the alerts as desired.
As you can see in the example above, Outlook becomes slower over the course of just one week. In order to get notified at the right time, you can configure your own fixed thresholds in Login PI.
To configure a fixed threshold, open the Login PI web interface landing page and browse to Configuration -> Workload Settings and select Thresholds.
Configure Login PI Workload Settings
The Thresholds configuration page appears and display the Workload actions, including the Thresholds based on Auto Thresholds (automatic thresholds provided by Login PI according to collected history data of a profile and its job).
Configure Login PI Workload Thresholds
To manually configure your own Thresholds, hover with the mouse position under the Custom column, select and configure the ones as desired. Hit Save.
This example enables all the Workload actions with a Threshold value of 1 second.
Configure Login PI Workload Thresholds to 1 Second
Instantly after this change (workload actions and their specific threshold values), I can see that my Login PI Alerts are gradually increasing as desired/intended. Browse to the Login PI web interface landing page and verify the Alerts page.
Login PI Workload Alerts page (Thresholds set to 1 Second)
So how can I get notified based on these alerts?
All Login PI alerts are also stored in the Windows Event Log and through Windows Task Scheduler you can add Custom Tasks to these events. For example you can send an email or send a SNMP trap.
First open the Windows Event Viewer, either via another machine in the same domain or directly from the Login PI server/services machine and browse to Applications and Services Logs -> PI – Alerts.
Windows Event Viewer - Workload Alerts page (Thresholds set to 1 Second)
Let’s also open the Windows Task Scheduler in the Login PI server/services machine.
Windows Task Scheduler
By default there is nothing in the Task Scheduler to verify and/or to configure. So let’s schedule a task step by step.
Step 1: On the top-level of the Task Scheduler, right mouse-click and select Create Basic Task.
Step 1: Windows Task Scheduler – Create Basic Task
Step 2: Provide a Task Name and, if necessary, a Description. Hit Next.
Step 2: Windows Task Scheduler – Create Basic Task Name
Step 3: Select the Task Trigger to “When a specific event is logged”. Hit Next.
We only want to trigger the Task Scheduler when Login PI writes a specific event.
Step 3: Windows Task Scheduler – Select the Task Trigger
Step 4: Select the PI - Alerts under the Log pull-down menu.
We only want to trigger the Task Scheduler when Login PI writes alerts to specific events.
Step 4: Windows Task Scheduler – Select the Task Log
Step 5: Select the Login PI - Alerts under the Source pull-down menu.
We only want to trigger the Task Scheduler when Login PI writes alerts to specific events.
Step 5: Windows Task Scheduler – Select the Task Source
Step 6: Specify the Login PI - Alerts Event ID correlated to the specific Windows Event Logs ID. Hit Next.
Verification step: Open the Windows Event Logs to make sure that we provide the correct Event ID. In this example, all my Event IDs are identical with 31302 as “ID”.
Step 6a: Windows Task Scheduler – Provide the correct Event ID to the Task
Step 6b: Windows Task Scheduler – Provide the correct Event ID to the Task
Step 7: Select what action you want the task to perform, when it triggers the configured Event ID – 31302. Hit Next.
Step 7: Windows Task Scheduler – Provide the Task Action to the Task
Step 8: This example shows how a simple .bat script is setup and configured, to trigger it accordingly when Login PI reaches a certain configured Threshold. So, select Start a program and hit Next. Browse and select your own created file. Select Finish.
Windows Task Scheduler – Provide the Task Action program/script requirements to the Task, Step 8
I will now receive messages on my Login PI server/services machine when my configured thresholds are reached.
That is how you configure Custom Tasks on Login PI Events. In my next blog, I will zoom in a bit more and explain the advanced settings of Windows Event Logs, Windows Task Scheduler and how to add certain PowerShell scripts in combination with Custom Tasks on Login PI Events.
Tags: How-to, Login PI, Monitoring, Best Practices, Support