This document describes the configuration requirements and options for leveraging the Perspectium vSphere Replicator Agent for replicating data between VMware vSphere and ServiceNow.
Currently the agent supports sharing data from vSphere to a ServiceNow instance, useful for the cases where you want to get virtual machines, host systems, datacenters and other resources from vSphere and save them as configuration items in ServiceNow.
In order to use this agent, the vSphere API and SDK will need to be running. It generally is running by default on VMware vSphere server systems but please contact your vSphere support for more information including the necessary SDK credentials required below.
|API/SDK URL||vSphere API/SDK URL, generally in the format https://vsphere_url/sdk|
|API/SDK Username||Username to access the vSphere API/SDK|
|API/SDK Password||Password to access the vSphere API/SDK|
Like other agents, default agent.xml configurations are required and can be found in Agent Configuration.
The Perspectium vSphere Replicator Sharer Agent will use the vSphere API/SDK notably its vSphere Web Services SDK to access the vSphere management components and other virtual infrastructure objects (datacenters, datastores, networks, and so on) and share these objects as records that a ServiceNow instance can then subscribe to receive.
The agent can access the SDK to share the following vSphere objects:
|Object Name||<vsphere_object> value (see configuration below)|
Current directives available specifically for the vSphere Share Replicator Agent are outlined in the following table:
|handler||<handler>com.perspectium.replicator.vsphere.VSphereSharer</handler>||The name of the vSphere handler class||Required|
|vsphere_connection||<vsphere_connection user="sdk_username" password="sdk_password">https://vsphere_url/sdk</vsphere_connection>||Connection information for accessing the vSphere API/SDK as mentioned in the above vSphere requirements||Required|
|vsphere_objects|| <vsphere_objects> |
|A list of vSphere objects to share. Only the ones listed above can be shared.||Required|
This example configures agent.xml so that the Replicator Agent will share virtual machines, compute resources, datastores and host systems from vSphere to a ServiceNow instance:
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?> <config> <agent> <share> <task> <task_name>vsphere_sharer</task_name> <handler>com.perspectium.replicator.vsphere.VSphereSharer</handler> <max_writes_per_connect>1000</max_writes_per_connect> <polling_interval>15</polling_interval> <encryption_key>The cow jumped over the moon</encryption_key> <message_connection user="username" password="password" queue="psp.out.servicenow.instance">http://localhost</message_connection> <vsphere_connection user="vsphere_username" password="vsphere_password">https://vsphere_url/sdk</vsphere_connection> <vsphere_objects> <vsphere_object>vm</vsphere_object> <vsphere_object>compute_resource</vsphere_object> <vsphere_object>datastore</vsphere_object> <vsphere_object>host_system</vsphere_object> </vsphere_objects> <topic>replicator</topic> <type>vsphere</type> <name>will be overridden</name> <key>vsphere_agent</key> </task> </share> </agent> </config>
To properly subscribe to messages sent by the vSphere Replicator Sharer Agent, an update set is available that will create import set tables to map the records received in these messages to the appropriate cmdb_ci table.
The update set will create the following import set tables:
You can then subscribe to the above tables to read in messages from the vSphere Replicator Sharer Agent and have them transformed and imported into a target cmdb_ci table as defined in each import set table. Since these import set tables are available for editing after installing the update set, you can modify them as desired in case the default transform maps do not fully suit your needs.
Please contact email@example.com to request this update set and for more information.