Adding a metric or property to a view errors "Instanced metric group cannot be empty"
search cancel

Adding a metric or property to a view errors "Instanced metric group cannot be empty"

book

Article ID: 378881

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

  Attempting to add a metric based on an object will throw the error "Instanced metric group cannot be empty".

Environment

Aria Operations

Cause

Built-in views are based on instance name or group.

Resolution

To resolve this issue:

  1. Make a copy of the view by going to Operations > Views > Manage.  Locate the view you want to configure, click the three dots next to the view name and click Clone.
  2. Rename the view and click Create.
  3. Under Views, find and select the view you just created, click the three dots next to the view name and click Edit.
  4. Click Next. Under the Data section, leave Add instance breakdown checked. 
  5. Select one of the metrics in the middle box and expand the Configuration box to the right. Search for the Metric name in the left box.
  6. Drag the metric into the middle box. You can set the Metric label to the same name as the existing metric. 
  7. Select the Instance Name property in the middle box (noted by "Name Instance Name" in the Configuration box)
  8. From the Metric Group drop-down in the Configuration box, select the metric group of the newly added metric. 
  9. Delete the original, duplicate metric from the middle box. 
  10. Verify that the "Instanced metric group cannot be empty" error has been cleared.
  11. Make any required updates or changes to the view and click the Update button. 



If the above does not get rid of the error, proceed with the following steps:

  1. Make a copy of the view by going to Operations > Views > Manage.  Locate the view you want to configure, click the three dots next to the view name and click Clone.
  2. Rename the view and click Create.
  3. Under Views, find and select the view you just created.  Click the Share View button on the upper right.
  4. Highlight EXPORT and click Export to export the view to a zip file.
  5. Create a view with the metric or property you want to add.
    1. Click Create under Views.
    2. Select List.
    3. Name the new view and click Next.
    4. Select the object of the metric or property you want in Add Subject.
    5. Locate the metric or property in the Data Selection and drag it over to the Data column.
    6. Verify the data in the Preview Source.
    7. Click Create to save the view.
    8. Export the view using steps 3 and 4.
  6. Extract both zip files.
  7. Navigate to the cloned view and open the content.xml file with notepad++ or your editor of choice.
  8. Navigate to the new view you created and open the content.xml file with notepad++ or your editor of choice in a separate tab.
  9. In the new view content.xml file, locate the metric you want to add to your cloned view.  This will start with <Item> and end with </Item>. Select and copy this entire entry to the cloned view above </List> and save to the file content.xml.  Example below of parent datacenter property:
                               <Item>
                                    <Value>
                                        <Property name="objectType" value="RESOURCE"/>       
                                        <Property name="attributeKey" value="summary|parentDatacenter"/>
                                        <Property name="isStringAttribute" value="true"/>
                                        <Property name="adapterKind" value="VMWARE"/>  
                                        <Property name="resourceKind" value="HostSystem"/>
                                        <Property name="rollUpCount" value="0"/>
                                        <Property name="transformations">   
                                            <List>  
                                                <Item value="CURRENT"/>
                                            </List>
                                        </Property>
                                        <Property name="isProperty" value="true"/>
                                        <Property name="addTimestampAsColumn" value="false"/>
                                        <Property name="isShowRelativeTimestamp" value="false"/>
                                    </Value>                     
                                </Item>
                            </List>  
                        </Property>
  10. From the UI, go back to Views and Manage.
  11. From the horizontal ellipsis click Import.
  12. Browse to the content.xml of the cloned view.  Make sure Overwrite existing View is selected and click Import.
  13. Verify the view is working by selecting the cloned view in the Preview source.