createOrUpdateCIEnhanced ignoring Identification Inclusion rule

Kelly Logan
Kilo Sage

Hello all,

I'm on San Diego, using a scheduled job script to pull data into the CMDB from a third party source. Once I pull the data and format a JSON object to hand to it, I am using a call to SNC.IdentificationEngineScriptableApi.createOrUpdateCIEnhanced() to hand that data to the IRE. That works great but there are some CIs in the CMDB that we don't want to update and instead want to create new versions of where necessary. I have tried setting them with 'Operational Status' = "Retired" and then creating a Identification Inclusion rule at the Hardware class level to tell the IRE to ignore these retired devices, but it continues to match anyway. 

I have tried 'Operational Status' is not "Retired", 'Operational Status' is one of {everything *but* Retired}, even 'Operational Status' = "Repair in Progress" for testing purposes to try and stop all matches, but the IRE ignores them all and keeps matching. The device I am testing with is being placed in the 'Personal Computer' class and has a NIC related to it. The ID rules are otherwise pretty OOB:

KellyLogan_0-1668809684622.png

...

KellyLogan_1-1668809705792.png

I have gone through the documentation again and haven't found any mention of a known issue with Inclusion rules or any option for turning them on or off. Does anyone else have any experience with this or advice on how I could get this working as desired? Again, the primary goal is to have a set of CIs that will not be touched by the incoming data and will create new CIs that would otherwise be matches and overwrite the old data. I'm open to other methods. 

 

 

 

 

5 REPLIES 5

Anshu_Anand_
Kilo Sage
Kilo Sage

 

Identification inclusion rule doesn't prevent records to be added into be CMDB. Instead, based on Inclusion rule, CI gets added or updated into CMDB during the identification process. Generally, inclusion rules shouldn't be created based on criterion attribute as this can lead to the creation of duplicate CIs .

 

check this KB a resolution is also given

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0685031#:~:text=Identificatio....

 

Otherwise you have to clear the identification fields from ci record like serial,name and set to operational status=retired .

 

Hope this is helpful .

Regards,
Anshu

My goal is not to prevent a record from being created, it is to prevent a historical record from being overwritten. I literally want a duplicate to be created, the historical retired record should remain as it is, and the new record, which may have the same name, serial # and mac address, is the one that will be updated moving forward. 

 

The issue is that the inclusion rule is having NO EFFECT. It seems entirely non-functional even if I set it to something that will never be true the IRE still updates the CIs. That's what I would like someone to address. My working theory is that the IRE API is not using inclusion rules. Can anyone else confirm that in their environments they can call  SNC.IdentificationEngineScriptableApi.createOrUpdateCIEnhanced() on a CI that an inclusion rule should stop the matching of and that it instead creates a separate CI?

@Kelly Logan 

The goal of inclusion rule is to prevent duplicate and you want to create duplicate .

Inclusion rule Narrow the scope of CIs that are included in the identification process by creating an identification inclusion rule but at the end its still be identifying the CI first by identification rule then the inclusion rule .That's why its not working when i also tried same .

Its like identification rule + inclusion rule . so its always matching in the beginning itself. This is what i guess by discovering my own windows computer .

 

I think you should use Multisource CMDB feature in cmdb . why to create duplicates because 

 

Multisource CMDB retains complete history about discovery sources and proposed values, involved in updates of CI attributes. Use Multisource CMDB data to track how the CMDB is populated by various discovery sources at the CI attribute level. Also, to revert CI updates from a specific discovery source, or to recompute attribute values using updated reconciliation rules.

 

https://docs.servicenow.com/bundle/tokyo-servicenow-platform/page/product/configuration-management/c...

 

Regards,
Anshu

I'll take a look at multi-source, but I'm not sure I understand how an inclusion rule would work if it only applies after the id rules run. In the docs it makes it sound like the opposite, that it is a filter for which CIs that ID rules apply to: "During duplication detection of independent CIs, the identification and reconciliation engine (IRE) processes only the CIs that satisfy the identification inclusion rules. For example, you can set a filter to include only CIs whose state is operational. "
That's literally what I am trying to do, set a filter to include only the CIs that are not set to "Retired", but instead the ID rule is still being applied to the CIs set to "Retired".

 

This is the advice from ServiceNow in this post: How to stop discovery from updating the retired CI's. 

 

My question is - why doesn't this work with the API call?