Example 4: Merging objects
Example 4, when imported into OpsCenter Analytics, merges object "o2" into the object "o1." Objects "o1" and "o2" represent the same host. One has a host name of "hostA.veritas.com" and the other has the host name as "hostXYZ.somedomain.veritas.com." While merging object "o2" into object "o1," you can specify "hostXYZ.somedomain.veritas.com" as an alias for object "o1." After merging object "o2," it is deleted and only object "o1" remains.
In Example 4, a host object has the hostname "hostA.veritas.com" which also goes by the name "hostXYZ.somedomain.veritas.com." The XML export of this object looks like the following:
(The DTD header has been snipped.)
<object id="o1" action="declare" type="Host" dbid="50"> </object>
This example has another host object whose host name is "hostA" and whose XML export is as follows:
<object id="o2" action="declare" type="Host" dbid="70"> </object>
Now, whenever a particular OpsCenter Analytics Agent refers to a host as "hostA," the OpsCenter Analytics Server identifies the object since one of its host names matches this object. After this object update, you can merge the two hosts with the following syntax:
<mergeitems> <mergeitem toobject = "o1" fromobject = "o2"/> </mergeitems>
Merging of two hosts moves all data from the hostA object to the newly updated object and deletes the hostA object.