Runecast Analyzer plugin for vRO

Share this:

In previous article at Runecast.biz I’ve described a use case for consuming the Runecast Analyzer REST API from vRO to remediate specific KB. It’s a valid option, but I felt there was too much overhead – adding REST endpoint, adding REST operation, taking care of each request and parsing the response with JavaScript. The time has come to make this a little easier. Runecast released plugin for vRO! It’s currently at version 1.0.0 aiming the audience of automation enthusiasts. It makes the integration between Runecast Analyzer and vRO much faster. The plugin is distributed as standard .vmoapp package available for download and supported on vRO 7.x.

Installation

vRO plugins are installed via the control center accessible at https://<vRO IP or FQDN>:8283/vco-controlcenter. The installation process is simple enough (pointing to the .vmoapp file and accepting EULA), therefore no need to go into details here.
Note: Some vRO versions require the services to be restarted in order the changes to take effect.

First Steps

Once the plugin in installed you can register your Runecast Analyzer with vRO. The easiest way is to use the provided workflow available at Library -> RunecastAnalyzer -> Configuration -> Add RunecastAnalyzer. You will need to provide name, IP or FQDN, access token and choose if the certificate should be silently accepted.
Note: Some vRO versions require the services to be restarted after importing certificates to the internal trust store in order the changes to take effect.

After the workflow completes, ensure your Runecast Analyzer instance is visible in the vRO inventory:

Using the plugin

Let’s create a simple workflow to demonstrate how the plugin works. Add a Scriptable task and navigate to the Scripting tab. In the API explorer view, browse to RunecastAnalyzer. The instance of Runecast Analyzer that we added earlier is object of that class. It has 3 attributes (name, address and accessToken) and 3 methods (getAffectedByKB, getAffectedByKBinVC and getIssues). The one liner below shows how you can store your Runecast Analyzer instance in a variable in order to access its attributes or methods:

var rc = RunecastAnalyzerManager.getRunecastAnalyzer("name");

Now the methods mentioned above can be simply called with rc.methodName(parameters). Let’s review them in more details here:

  • getAffectedByKB – accepts the KB ID as parameter and it will return the affected objects by the KB across all vCenter Servers registered with Runecast Analyzer. The return type is an array of rcAffectedObject. Each object of that type has 3 attributes – name, moid, and vcUid of the vCenter Server the object belongs to.
  • getAffectedByKBinVC – accepts the KB ID and VCUID as parameters. It returns the affected objects by the KB in the specified vCenter Server. The return type is an array of rcAffectedObject.
  • getIssues – Returns the result for all KB, BP and SH from Runecast Analyzer. The return type is an array of rcIssue. Objects of this type have attributes describing the issue such as title, severity and type, which can be used to filter out the results. All attributes of rcIssue object along with their types can be reviewed via the API explorer.

The communication between vRO and Runecast Analyzer is handled by the plugin, so you get what you’re looking for fast, without huge scripts and manually parsing pure REST response body. Here it is in action:

var affectedObjects = rc.getAffectedByKB("2146345");
for each (var affected in affectedObjects) {
  System.log(affected.name+": "+affected.moid+" owned by: "+affected.vcUid);
}

The the returned results:
The attributes of rcAffectedObject can be easily used by other workflows to convert to actual VC managed objects and perform remediation actions on them.

The Runecast team listens closely to the community. What additional functionality would you expect from the vRO plugin? Tweet with #RunecastAPI hashtag!

The following two tabs change content below.

Ivaylo Ivanov

Ivaylo has 5 years of professional IT experience. Most of it in server administration area, network and virtualization technologies. From 2014 he specializes in VMware products family. He holds VCIX6-DCV and VCP7-CMA certifications. vExpert 2016/2017

Latest posts by Ivaylo Ivanov (see all)

About Ivaylo Ivanov

Ivaylo has 5 years of professional IT experience. Most of it in server administration area, network and virtualization technologies. From 2014 he specializes in VMware products family. He holds VCIX6-DCV and VCP7-CMA certifications. vExpert 2016/2017
Bookmark the permalink.

Leave a Reply

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