Blogging about virtualization
Associating Custom Attributes in vFoglight
I am often asked how to associate a custom attribute in vCenter to a group in vFoglight. To do this in vFoglight we create a Service. For an example I’m going to use the Custom Attribute called “Business Unit” to create service for all VMs that have “Business Unit” set to “Sales”
First, we need to turn on Custom Attribute collection. In vFoglight Pro 6.0, the default collection is to not collect CA’s. To change this, we must navigate to the collector installation path.
- If you have a default installation it is C:\Program Files\Vizioncore\vFoglight\VMware Agent
- Edit the FoglightAgent.WinService.exe.config with your favorite text editor
- Look for IncludeCustomAttributes
- Change the value from False to True
- Save the file and Close
- Restart the vFoglight Collector & Connector services from Windows Services
After those steps are complete you will now get custom attributes to start showing up in vFoglight Pro. Now, to create some services! Let’s start by navigating to the vFoglight Dashboards Services Service Builder.
From here click Add a New Category and give your Category a name, for example “Business Units” and click Create.
Under the Actions for the new Category, select Add.
Click “Create a new service contained by this service” & select Global Service

Since this is for sales I will call the name “Sales” and click Create.
Now that the “Sales” Service is created we need to add VMs to it.
Under the Actions for Sales Service, select Add.
Click “Create a rule to include a group of components”
I need to assign a name for this rule, which I will call “Sales VMs”.
Next I need to select the type of objects I am looking at, in this case Virtual Machines.
Lastly I need to create the rule condition, which is:
name like ‘%’ && $object.customAttributes.name matches ‘Business.Unit’ && $object.customAttributes.value matches ‘Sales’
At this point I could test the rule to see if it returns the objects I want, but since I know the query is correct I will simply click Create and I will have the components added. I can now see that all of the VMs with the Business Unit that equals Sales are added to my Service. At this point any other service related view or action will apply to this new service. This means I can easily report against the SLA, Health and Availability for my Sales Service.
| Print article | This entry was posted by Kix on 10-Jan-10 at 10:54, and is filed under Vizioncore, vFoglight. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |





