VMware Advanced Monitoring for Horizon powered by ControlUp - Automated Actions Clean System Drive Demo

In this quick walkthrough we're going show you how you can use the Automation Actions feature within ControlUp to resolve frequently occurring issues. This example will show how you can automatically clean up a Windows system drive that is almost full.

Overview


  • Section 1: Connect to all monitored resources.
  • Section 2: Focus on the ControlUp-Demo-Targets folder then the Default Dashboard in the Machines View.
  • Section 3: Scroll to find the "Free Space on System Drive" metric. Review the "Clean System Drive" trigger.
  • Section 4: Fill the machines system drive with data to trigger the automated action.

 Before you Begin


In order to complete this product walkthrough please make sure you have the following:

  • A valid account in the VMware TestDrive environment, sign up here if you do not have one.
  • TCP & UDP ports 80, 443, 8443; and if using PCoIP, both TCP & UDP 4172
  • Latest Horizon Client installed, available via direct download here.
  • A ControlUp user account on TestDrive. See this article for info on how to access ControlUp on TestDrive and create an account.

Here is a short video demo of this walk through.

ControlUp Advanced Monitoring for Horizon - Automated Actions Clean System Drive Demo

In the scenario, we are going to show a simple automated action. Automated actions work via our triggering  and alerting system.  Triggers can be activated by a number of different scenarios, including when

  • the Stress level on an object hits a threshold.
  • when an individual metric hits a defined threshold.
  • when a specific Windows event is detected.
  • when a machine goes down.
  • when a process starts or stops.
  • when a specific user logs on or logs off.
  • when a session state changes.

The trigger and alert system can notify you via email, event log, smtp etc... when a trigger is activated. Automated actions adds the ability to also take an action when a trigger is activated. Here is a short video that explains Automated Actions.

In this scenario, we are going to run a simple automated action that automatically cleans up the windows system drive when it is almost full.

SECTION 1: Connect to all monitored resources.

Right Click on the TestDrive-vmwtd.com folder in the left pane, then select "Connect" in the context menu to connect to all the monitored resources.

TestDrive-Connect.png

 

Section 2: Focus on the ControlUp-Demo-Targets folder then the Default Dashboard in the Machines View.

In the left pane, right click on the upper most folder that is titled "ControlUp-Demo-Targets" and select "Focus" in the context menu.

TestDrive_UXMetrics_Focus_ControlUp-Demo-Targets.png

In the central dashboard grid view, click on the "Machines" object to view virtual machines in the Horizon environment.

TestDrive_MachineView.png

Section 3: Scroll to find the "Free Space on System Drive" metric. Review the "Clean System Drive" trigger.

Click and drag the scroll bar at the bottom of the screen to the left until the "Free Space on System Drivel" metric is visible on the screen as you see below.

TestDrive_FreeSpaceOnSystemDrive_Scroll.png

Next, let's review the existing trigger and automated action that we will be running in the scenario. Ensure the Home menu at the top left is selected. The click on the "Triggers" button highlighted below.

TestDrive_TriggersButton.png

The first trigger you should see in the list is named "AAD_Clean System Drive if less than 1 GB". AAD demo is short for "Automated Actions Demo". The "Enabled" box on the far left should be checked, and the "Auto Action" box on the far right should be checked as well. Click once on the trigger to highlight, then Click "Edit" in the menu bar.

TestDrive_ReviewCleanSystemDriveTrigger_TopLevel.png

The first screen shows that this trigger is related to the "machine" object. Click "Next" at the bottom.

TestDrive_Edittrigger_StepOne.png

The next screen allows you to see the trigger conditions and edit when it is activated. If you click "Filer Editor" at the bottom of the "To this state"" box, you can see the specific conditions that activate then trigger.

TestDrive_EditTrigger_StepTwo.png

In the next screen, you can see that this trigger is activated when the free space on the system drive is less than or equal to 1 GB. Click "Cancel" in the bottom right.

TestDrive_EditTrigger_StepThree.png

Click "Next" in the bottom right of the window.

TestDrive_EditTrigger_StepThree_Next.png

In the next window, you can see that this trigger is set only for virtual machines in the "ControlUp-Demo-targets" folder and that it is specified to run all days of the week. Click "Next" in the bottom right.

TestDrive_EditTrigger_StepFour.png

In this window you can that the specified action is to run a script action that is built specifically to "Clean that Windows System Drive" You can also see at the bottom left that this action will wait at least one minute before repeating. Click "Cancel" in the bottom right.

TestDrive_EditTrigger_StepFive.png

Now that you understand how the trigger and automated action is set up, the next step is to fill the drive and trigger the automated action.

Section 4: Fill the machines system drive with data to trigger the automated action.

In order to clean up a Windows System drive automatically, we need one that is full. Our first step is to leverage a script action to fill up a Windows system drive. Before doing this, it is recommended that you scroll to the right to move the "Free Space on System Drive" metric to the far right side of the screen so it is still displayed when the Script Action window opens up.

TestDrive_MoveFreeSpacetoFarRight.png

Right click on the first machine in the list in the dashboard, then click on "Recommended Actions". In the new menu that appears, click on "Demo - Fill C:\windows\temp".

TestDrive_FillWindowsTemp.png

After you invoke this script action to fill the Windows temp drive, a new window will pop up. Make sure the "Maximum GB" the script will copy to the Windows system drive is equal or greater than the amount of free space on the Windows system drive on the target machine. In the screenshot below, you see that the target machine has 15.3 GB free on the system drive. The default value for this Script Action in TestDrive is 19 GB which is a larger value, so there is no need to change this value. Click "Ok" in the bottom of this window. 

TestDrive_FillWindowsSystemDrive_Firstscreen.png

The script action will fill up the system drive very quickly. Once you see the message in the script window "There is not enough space on the disk." look to the right at the "Free Space on System Drive" metric. Within a few second you will see that the metric turns red as the system drive is full.

TestDrive_FillWindowsSystemDrive_Completed.png

Close the Script Action Window and watch the "Free Space on System Drive" metric on the right side of the screen. Within a few seconds you will see the Automated Action has been triggered and automatically cleaned the Windows system drive on this target machine.

TesDrive_CleanSystemDrive_ScriptActionCompleted.png

 

Have more questions? Submit a request

Article is closed for comments.