WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple

Extracting VIN (vSphere Infrastructure Navigator) information using PowerCLI & vROps REST API

02.22.2017 by William Lam // 2 Comments

A request that I continue to receive from customers on a fairly regular basis is a way to extract the virtual machine application services and dependencies that is provided by vSphere Infrastructure Navigator (VIN) solution. Below is an example of what a VIN discovery might look like and in this case, it is actually mapping out the application and dependencies of itself.


Today, there is not a public API for VIN and although I have published several methods here, here and here on how to extract the information from VIN, the experience is still not very user friendly or easy to do.

Last week, while talking to a fellow colleague who works in our VMware Validated Design team, I found out that VIN actually has a vRealize Operations Manager (vROps) Management Pack and could potentially be useful in helping us retrieve the information generated by VIN.


Not having spent much time with vROps Management Packs, I understood at a high level they provided custom dashboards for vROps, but I was not sure if the data provided by the management packs could also be retrieved programmatically? It has also been some time since I have looked at the vROps REST API and specifically the "public" REST API which allows customers to retrieve the metrics collected from within vROps.

[Read more...]

Categories // Automation, PowerCLI, vRealize Suite Tags // infrastructure navigator, PowerCLI, vIN, vRealize Operations Manager, vROps

Exploring new VCSA VAMI API w/PowerCLI: Part 8

02.14.2017 by William Lam // 5 Comments

In Part 8, we are going to take a look how services are managed in a VCSA or PSC node which is provided by the vCenter Server Lifecycle Management system also referred to internally as vMon. You can interact with the vMon service using either the service-control utility which is only available via SSH or the VAMI APIs which are available remotely. As you probably have guessed, we will be using the VAMI APIs 🙂

VAMI UI Area of Focus

There is not a service view in the VAMI UI (https://[VCSA]:5480) for either the VCSA or PSC. However, this information is available as part of the VAMI information when logged into the vSphere Web Client by navigating to System Configuration->Nodes->Related Objects or System Configuration->Services.

VAMI APIs Used

  • GET /appliance/vmon/service
  • POST /appliance/vmon/service/start
  • POST /appliance/vmon/service/stop

PowerCLI Function

  • Get-VAMIService
  • Start-VAMIService
  • Stop-VAMIService

Sample Output

The Get-VAMIService will lists all available services for the given VCSA or PSC node that you are connected to. It provides the exact same output that you would see in the vSphere Web Client such as the name of the service, the current state, the health and whether the service is disabled or configured to start up automatically or manually.


The function also accepts a name parameter if you know the specific service you wish to query, for example here is the syntax for checking the Auto Deploy service which is named rbd:

Get-VAMIService -Name rbd

We can use the Start-VAMISerivce function and given a service name, we can start it as shown in the screenshot below.


Similialy, we can use the Stop-VAMISerivce function and given a service name to stop the service as shown in the screenshot below.

  • Exploring new VCSA VAMI API w/PowerCLI: Part 1
  • Exploring new VCSA VAMI API w/PowerCLI: Part 2
  • Exploring new VCSA VAMI API w/PowerCLI: Part 3
  • Exploring new VCSA VAMI API w/PowerCLI: Part 4
  • Exploring new VCSA VAMI API w/PowerCLI: Part 5
  • Exploring new VCSA VAMI API w/PowerCLI: Part 6
  • Exploring new VCSA VAMI API w/PowerCLI: Part 7
  • Exploring new VCSA VAMI API w/PowerCLI: Part 8
  • Exploring new VCSA VAMI API w/PowerCLI: Part 9
  • Exploring new VCSA VAMI API w/PowerCLI: Part 10

Categories // Automation, PowerCLI, vSphere 6.5 Tags // PowerCLI, vami, vcenter server appliance, vSphere 6.5

Exploring new VCSA VAMI API w/PowerCLI: Part 7

02.07.2017 by William Lam // Leave a Comment

In the previous article (Part 6), we demonstrated how you can easily associate the list of VMDKs to their respective OS partitions within a VCSA or PSC node, which is useful when you need to increase the disk capacity for a specific OS partition. In Part 7, we are now going to drill down a bit further into the underlying filesystem and retrieve both the storage capacity as well as utilization of each partition.

VAMI UI Area of Focus

There is not a granular view of the individual OS partitions within the VAMI UI (https://[VCSA]:5480). However, this information is available as part of the VAMI information when logged into the vSphere Web Client by navigating to System Configuration->Nodes->Monitor->Storage as shown in the screenshot below.


The workflow for retrieving the storage statistics using the VAMI APIs is also applicable for retrieving other statistics such as compute, memory and networking. You first need to retrieve the list of VAMI Statistic IDs that are available from the monitoring API endpoint which is demonstrated with the Get-VAMIStatsList function. From each VAMI Stat ID, you can also drill down further to get more details such as description and the unit of measurement. Once you have the Stat IDs that you are interested in, you can then perform a query based on a specific set of search criteria which can be time range (start and stop time), interval, etc. To demonstrate how the query API works, I have created the Get-VAMIStorageUsed function to demonstrate its usage.

VAMI APIs Used

  • GET /appliance/monitoring
  • GET /appliance/monitoring/query

PowerCLI Function

  • Get-VAMIStatsList
  • Get-VAMIStorageUsed

Sample Output

The first function Get-VAMIStatsList does exactly as it sounds, it simply lists all VAMI Stat IDs that are available. Most of the Stat ID names are pretty descriptive but you can always retrieve more information by performing a GET on /appliance/monitoring/[VAMI-STAT-ID].


As stated in the beginning, we are interested in the grabbing the storage stats. The Get-VAMIStorageUsed function takes a subset of the VAMI Stats ID, specifically the storage ones that map to the OS partitions and retrieves both the total and used capacity (MB) as shown in the screenshot below.

  • Exploring new VCSA VAMI API w/PowerCLI: Part 1
  • Exploring new VCSA VAMI API w/PowerCLI: Part 2
  • Exploring new VCSA VAMI API w/PowerCLI: Part 3
  • Exploring new VCSA VAMI API w/PowerCLI: Part 4
  • Exploring new VCSA VAMI API w/PowerCLI: Part 5
  • Exploring new VCSA VAMI API w/PowerCLI: Part 6
  • Exploring new VCSA VAMI API w/PowerCLI: Part 7
  • Exploring new VCSA VAMI API w/PowerCLI: Part 8
  • Exploring new VCSA VAMI API w/PowerCLI: Part 9
  • Exploring new VCSA VAMI API w/PowerCLI: Part 10

Categories // Automation, PowerCLI, vSphere 6.5 Tags // PowerCLI, vami, vcenter server appliance, vSphere 6.5

  • « Previous Page
  • 1
  • …
  • 43
  • 44
  • 45
  • 46
  • 47
  • …
  • 56
  • Next Page »

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...