The CMDB integration enables OpsRamp to discover resources and automatically populate them as Configuration Items (CIs) in the ServiceNow CMDB. This is a unidirectional integration where resources flow from OpsRamp to ServiceNow.

Use this integration to:

  • Keep your ServiceNow CMDB updated with infrastructure discovered in OpsRamp.
  • Establish asset visibility across environments.
  • Streamline resource data transfer with minimal manual effort.

This integration is supported for ServiceNow versions Utah, Vancouver, Washington DC, and Yokohama using the certified OpsRamp Store app.

Prerequisites

Before configuring CMDB integration:

  • Ensure the OpsRamp Integration app is installed in your ServiceNow instance. See Installation instructions
  • Complete OAuth2.0 authentication between OpsRamp and ServiceNow.
  • Ensure resource discovery is already enabled in OpsRamp for the desired client.

Configure CMDB Integration in OpsRamp

Step 1: Access the Client Context

  1. Navigate to All Clients and select your target client.
  2. Go to Setup > Account.
  3. Click Integrations.

Step 2: Add the ServiceNow Integration

  1. On the Installed Integrations page, click +ADD.
  2. Locate ServiceNow from the list or search bar.

Note: If you do not find ServiceNow in the page, then click ADD. You’ll be directed to the Available Integrations page and search for ServiceNow integration from the search bar.

  1. Click ADD on the ServiceNow tile.

Step 3: Configure INBOUND Tab

  1. Fill in the following in the INBOUND tab:
    • Under AUTHENTICATION, select OAuth2.
    • Click GENERATE KEY.
    • Copy and save the Tenant ID, Key, and Secret.
    • These values will be used to configure the OAuth provider in ServiceNow.

Click NEXT to continue.

Step 4: Configure OUTBOUND Tab

In the OUTBOUND tab:

  1. Click ADD under the CONFIGURATION section.
  2. Fill in the following details:
    • Base URI: ServiceNow instance URL (e.g., https://demo2577.service-now.com)
    • Notification Type: REST API
    • Authentication Type: OAuth2
    • Grant Type: Password Credentials
    • Access Token URL: e.g., https://demo2577.service-now.com/oauth_token.do
    • Enter Key, Secret, Username, Password
    • Scope: OAuth scope (optional, based on ServiceNow instance)
  1. Click ADD CONFIGURATION.

Step 5: Create CMDB Event

  1. Under the EVENTS section, click +ADD.
  2. Fill in the following
    • Event Name: Enter a name for the integration event.
    • Entity, Entity Type, and Event Type

Advanced Settings (Optional)

  • Click the dropdown to choose ALL or ANY filter conditions.
  • Add filter conditions using Property, Operator, and Value.

Actions Section

  • Select Use parent configuration checkbox (optional).
  • Fill in the following:
    • Endpoint URL: https://{your-instance}.service-now.com/api/now/import/x_opra_opsramp_int_opsramp_ci
    • Web Method: Select POST
    • Notification Type: REST API
    • Authentication Type: OAuth2

Headers and Payload

  • Add headers such as:
    Accept: application/json
    Content-Type: application/json
    
  • Add payload using variables from OpsRamp, for example:
{
  "caller_id": "6816f79cc0a8016401c5a33fdfdbe07441",
  "opsramp_resource_id": "$defaultresource.uniqueId",
  "ipaddress": "$defaultresource.ipAddress",
  "macaddress": "$defaultresource.macAddress",
  "dnsname": "$defaultresource.dnsName",
  "hostname": "$defaultresource.name",
  "make": "$defaultresource.make",
  "model": "$defaultresource.model",
  "resourcetype": "$defaultresource.resourceTag.name",
  "systemuid": "$defaultresource.systemUID"
}

Response Mapping (Optional)

Use response keys such as:

$result[0].sys_id

Only four response properties can be added. Mapped fields must match your transform map fields in ServiceNow.

  1. Click ADD EVENT to save.

Step 6: Configure Failure Notifications

To receive emails on integration errors:

  1. Under FAILURES, click Add.
  2. Set Notify Type to Email.
  3. Enter recipients in To and CC fields.
  4. Click ADD FAILURE NOTIFICATIONS.

Customize Configuration in ServiceNow for CMDB Integration

In addition to OpsRamp UI setup, ServiceNow must be customized to accept incoming CMDB resource data.

Step 1: Modify Custom Fields

  • Ensure a field named OpsRamp Resource ID exists in the cmdb_ci table.
  • Ensure a field named OpsRamp Client ID exists in the Company form (for partner-level setup).
  • Edit the Form Layout in both forms to make these fields visible.

Step 2: Configure OAuth Provider

  1. Create a user account with role x_opra_opsramp_int.admin.
  2. Navigate to System OAuth > Application Registry.
  3. Edit OpsRamp OAuth Provider.
  4. Enter:
    • Client ID and Secret from OpsRamp
    • Token URL: https://api.opsramp.com/auth/oauth/token
  5. Click Update.

Step 3: Configure REST Message

  1. Navigate to System Web Services > REST Message.
  2. Edit OpsRamp CI REST.
  3. Set:
    • Endpoint: https://api.opsramp.com
  4. Under HTTP Methods, edit methods for Create CI and Update CI:
    https://api.opsramp.com/api/v2/tenants/${tenantId}/resources
    
  5. Click Update.

Step 4: Update Business Rule Script

  1. Go to System Definition > Business Rule.
  2. Open OpsRamp CI BR.
  3. Add conditions:
    • Created by and Updated by ≠ system administrator
  4. Modify script:
    • Client level:
      var opsRampClientId = 'client_1341';
      
    • Partner level:
      var opsRampClientId = current.company.x_opra_opsramp_int_opsramp_client_id;
      
  5. Click Update.

This business rule ensures configuration items (CIs) are routed to the correct OpsRamp tenant.

(Optional) Add More Fields to Payload

To map additional data fields:

Modify Import Set Table

  1. Go to System Definition > Tables.
  2. Open x_opra_opsramp_int_opsramp_ci.
  3. Under Columns, click New to define additional fields.

Modify Transform Map

  1. Navigate to System Import Sets > Transform Maps.
  2. Edit OpsRamp CI Trans Map.
  3. Click Field Maps > New.
  4. Fill in:
    • Source Table: x_opra_opsramp_int_opsramp_ci
    • Target Table: cmdb_ci
    • Source Field: custom field name
    • Target Field: ServiceNow CI field
    • Coalesce: Inactive
    • Use Source Script: Inactive

After completing the mappings, OpsRamp-discovered resources will be visible as CIs in the ServiceNow CMDB.

Your CMDB integration is now fully configured and ready to ingest data from OpsRamp.