The Real-Time CMDB for VMware provides a Perl based Docker image that collects real-time updates from the VMware vSphere API and then updates a ServiceNow CMDB instance, in effect providing timely CMDB accuracy for VMware inventory objects.
- ServiceNow instance with the VMware plugin, Geneva+
- VMware vCenter, version 4.1+
- Docker
The ServiceNow update set provides a scripted REST interface and script include used to receive and process updates from the collector agent.
- Import update set.
- Commit update set.
- (Optional) Create a user on the ServiceNow instance. Alternatively, use an existing user credential from your ServiceNow instance.
The Docker collection agent runs a Perl process that connects and monitors the VMware vCenter API for update notifications. The agent configuration, including username and passwords for VMware and ServiceNow, are defined in a configuration file vmwrt.json. The template configuration file can be found here.
- Download vmwrt.json.template to your Docker host.
- Rename vmwrt.json.template to vmwrt.json.
- Modify vmwrt.json. Specifically the host, user, and pass properties for both servicenow and vmware.
- Run Docker collection agent. Specify the parent directory that contains the vmwrt.json file.
- Verify Docker collection agent is running.
{
"servicenow": {
"host": "your-instance.service-now.com",
"user": "instance.username",
"pass": "instance.userpass",
"path": "/api/snc/vmwrt_cmdb"
},
"vmware": {
"host": "vcenter.localdomain",
"user": "vc.username",
"pass": "vc.userpass"
},
...
}
docker run -d --name vmwrt -v ~/vmwrt/etc:/opt/vmwrt/etc snitom/vmwrt:latest
docker logs -f vmwrt
This project was built primarily to illustrate the concept of real-time updates leveraging VMware's PropertyCollector API model. Currently, it is fairly limited in the amount of data collected. It also does not implement CMDB CI relationships in ServiceNow, so it cannot replace standard cloud discovery schedules.
Functionality that can be validated:
- Object delete, create, rename
- Synchronization of CMDB with current VMware inventory on collector startup
- Shallow properties such as cluster usable resources
Feel free to identify any enhancements that would be useful, the intent of this is to demonstrate capability that can be driven into the core engineering of ServiceNow and to continue to expand the capabilities to enhance cloud discovery.
This project is licensed under the Apache License - see the LICENSE file for details