• Brock Peterson

Adding vROps Adapter Instances with vROpsCLI

Updated: Apr 27

Your VMware vROps environment is up and running, you've connected the vSphere adapter to your vCenter/s, but now you need to deploy more, many more, and you don't want to do it manually.


Let's use the vROpsCLI! We'll discuss deploying vRTVS for Microsoft SQL Server adapter instances in this blog, but this same technique applies to any vROps adapter instance.


For those that aren't familiar with it, vROpsCLI is an open source command-line tool developed by the DevOps team back in the day at Blue Medora, specifically Steve Miller. Taken directly from its GitHub page: "A utility to assist in managing a vRealize Operation Manager (vROps) environment through the CLI. A user can perform MP installs and upgrades, licensing management, endpoint configuration, credential management, and more! The design is focused around exposing core functionality that can be scripted to make more complex solutions."


In this case, let's use it to build and deploy vRTVS MSSQL adapter instances. To get started, create the first adapter instance manually, mine looks something like this:

Now that we have a single adapter instance we can create more based on it. A more advanced addition of this same blog will show how to adjust adapter instance settings, stop|start adapter instances, delete them, etc. First, let's get vROpsCLI, it's available here: https://github.com/BlueMedoraPublic/vropscli


Downloads and soure code are available here: https://github.com/BlueMedoraPublic/vropscli/release


I'm going to run vROpsCLI on my vROps master node, so I'll download the package for Linux, but compilations for Windows and MacOS are available as well.


After download/upload it's available in /tmp on my vROps master node:

Basic usage documentation can be found here: https://github.com/BlueMedoraPublic/vropscli/blob/master/USAGE.md


First, we have to authenticate with vROps, do so as follows:

Now, let's get the existing MSSQL adapters:

We have five total adapters, including the one I created above. Let's extract the contents of that one with the getAdapterConfig command along with the ADAPTERID:

I output it to a file which we will use to start our build. We will add similar lines to this file for the adapter instances we want to build.

At this point we need a list of MSSQL servers to build adapter instances. Your lists will come in all forms, so you'll need to adjust your build script accordingly, but mine was VM on which the SQL instance was running and all were running the MSSQLSERVER instance. It looks like this.

I want to consume that file and output a line similar to the one already in getAdapterConfig.out. I wrote a BASH script to loop through the input file and append the payload line to the output file which we will use to create our adapter instances.

Let's run it!

Our output file now looks like this:

This is the file we'll use to build the additional adapter instances, let's do it!

We now have all the adapter instances we want! There is a lot more we can do with vROpsCLI: adjust advanced configurations, stop|start adapters, assign them to different collectors, etc. Hope this helps!




214 views0 comments

Recent Posts

See All