How does Reconciliation Rule work?

nR9
Giga Contributor

Hello All,

I have a query related to working on Reconciliation Rule. Below is the Requirement.

Requirement:

  1. I want my ServiceWatch Data Source to update IP Address of Windows Server Record as it pulls latest data.
  2. I want my ServiceNow Data Source to Update the IP Address of Windows Server Record only if it is blank and not updated by ServiceWatch. If it already has any value then ServiceNow (Discovery) should not update the value of the field.

Thus I created 2 reconciliation rules and 2 Data Precedence rule as below.

find_real_file.png

Expected Outcome:

  • As I have set High Priority for ServiceWatch Data Precedence rule, only it should update the value.

Actual Output:

  1. ServiceWatch Updates the IP Address Value of the CI record.
  2. If I execute Discovery, then though the field already has some value, ServiceNow is also updating the value.

Additional Info

  1. If I add additional attribute 'name' to existing Reconciliation rule for ServiceNow, then after discovery, it is just updating the name parameter and is not updating the IP Address Field.

Questions:

  1. How data precedence is considered in this case?
  2. The above use case if for only IP Address field but in general how does Reconciliation rule work if two or more rules are sharing similar attributes?
  3. Why the behavior is changing if I add any additional attribute to the ServiceNow recon rule?

 

Payload used to update the CI record for "ServiceWatch" data source.

var payload = {
items: [{
className: 'cmdb_ci_win_server',
values: {
ip_address: ’50.201.32.155’,
name: 'win-39juhe0vt56'
}
}]
};
var jsonUntil = new JSON();
var input = jsonUntil.encode(payload);
var output = SNC.IdentificationEngineScriptableApi.createOrUpdateCI('ServiceWatch', input);
gs.print(output);


Values on cmdb_datasource_last_update table

This table contains 2 records as per payload. one is Name and another is IP Address. Though discovery is updating the IP address of actual the CI record, the last updated data source on this table for IP Address record is still "ServiceWatch"

Please share your inputs.

Note - Kindly don't share any documentation link.

3 REPLIES 3

Pradeep Tiwari1
Tera Contributor

hi ,

 

you can use the below filter criteria in "ServiceNow" data source" and it will work

 

note : replace ImportSet to Service Watch(as per your case) in below reconciliation rule

see below:

find_real_file.png

Arjun2
Tera Contributor

Additional Info

  1. If I add additional attribute 'name' to existing Reconciliation rule for ServiceNow, then after discovery, it is just updating the name parameter and is not updating the IP Address Field.

Did you get the reason?

ServiceNow35
Tera Contributor

Hello,

Were you able to achieve this? as even we are struggle with the same one.

-Thanks