execute manually IRE (Identification and Reconciliation Engine)

Anshu_Anand_
Kilo Sage
Kilo Sage

Dear All,

 

I have a lot of duplicate CI in cmdb_ci_db_ora_instance (oracle instance) table.

find_real_file.png

I ran correctness dashboard to get duplicates CI from this table, but did not retrieve it.

I don't want to run discovery schedule again since it will take a lot of time as i have a lot of CIs.

As per this KB article "https://hi.service-now.com/kb_view.do?sysparm_article=KB0726425" ,

its given To fix all the left-over CIs, please run discovery, or any custom scripts / import engine that calls IRE (Identification and Reconciliation Engine)

can anyone help how to execute IRE engine through manually or by script.

 

Regards,

Anshu

 

Regards,
Anshu
3 REPLIES 3

Alexey7
Mega Sage

There is a good example of code in the article by Richard Brounstein. Scroll down to the Testing CI Reconciliation.

 

Hope this helps.

Ashutosh Munot1
Kilo Patron
Kilo Patron

HI,

 

find_real_file.png

 

Thanks,
Ashutosh

restevao
Giga Expert

This is how you can run IRE via a script

var obj = {
  "items": [
    {
      "className": "cmdb_ci_win_server",
      "values": {
        "name": "XXXYYYZZZ",
        "serial_number": "AAABBBCCC",
        "asset_tag": "SOME RANDOM UPDATE"
      }
    }
  ]
};



var cmdbUtil = new CMDBTransformUtil();
//cmdbUtil.setDataSource('ImportSet');
cmdbUtil.setDataSource('ServiceNow');
cmdbUtil.setPayload(obj);
cmdbUtil.identifyAndReconcile();
 
if (cmdbUtil.hasError()) {
  var errorMessage = cmdbUtil.getError();
  gs.log(errorMessage);
} else {
  gs.log('IE Output Payload: ' + cmdbUtil.getOutputPayload());
  gs.log('Imported CI: ' + cmdbUtil.getOutputRecordSysId());
}

 

reference

https://developer.servicenow.com/dev.do#!/reference/api/utah/server_legacy/c_CMDBTransformUtilAPI#r_...

https://noderegister.service-now.com/kb?id=kb_article_view&sysparm_article=KB0829078