ServiceNow CMDB
5 minute read
To learn more about this OneFuse module, refer to ServiceNow CMDB.
Prerequisites
- Configure OneFuse Property Set(s) and OneFuse Module Policies.
- Run OneFuse Configuration per vRA Tenant.
- Review the OneFuse Modules overview for vRealize Automation 7.6.
- Create a new vRA Blueprint (if none exist) or determine which existing Blueprint(s) will utilize this OneFuse Module.
- Resource: Designing Machine Blueprints
Configure the Blueprint
- Know the name of the OneFuse Endpoint created via OneFuse Configuration.
- Determine which OneFuse ServiceNow CMDB Policies to run for this Blueprint.
- Update the Blueprint to add in necessary vRA Properties to invoke OneFuse ServiceNow CMDB Policies.
- Deploy the Blueprint to provision a vRA Deployment and create ServiceNow CMDB Configuration Item(s) and run the Provision IRE Template.
- Performing specific Day2 actions on the vRA Deployment will update the ServiceNow CMDB CI(s) accordingly and run the Update IRE Template.
- Destroy the vRA Deployment to update the ServiceNow CMDB CI(s) with the specified deprovision status and IRE Template.
Update the Blueprint
- Log in to the vRA Tenant
- Select the Design tab from the top menu bar
- Select the Blueprints tab from the left menu
- Edit the Blueprint and perform the below:
Add in necessary vRA Properties
The following vRA Properties need to be added to the Blueprint’s Properties > Custom Properties section under the Resource(s) of interest.
Call OneFuse ServiceNow CMDB Policy:
| Property name format | Property value format |
|---|---|
OneFuse_ServiceNowCmdbPolicy |
<OneFuse Endpoint Name>:<ServiceNow CMDB Policy Name> |
OneFuse_ServiceNowCmdbPolicy is a required vRA Property for ServiceNow CMDB.
Optionally, call additional ServiceNow CMDB Policies:
| Property name format | Property value format |
|---|---|
OneFuse_ServiceNowCmdbPolicy_<CustomID> |
<OneFuse Endpoint Name>:<ServiceNow CMDB Policy Name> |
- Replace
<CustomID>with a unique, user-defined friendly label.
Example vRA Custom Properties (in key: value pair format):
# Example CustomID
Apache
BackupClient
WebApp
CustomID
CustomID refers to a user specified text string to identify and can set an order of precedence for execution when calling multiple Policies for the OneFuse Module in the same vRA EBS State.
Replace <CustomID> variable with a unique custom identifier:
- Format is alphanumeric characters only
A-Z, a-z, 0-9. No spaces, underscores, hyphens nor special characters. - Must be unique across all EBS Execution Strings for the OneFuse Module on the specific VM for the Blueprint/Cloud Template.
- Is reusable either between different VM components of the Blueprint/Cloud Template canvas or between different Blueprints/Cloud Templates.
# Execute 2 OneFuse ServiceNow CMDB Policies
# <CustomID> is replaced with 001Apache
# <OneFuse Endpoint Name> is onefuse
# <ServiceNow CMDB Policy Name> is prod and linux_Apache
OneFuse_ServiceNowCmdbPolicy: onefuse:prod
OneFuse_ServiceNowCmdbPolicy_001Apache: onefuse:linux_Apache
Specify sorting with CustomID:
When executing multiple different OneFuse Module’s Policies in the same EBS State, prefix the <CustomID> with a numeric value (for example, 001, 002, etc).
The <CustomID> is sorted prior to executing the OneFuse module’s policies.
# Example CustomID with sorting
001Apache
002WebApp
003BackupClient
Additional helpful vRA Properties
Purpose: Relate OneFuse Policy executions from different OneFuse Modules together with a Tracking ID.
| Property | Value format |
|---|---|
OneFuse_Tracking_Id |
A GUID (globally unique identifier) that links OneFuse Policy Executions and the resulting Managed Objects together for a given resource on a deployment. The first OneFuse Module Policy execution will populate this vRA property and it will be passed into other OneFuse Modules automatically. Learn more about OneFuse Tracking ID. |
When a Tracking ID is not provided, a Tracking ID gets generated for the Policy execution.
Purpose: Reference a specific NIC’s values to get hostname, IP address, etc.
| Property format | Example |
|---|---|
OneFuse_VmNic<#>.<value> |
See examples below |
Replace <#> with a number from 0 to 9, one for each NIC.
Replace <value> with an appropriate key: dnsSuffix, fqdn, gateway, hostname, ipAddress, macAddress, netmask, network, subnet, target
For most use cases, NIC 0 is the primary network interface and the target hostname is a Fully Qualified Domain Name (FQDN).
Examples:
OneFuse_VmNic0.dnsSuffixOneFuse_VmNic0.fqdnOneFuse_VmNic0.hostnameOneFuse_VmNic0.ipAddressOneFuse_VmNic0.target: when DNS Suffix is provided, will be the FQDN; otherwise, will be the hostname (without domain).
Custom Property placement methods
Influence Custom Properties for Resources using different methods:
| Method | Description |
|---|---|
| Basic | Add a Custom Property to the vSphere machine on the blueprint canvas, or to the blueprint layer itself. |
| Advanced 1 | Add a Custom Property to an existing or new vRA Property Group. |
| Advanced 2 | Add a Custom Property to a more global level, such as vCenter Endpoint (to run on all deployments) and/or a Reservation (to run on all deployments using that reservation), etc. |
Learn more: Understanding Custom Properties Precedence
Provision
Deploy a Blueprint with OneFuse ServiceNow CMDB Policy configured. ServiceNow CMDB CI(s) will be created in ServiceNow.
Outputs
The following vRA Property will have the generated OneFuse ServiceNow CMDB Managed Object as a JSON string on the Deployment.
| Property Name | Property Value Format |
|---|---|
OneFuse_ServiceNowCmdb |
JSON string of OneFuse ServiceNow CMDB Managed Object |
OneFuse_ServiceNowCmdb_<CustomID> (if additional ServiceNow CMDB Policies) |
JSON string of OneFuse ServiceNow CMDB Managed Object |
Deprovision
Destroy an existing deployment with OneFuse ServiceNow CMDB Policy configured. ServiceNow CMDB CI(s) will be updated with the specified deprovision status in ServiceNow.
vRA EBS
| EBS Execution | Subscription State | EBS Priority | EBS Name |
|---|---|---|---|
| Provision | |||
| ProvisionedPre | Early | 1600 | OneFuse_Provision_ServiceNow_CMDB |
| Day2 | |||
| Reconfigure VM | - | 1100 | OneFuse_Update_ServiceNow_CMDB |
| Deprovision | |||
| MachineDisposingPost | - | 1100 | OneFuse_De-Provision_ServiceNow_CMDB |
Troubleshooting
Troubleshoot in vRealize Orchestrator.
- Log in to vRealize Orchestrator.
- Turn on Verbose Logging and try again to see additional log messages in vRO Workflows:
- Select Library > Workflows from the left menu
- Go to: OneFuse > ServiceNow CMDB > vRA7 to find corresponding workflow runs and view logs
- Optionally, run the workflows in the Manual folder to manually test
- Optionally, configure timeouts for EBS and/or Configure timeouts for OneFuse modules.
Additional resources:
- Review Troubleshooting in OneFuse
- Review VMware troubleshooting resources