Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

ARTICLE: CMDB common Issues and Fixes

RiteshSwarnakar
Giga Guru
1) For Asset creation, please verify if Manufacturer, Model ID & Serial Number is populated for that CI.

 

2) For SNMP devices (mostly Printers, Switches etc), it often happens that the SNMP OID is not present, hence the Manufacturer and Model ID will be empty or unknown incase a CI is created.
So create the SNMP OID entry in "discovery_snmp_oid" table (you will mostly find the model and OID in the CI description field if CI is created) and then rerun the discovery it will populate the Manufacturer and Model ID
 
3) Use SNMP walk to get attribute's OID and its value: snmpwalk Examples & Commands (Windows & Linux) Step-by-Step Guide

 

4) If Manufacturer, Model ID & Serial Number are present still Asset is not created then use script:
var list = new GlideRecord("cmdb_ci");
list.addEncodedQuery("assetISEMPTY^install_status!7"); // add query as per requirement
list.query();
while (list.next()){
var a= new AssetandCI;
a.createAsset(list);
list.update();
}



5) Create CI from Asset:
var list = new GlideRecord("alm_hardware");
list.addEncodedQuery("ciISEMPTY^install_status!=7"); // add query as per requirement
list.query();
while (list.next()){
var a= new AssetandCI;
a.createCI(list);
list.update();
}



6) Link CI with existing Asset or vice versa:
var assetSysID='13235be51bfe5910af93ea40604bcb88'; // replace
var cisysID='13235be51bfe5910af93ea40604bcb88'; // replace

var ci = new GlideRecord("cmdb_ci");
if (ci.get(cisysID)){
ci.asset=assetSysID;
ci.update();
}
var asset = new GlideRecord("alm_hardware");
if (asset.get(assetSysID)){
asset.ci=cisysID;
asset.update();
}

 

 

7) Create Deduplication Task for Duplicate CIs:

var sysIDs = '<sys-id1>,<sys-id2>';
var dupTaskUtil = new CMDBDuplicateTaskUtils();
var deDupTaskID = dupTaskUtil.createDuplicateTask(sysIDs);
gs.info(deDupTaskID);

 

 

8 ) Table Transform Map Script to populate Manufacturer and Model ID in CMDB:

var make="Cisco";
var model="Room Kit";

var makeModel= MakeAndModelJS.fromNames(make,model,"hardware");
target.model_id=makeModel.getModelNameSysID();
target.manufacturer=makeModel.getManufacturerSysID();

 

9) Issue: In new Discovery Pattern, Debug fails showing "Scanning host running".

Resolution: While creating a new Discovery Pattern which uses API/HTTP Calls

First create a pattern with only one step using "Transform Table" and publish it. Then run Quick Discovery to create a record in CMDB table, after that only the discovery patten debug will work.

 

10) Use the "Replace on upgrade" field to "true" when:

  1. You made a temporary customization as a workaround for a bug that will be fixed in the next upgrade.
  2. You want to revert to OOB behavior automatically during upgrade without manual intervention.
  3. You are testing and want to ensure the latest OOB version is applied.

 

11) Data Manager Policies not creating tasks:

There might be some custom role/ACL which may override the read/write permission on the cmdb tables, so verify the access of "DataManager Job Runner" user (if you are using this user) using Access Analyzer

 

12) ECC Sender files backlogged (10001 files present) on MID Server:

The below parameter holds the value and can be changed in the config.xml file as it is not visible on the instance MID Server parameters.

mid.eccq.backlog_threshold: The Default value is 10000

0 REPLIES 0