vFoglight 6.5 - Automate alert remediation

In vFoglight we have had detect and diagnose capabilities since the introduction but in vFoglight 6.5 we introduce automation to complete with resolve capability.

So from detect what is wrong and why to automatically correct it for you once you approve it, how cool and timesaving isn´t that?

I am going to introduce Automation and show an example how this can be used in a very common and useful scenario, alert remediation.

Instead of manually going into Virtual Center and reconfigure VMs that vFoglight have detected and diagnosed as misconfigured (fixed memory limits for example) you will be able to click on a button in the alarm to resolve it! I have lost count how many times I have manually reconfigured memory limits in my life, for some reason they tend to always come back. One thing is certain, I will not miss this task :)

Task automation is based on workflows (predefined tasks executed in order), we have provided many predefined workflows (VMware and Hyper-V) and you can build your own workflows to extend the capabilities (not being part of this blog though).

In order to be able to execute workflow automatically (executed by you) you need to configure a few things first:

Step 1. Add Automation role and Assign Virtual Center credentials to your vFoglight user.

Add Automation role:

Goto Dashboards - Administration - Users & Security

VMware Automation User - Assign groups - Select a group where your user is member of. Could be existing group or you can create a custom group.

Assign Virtual Center Credentials: This is done under Dashboards - VMware - Automation Configuration

Click on your Virtual Center and then Assign Credential to add your Virtual Center user name and password. These credentials will be used when you run a workflow in your VMware environment.

If your Virtual Center user don´t have required permissions for a task the workflow will fail.

If you can´t assign credentials you must first assign your vFoglight user "VMware Automation User" role. See above.

Once you have added your credentials you will see a gold key. Now you can execute workflows against your VMware Environment.

This step must be repeated for all your vFoglight users!

If you have Hyper-V in your environment the procedure is the same.

Step 2. Map rules to workflows: Goto Homes - Automation - Remediation Mapping - Add Rules

Filter on limit and select VMW Virtual Machine Memory Allocation versus Limit rule - next

Select the two Set Memory Limit workflows as below - Finish

Now we have mapped an alarm with two workflows. These where predefined workflows and you can extend automation by building your own workflows.

Step 3. To further automate this we need to configure what VM we want to execute our workflow against, in this example we are going to use the VM name from which the alarm came from.

Click on one of the two workflows (this must be repeated for both workflows)

Click on mapping - Bind to a property of the rules scope object (2nd option below)

Then scroll down and select virtualMachine - set

This will use the VM name in the alarm as input in the workflow.

Click set and you are done. Remember to repeat workflow parameter mapping for all workflows if you have multiple, otherwise you will we prompted for VM name as input when you run the alert remediation.

So now we have configured everything and now we want see this in action.

Goto VMware - vmAlarms and find a VM memory limit alarm (if you don´t have one configure a memory limit to lower than your allocation and vFoglight will detect it and raise an alarm)

Once you have opened the alarm goto Remediate tab and there are our two workflows we configured.

Choose VMware vCenter: Set Memory Limit to Unlimited and click on the green triangle which will execute the workflow and resolve the problem.

If you wait a bit and refresh vmAlarms dashboard you will notice that alarm is gone.

Workflows execution status can be monitored on Automation - Task Management page.

If your workflow execution isn´t working and you need you need to troubleshoot, look in the latest FMS log (e.g. ManagementServer_2010-11-23_144934_001.log located in install directory)

This was just one use case how you can start use Automation, there are many ways this can be used.

Please share your favorite use case for automation with us! The more feedback we get from our partners and customers the more we can improve the product!

Hope this helped you to understand how to configure automation and it will free up some of your valuable time :)