Highlighted
Trusted Contributor.
Trusted Contributor.
302 views

uCMDB Asset Manager Integration

Jump to solution

We haved integrated Asset Manager with ucmdb and we are push data from Ucmdb to Asset Manager throught AM push Adapter Integration Scenario.

 

SeAssignment is filed in Asset manager portfolio table .

 

When we Discovered new Device in UCMDB and push to AM to create a CI then SeAssignmentt value changes in use.

 

When we changed the se-assignment value manually in AM from in use to in stock  then we reimage that asset, Once re-image done host name will change but not serial number and ucmdb will rediscover that asset with new host name and when we re-run the integration job that will push new discovered asset to AM but that doesn't change the serial number but host name will newly create in AM.

 

Wondering why ... it create new asset in AM ?How to make unique serial number and update Host name to existing serial number ?

 

also need to understand that if it's OOB feature or need to do the modification to achieve the requirement.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..

You must modify reconciliation rules in AM Generic adapter. Look to am-push-config.xml file in the adapter and you'll find there reconciliation rules for each AM table. For example amComputer ci-type="ITEquipment" has following rules:

 

<reconciliation>
<reconciliation-advanced>Portfolio.GlobalId = '${if(globalId==null) { throw new com.hp.amadapter.push.exception.AMPushAdvancesReconciliationException('Not enough reconciliation data') }else{ return globalId}}' OR Portfolio.CMDBId = '${if(globalId==null) { throw new com.hp.amadapter.push.exception.AMPushAdvancesReconciliationException('Not enough reconciliation data') }else{ return globalId}}'</reconciliation-advanced>
<reconciliation-advanced>Portfolio.Model.Name = '${mappings.scripts.AMReconcil.trimRight(vModelName)}' AND Portfolio.Model.Nature.Code = '${vNatureCode}' AND Portfolio.Asset.SerialNo = '${if(vSerialNo==null) { throw new com.hp.amadapter.push.exception.AMPushAdvancesReconciliationException('Not enough reconciliation data') }else{ return mappings.scripts.AMReconcil.trimRight(vSerialNo)}}' AND 1=${if(iIsComputerAVM==true){return 0} else{return 1}}</reconciliation-advanced>
<reconciliation-keys>
<reconciliation-key ignore-case="true">AssetTag</reconciliation-key>
</reconciliation-keys>
<reconciliation-advanced>TcpIpHostName = '${vComputerName}' and WorkGroup = '${vWorkGroup}' and Portfolio.Model.Nature.seComputerType = 3 AND 1=${if(iIsComputerAVM==true){return 1} else{return 0}}</reconciliation-advanced>
<reconciliation-advanced>TcpIpHostName = '${vComputerName}' and WorkGroup = '${vWorkGroup}' and Portfolio.Model.Nature.seComputerType &lt;&gt; 3 AND 1=${if(iIsComputerAVM==true){return 0} else{return 1}}</reconciliation-advanced>
<reconciliation-advanced>(TcpIpHostName = '${vComputerName + '.' + vWorkGroup}' OR (WorkGroup = '${vWorkGroup}' AND (TcpIpHostName like '${vComputerName + '.%'}' OR TcpIpHostName = '${mappings.scripts.AMReconcil.getShortHostName(vComputerName)}'))) and Portfolio.Model.Nature.seComputerType = 3 AND 1=${if(iIsComputerAVM==true){return 1} else{return 0}}</reconciliation-advanced>
<reconciliation-advanced>(TcpIpHostName = '${vComputerName + '.' + vWorkGroup}' OR (WorkGroup = '${vWorkGroup}' AND (TcpIpHostName like '${vComputerName + '.%'}' OR TcpIpHostName = '${mappings.scripts.AMReconcil.getShortHostName(vComputerName)}'))) and Portfolio.Model.Nature.seComputerType &lt;&gt; 3 AND 1=${if(iIsComputerAVM==true){return 0} else{return 1}}</reconciliation-advanced>
</reconciliation>

 

