If you have ever needed to insert custom metrics (stats) into a vRops object this next post is for you!

I needed to extract some metrics from vCenter for host NIC’s which are not available in vRops by default…. so I built this powershell script to extract and push the metrics into vRops using the suite-api.

So the script calls vCenter using PowerCLI and Get-Esxcli to get the stats for all hosts which are connected, powered on & for the NIC’s that are “connected”… it then uses the suite-api to push those metrics into vRops.

Here is an example from the GUI and the API:

As you can see below the metrics now exist in vRops for the object

And here is an example of it in the api

The script can be setup on a scheduled task using parameters below…

and here is the script!!