But we noticed that the varbind position for this CIA is not consistent, different incident/trap might have different position for this CIA so it’s almost impossible to match the this value in OM. Is there any way it can be fixed to a single position for all traps coming from NNMi?
The problem you will find is for SNMP traps. In the case of SNMP traps, the order of the NNMi-specific varbinds will change depending on the quantity of varbinds (say n varbinds) that the original trap contains, because NNMi always forwards the SNMP trap with the original list of varbinds first and then it adds the NNMi specific CIAs starting in the position n + 1. The varbind you refer to in this post is a NNMi specific CIA.
So, if you're interested in checking this varbind for management events only then you should be fine. If you're interested in SNMP traps then the policy file already matches a variety of varbinds as you can see below. But if you need to check against what's in that varbind specifically (Position 20 for management events and position n+20 in SNMP traps) then the only suggestions I have right now are
1) Submit an ER requesting that the nnmopcexport.ovpl automatically adds another entry in the policy of the following form
CUSTOM "nnm.apa.conclusions "<$position>"
2) Or you manually edit the policy file and add the entry in all SNMP traps right before nnm.emittingNode.name. Example for SNMPLinkDown trap below
CUSTOM "nnm.emittingNode.uuid" "<$25>"
CUSTOM "nnm.emittingNode.name" "<$24>"
CUSTOM "nnm.apa.conclusions "<$23>"
Below its an example of the NodeDown management event definition from the policy file, the order of varbinds for all Management Events should be the same.