If you would use Serial Number as only one unique reconciliation key, you should modify this section like this:

<reconciliation-keys>
<reconciliation-key ignore-case="true">Portfolio.Asset.SerialNo</reconciliation-key>
</reconciliation-keys>

Be careful to change standard reconciliation rules, you must be sure that chosen key or set of keys is really unique in all of your environment.

 

 

View solution in original post

0 Likes
2 Replies
Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..

Try asking this same question in the forum of Asset Manager.

0 Likes
Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..

You must modify reconciliation rules in AM Generic adapter. Look to am-push-config.xml file in the adapter and you'll find there reconciliation rules for each AM table. For example amComputer ci-type="ITEquipment" has following rules:

 

<reconciliation>
<reconciliation-advanced>Portfolio.GlobalId = '${if(globalId==null) { throw new com.hp.amadapter.push.exception.AMPushAdvancesReconciliationException('Not enough reconciliation data') }else{ return globalId}}' OR Portfolio.CMDBId = '${if(globalId==null) { throw new com.hp.amadapter.push.exception.AMPushAdvancesReconciliationException('Not enough reconciliation data') }else{ return globalId}}'</reconciliation-advanced>
<reconciliation-advanced>Portfolio.Model.Name = '${mappings.scripts.AMReconcil.trimRight(vModelName)}' AND Portfolio.Model.Nature.Code = '${vNatureCode}' AND Portfolio.Asset.SerialNo = '${if(vSerialNo==null) { throw new com.hp.amadapter.push.exception.AMPushAdvancesReconciliationException('Not enough reconciliation data') }else{ return mappings.scripts.AMReconcil.trimRight(vSerialNo)}}' AND 1=${if(iIsComputerAVM==true){return 0} else{return 1}}</reconciliation-advanced>
<reconciliation-keys>
<reconciliation-key ignore-case="true">AssetTag</reconciliation-key>
</reconciliation-keys>
<reconciliation-advanced>TcpIpHostName = '${vComputerName}' and WorkGroup = '${vWorkGroup}' and Portfolio.Model.Nature.seComputerType = 3 AND 1=${if(iIsComputerAVM==true){return 1} else{return 0}}</reconciliation-advanced>
<reconciliation-advanced>TcpIpHostName = '${vComputerName}' and WorkGroup = '${vWorkGroup}' and Portfolio.Model.Nature.seComputerType &lt;&gt; 3 AND 1=${if(iIsComputerAVM==true){return 0} else{return 1}}</reconciliation-advanced>
<reconciliation-advanced>(TcpIpHostName = '${vComputerName + '.' + vWorkGroup}' OR (WorkGroup = '${vWorkGroup}' AND (TcpIpHostName like '${vComputerName + '.%'}' OR TcpIpHostName = '${mappings.scripts.AMReconcil.getShortHostName(vComputerName)}'))) and Portfolio.Model.Nature.seComputerType = 3 AND 1=${if(iIsComputerAVM==true){return 1} else{return 0}}</reconciliation-advanced>
<reconciliation-advanced>(TcpIpHostName = '${vComputerName + '.' + vWorkGroup}' OR (WorkGroup = '${vWorkGroup}' AND (TcpIpHostName like '${vComputerName + '.%'}' OR TcpIpHostName = '${mappings.scripts.AMReconcil.getShortHostName(vComputerName)}'))) and Portfolio.Model.Nature.seComputerType &lt;&gt; 3 AND 1=${if(iIsComputerAVM==true){return 0} else{return 1}}</reconciliation-advanced>
</reconciliation>

 

If you would use Serial Number as only one unique reconciliation key, you should modify this section like this:

<reconciliation-keys>
<reconciliation-key ignore-case="true">Portfolio.Asset.SerialNo</reconciliation-key>
</reconciliation-keys>

Be careful to change standard reconciliation rules, you must be sure that chosen key or set of keys is really unique in all of your environment.

 

 

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.