Skip to content

Virtually Caffeinated

A double-shot of knowledge

Menu
  • About Me
  • Useful Links

About Me

Profile
Jeremy Wheeler

I am an experienced Consulting Architect for VMware’s Professional Services Organization, End-user Computing specializing in VMware Horizon Suite product-line and SDDC. I have over 23 years of experience in the IT industry. In addition to his past experience, I have a passion for technology and thrives on educating customers. Additionally, I have 10 years of hands-on virtualization experience deploying full-life cycle solutions using VMware, CITRIX, and Hyper-V. I also has 18 years of experience in computer programming in various languages ranging from basic scripting to C, C++, PERL, .NET, SQL, and PowerShell. I’ve received acclaim from several clients for my in-depth and varied technical experience and exceptional hands-on customer satisfaction skills. In February 2013, I received VMware’s Spotlight award for my outstanding persistence and dedication to customers and was nominated again in October of 2013. I was awarded 2015 – 2017 vEXPERT.

  • Home
  • 2015
  • March
  • 16
  • vROps 6, Supermetrics, and editing XML
vRealize Ops Manager

vROps 6, Supermetrics, and editing XML

Jeremy Wheeler
March 16, 2015April 22, 2015 6 mins

Contents

  1. Lab Setup: Custom Group
  2. Lab Setup: Super Metric
  3. Lab Setup: New Policy
  4. Creating a custom XML file
  5. Retrieving your object’s identifier ID (API Call #1)
  6. Retrieving your metric description (API Call #2)
  7. Modify your XML file
  8. Update your widget
  9. Validate your XML changes

How to find the metric description you can use for metric configuration in XML files. As with vROps 6 the way to retrieve the metric names from v5 doesn’t work anymore. This document explains how to utilize the REST API (Suite API) to achieve what some starting to struggle with. The word ‘Lab:’ in this document reference what steps I performed in my lab. The following flow-chart explains the high-level steps involved to present your Super Metric onto a Dashboard:

Lab Setup: Custom Group

In my lab I created the following:  

  • Custom Group
    • Name: Lab Desktops
    • Group Type: Environment
    • Policy: Default Policy
    • Membership criteria:
      • Criteria: VDI Desktop Pool


Lab Setup: Super Metric

Objective: For my testing I am determining the capacity used for a View Pool


  Super Metric creation and testing steps:

  • In section (1) of this picture you will enter your Super Metric formula or build your Super Metric based on the Adapter Type, Objects, Object Types, Metrics, Attribute types.
  • Once you complete your formula select (2) (blue play icon) to test your formula.
  • After testing your formula’s syntax window (3) will populate with the short-form formula.
  • Select (4) (the graph icon) to test the Super Metric. Note: You may need to select a timeframe to see results (see picture on next page for an example.)

 

 

 

My formula: sum(${this, metric=desktop_vms|pool_capacity_used})   Example of executing a Super Metric through the graph icon: 

Lab Setup: New Policy

My next step is to create new or modify a policy to make sure the Super Metric is active for the objects you want it to be assigned for.

Note: After assigning a Super Metric to a policy it should take 2 cycles (10 minutes) maximum till the Super Metric is visible and accessible via the “All Metrics” tab below troubleshooting. Assuming the related metrics are collected in 5min interval either.

  • Name: Lab Policy
  • Base Policy: vSphere Solution’s Default Policy
  • Override Attributes
    • Super Metric|vdi_pool_capacity
      • Type: Super Metric
      • Adapter Type: All Adapter Types
      • Object Type: All Object Types
      • State: Local
      • KPI: Inherited
    • Super Metric|vdi_pool_capacity
      • Type: Super Metric
      • Adapter Type: View Adapter
      • Object Type: VDI Desktop Pool
      • State: Local
      • KPI: Inherited
  • Apply policy to Group
    • Lab Desktops

Creating a custom XML file

  Create a copy of the appropriate XML file; do NOT edit canned XML files.

  • Copy XML process
    • Select the canned XML file
    • Select the pencil to edit
    • Select all contents (Ctrl-A) and copy into clipboard (Ctrl-C)
    • Click Cancel to stop editing the canned XML
    • Open your web browser to the following URL
      • http://codebeautify.org/xmlviewer
      • Past the XML contents into the XML input field and select the middle button ‘Beautify’
      • Select the two layered notebooks in the upper right or copy the contents in the Result dialog to clipboard
    • Select the green ‘+’ to add a new XML file
    • Enter the name of your new XML

Lab: In my lab we will call this file lab_desktop.xml

  • Past the newly formatted contents into the XML file

  Note: The next steps outline the process to inject a Super Metric into an XML. One requirement that should be identified is the internal name for the metric (Super metric) is required. There is a 2-way process.

  • Retrieve resource with resource identifier.
  • Use the resource identifier to retrieve resource metrics and their names

Retrieving your object’s identifier ID (API Call #1)

  Navigate to the following location:

  • From Home select Environment
  • Select
    • Inventory Tree that pertains to your Super Metric, or
    • All Objects and drill into the needed object or
    • Your custom group
  • Select your object under ‘Related Objects’
  • Click the ‘Troubleshooting’ tab
  • Select ‘All Metrics’
  • Find your needed object

Lab: “Lab Desktops” icon, i.e. our object

  • Open a new tab/browser window and navigate to the following URL:
    • https://<your vrops server>/suite-api/api/resources?regex=.*<Your object>.*

Lab: https://172.16.0.19/suite-api/api/resources?regex=.*Lab%20Desktops.*

 

Note: You can use the complete name or just a fraction. With “.*” at the beginning/end we make sure that we have not missed something. You should see a similar output dump to the following screenshot:

  • Verify the name of the object is correct

Lab: ‘Lab Desktops’.

  • Copy the identifier ID, you will use this for the next step

Retrieving your metric description (API Call #2)

Open a new tab/browser window and navigate to the following URL:

  • https://<your vrops server>/suite-api/api/resources/<your object identifier ID>/statkeys

 

Lab: https://172.16.0.19/suite-api/api/resources/31522d45-63d4-4d8c-b97a-8bae419a9fd5/statkeys  

 

You should see a similar output dump to the following screenshot:  Scroll until you find your Super Metric identifier ID. This is the name of the metric we are going to use for the interactive widget and the xml definitions.   Navigate to:

  • Administration
  • Manage Metric Config (two down from Super Metrics in the left panel)
  • Expand the tree ReskndMetric

Modify your XML file

  Modify your new XML file to reflect your Super Metric:

  • Find the section that has the ResourceKind that pertains to your Super Metric.

Lab: In our example we need ‘ViewPool’

  • Copy an existing line and past it, example shown below:

 

Modify your new string to match your requirements for the super metric. Lab:

  • <Metric red=”90″
  • orange=”85″
  • yellow=”75″
  • unit=”%”
  • label=”vdi_latency” (common name of your Super Metric goes here)
  • attrkey=”Super Metric|sm_b896a92d-657f-4cb2-b550-8ed4ff1526b6″ /> (past your Super Metric identifier ID in this section.)

Select ‘Save’   Verify your policy has the Super Metric setup in the overrides section.

Update your widget

  Navigate to:

  • Home
  • Dashboard List drop-down
  • Select your custom dashboard

  Edit Object Metric Charts widget

  • In the ‘Metric Configuration’ section
    • Use the drop-down and select your custom XML file from the list

Lab: ‘lab_desktop’

  • Select Save

Validate your XML changes

  Navigate to:

  • Home
  • Dashboard List drop-down
  • Select your custom dashboard

Lab: ‘Lab Dashboard’

  • In your View Sessions widget, select a VDI session

Lab: my session is mydomain\myuseraccnt

  • In your Session Related Objects widget, select a desktop pool

Lab: admin_vm pool   Your Object Metric Charts widget should update with the new Super Metric. You may need to wait a few cycles before the data is updated.

Share :
whosay

Written by  Jeremy Wheeler: Jeremy

Post navigation

Previous: vROps Change Master Node IP
Next: App Volumes, Google Chrome and AppStacks

Related Post

vROps Licensing

vROPS Python Adapter – A Hidden Treasure

vROps Change Master Node IP

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories

Recent Posts

  • Log Parsing Cheat Sheet
  • Virtually There: Presentations that Pop!
  • Cool Resources for your Kids at home during this time..
  • Move OmniGraffle Package to Flat Format
  • VMware User Environment Manager and Sysinternals BGinfo

Archives

RSS Press Releases

  • Antel to Trial VMware Telco Cloud Platform for their 5G Architecture January 26, 2023
    PALO ALTO, Calif.--(BUSINESS WIRE)-- Antel, the leading Mobile Operator in Uruguay, is working with VMware, Inc. (NYSE: VMW) for a use case driven trial using the VMware Telco Cloud Platform to support a Proof of Concept (PoC). With the emergence of 5G, communications service providers (CoSPs) have the opportunity to develop new business models, and […]
  • VMware Modernizes Point of Sale for Global Retailers January 16, 2023
    New VMware Retail POS modernization solution enables faster innovation, better ROI, and more agile and secure store operations NEW YORK--(BUSINESS WIRE)-- NRF 2023 — VMware, Inc. (NYSE: VMW) today unveiled a new solution to help global retailers modernize point of sale (POS) and unlock more financial value from their POS systems. Developed in collaboration with […]
  • VMware Named a Leader in Virtual Client Computing and European End User Experience Management IDC MarketScape Vendor Assessments December 19, 2022
    PALO ALTO, Calif.--(BUSINESS WIRE)-- VMware, Inc. (NYSE: VMW) today announced it has been positioned as a Leader in two recent IDC MarketScape reports on virtual client computing and end user experience management across both strategies and capabilities. IDC MarketScape: Worldwide Virtual Client Computing 2022-2023 Vendor Assessment (doc #US49857422, December 2022) IDC MarketScape: European ...
Copyright VMBUCKET.COM © 2020