Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..
475 views

UCMDB DB Push

Hello,

 

Im trying to develop a push from UCMDB to a external MS-SQL server.

 

I'm using the PUSH DB adapter as the template.

 

First question - How do we use one mapping per tql? I see that in the push.properties the mappingfiles.defaul = mappings

I want to have one for Host push and another for Relationship.

 

Second Question - How do we push relationship? The documentation is not very clear on this. 

 

I have the tql setup as Business Element containment Host and the containment as Root.

In the external DB i have setup the following fields: 

Table name - Business

FieldName - HostName, BusinessApp, BusinessCriticality, ID

 

 

<targetrelations>
<source_link_type_tree name="containment" target_link_type="Business" namespace="Business" mode="update_else_insert" source_ci_type_end1="business_element" source_ci_type_end2="node">

<target_ci_type_end1 name="BusinessElement"/>
<target_ci_type_end2 name="Node"/>
<targetprimarykey/>
<target_attribute name="Business_Criticality" datatype="INT"> 
<map type="childattr">
<source_child_ci_type name="business_element" source_attribute="business_criticality" /> 
</map>
</target_attribute> 

</source_link_type_tree>
</targetrelations>

For now I have this mapping in the mappings.xml since i did not know how to have a different mapping xml for this tql.

 

But when i add the TQl and run the integration , I do not see any result in the probe log

jvm 7    | <2015-08-27 16:24:51,946> 97555519 [INFO ] [AdHoc:AD_HOC_TASK_PATTERN_ID-227-1440710691182] (AdHocProbeRequestOperation.java:60) - Starting execution of Probe operation [GenericPushProbeRequest( updateData )]
jvm 7    | <2015-08-27 16:24:52,555> 97556128 [INFO ] [AdHoc:AD_HOC_TASK_PATTERN_ID-227-1440710691182] (?:?) - addResult: 
jvm 7    | <2015-08-27 16:24:52,555> 97556128 [INFO ] [AdHoc:AD_HOC_TASK_PATTERN_ID-227-1440710691182] (?:?) - <?xml version="1.0" encoding="UTF-8"?>
jvm 7    | <root>
jvm 7    |   <data>
jvm 7    |     <objects />
jvm 7    |     <links />
jvm 7    |   </data>
jvm 7    | </root>
jvm 7    | 
jvm 7    | 
jvm 7    | <2015-08-27 16:24:52,555> 97556128 [INFO ] [AdHoc:AD_HOC_TASK_PATTERN_ID-227-1440710691182] (?:?) - updateResult: 
jvm 7    | <2015-08-27 16:24:52,555> 97556128 [INFO ] [AdHoc:AD_HOC_TASK_PATTERN_ID-227-1440710691182] (?:?) - <?xml version="1.0" encoding="UTF-8"?>
jvm 7    | <root>
jvm 7    |   <data>
jvm 7    |     <objects />
jvm 7    |     <links />
jvm 7    |   </data>
jvm 7    | </root>
jvm 7    | 
jvm 7    | 
jvm 7    | <2015-08-27 16:24:52,555> 97556128 [INFO ] [AdHoc:AD_HOC_TASK_PATTERN_ID-227-1440710691182] (?:?) - deleteResult: 
jvm 7    | <2015-08-27 16:24:52,555> 97556128 [INFO ] [AdHoc:AD_HOC_TASK_PATTERN_ID-227-1440710691182] (?:?) - <?xml version="1.0" encoding="UTF-8"?>
jvm 7    | <root>
jvm 7    |   <data>
jvm 7    |     <objects />
jvm 7    |     <links />
jvm 7    |   </data>
jvm 7    | </root>
jvm 7    | 
jvm 7    | 
jvm 7    | <2015-08-27 16:24:52,570> 97556143 [INFO ] [AdHoc:AD_HOC_TASK_PATTERN_ID-227-1440710691182] (?:?) - URL: jdbc:mercury:sqlserver://MSSQL2012\ESGMSSQLSERVER:1433;DatabaseName=Test_Arcsight;allowPortWithNamedInstance=true
jvm 7    | <2015-08-27 16:24:52,602> 97556175 [INFO ] [AdHoc:AD_HOC_TASK_PATTERN_ID-227-1440710691182] (AdHocProbeRequestOperation.java:74) - Execution of GenericPushProbeRequest:                     ProbeExecution[ requestConstruction = 0.639    processorConstruction = 0.0      adapterRetrieval = 0.0      processorExecution = 0.64     ] 
jvm 7    | <2015-08-27 16:24:52,602> 97556175 [INFO ] [GW-AdHoc:AD_HOC_TASK_PATTERN_ID-227-1440710691182] (AdhocThread.java:63) - Sending ad hoc task results to server for request: com.hp.ucmdb.discovery.probe.agents.probemgr.adhoctasks.AdHocProbeRequestOperation calcTime= 1295ms
jvm 7    | <2015-08-27 16:24:54,068> 97557641 [INFO ] [ProbeGW Tasks Downloader] (ProbeTasksDistributerPull.java:686) - Probe Gateway received 1 tasks from server. AD_HOC_TASK_PATTERN_ID: 1 destinations. Total time to retrieve tasks [2761] msec
jvm 7    | <2015-08-27 16:24:54,068> 97557641 [INFO ] [GW-AdHoc:AD_HOC_TASK_PATTERN_ID-228-1440710694052] (AdhocThread.java:52) - Starting ad hoc task: AD_HOC_TASK_PATTERN_ID-228-1440710694052 (com.hp.ucmdb.discovery.probe.agents.probemgr.adhoctasks.AdHocProbeRequestOperation)
jvm 7    | <2015-08-27 16:24:54,302> 97557875 [INFO ] [AdHoc:AD_HOC_TASK_PATTERN_ID-228-1440710694052] (AdHocProbeRequestOperation.java:60) - Starting execution of Probe operation [GenericPushProbeRequest( updateData )]
jvm 7    | <2015-08-27 16:24:54,708> 97558281 [INFO ] [AdHoc:AD_HOC_TASK_PATTERN_ID-228-1440710694052] (?:?) - addResult: 
jvm 7    | <2015-08-27 16:24:54,708> 97558281 [INFO ] [AdHoc:AD_HOC_TASK_PATTERN_ID-228-1440710694052] (?:?) - <?xml version="1.0" encoding="UTF-8"?>
jvm 7    | <root>
jvm 7    |   <data>
jvm 7    |     <objects />
jvm 7    |     <links />
jvm 7    |   </data>
jvm 7    | </root>
jvm 7    | 
jvm 7    | 
jvm 7    | <2015-08-27 16:24:54,708> 97558281 [INFO ] [AdHoc:AD_HOC_TASK_PATTERN_ID-228-1440710694052] (?:?) - updateResult: 
jvm 7    | <2015-08-27 16:24:54,708> 97558281 [INFO ] [AdHoc:AD_HOC_TASK_PATTERN_ID-228-1440710694052] (?:?) - <?xml version="1.0" encoding="UTF-8"?>
jvm 7    | <root>
jvm 7    |   <data>
jvm 7    |     <objects />
jvm 7    |     <links />
jvm 7    |   </data>
jvm 7    | </root>
jvm 7    | 
jvm 7    | 
jvm 7    | <2015-08-27 16:24:54,708> 97558281 [INFO ] [AdHoc:AD_HOC_TASK_PATTERN_ID-228-1440710694052] (?:?) - deleteResult: 
jvm 7    | <2015-08-27 16:24:54,708> 97558281 [INFO ] [AdHoc:AD_HOC_TASK_PATTERN_ID-228-1440710694052] (?:?) - <?xml version="1.0" encoding="UTF-8"?>
jvm 7    | <root>
jvm 7    |   <data>
jvm 7    |     <objects />
jvm 7    |     <links />
jvm 7    |   </data>
jvm 7    | </root>
jvm 7    | 

I do see the system process the TQL in the fcmdb.synchronizer.

 

 

Any help  or additional documentation for this is greatly appreciate.

0 Likes
10 Replies
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: UCMDB DB Push

Hello , 

 

Would you please provide us the system information of your environment ? 

 

Best Regards ,

Melissa Carranza Mejias
Customer Support Engineer

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation. “
0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: UCMDB DB Push

UCMDB Version 10.21 

Content Pack 15.02

MS-SQL 2008 R2

0 Likes
Highlighted
Trusted Contributor.. Trusted Contributor..
Trusted Contributor..

Re: UCMDB DB Push

ctruong,

 

A few pointers on working to understand the Push Adapter:

 

First, you can define a TQL specific mapping by nameing the mapping the same as the name of the TQL. If a mapping is found with the same TQL name that mapping file will be used, otherwise it will use the default mapping file.

 

For testing, remove the default mappings.xml and run your integration job. The results will be all available CIs and their attributes in the xml output. From this you can see what the CI and Relation types are.

 

Ensure on the TQL that you have defined what attributes (or all attributes) are being output to the adapter. This is on the "Element Layout" tab.

 

Ensure your endpoints on the "targetrelations" actually match the CI type of the CIs being selected. While the "source_link_type_tree" will select all of the CI/Relationship Types the actual endpoints must match the CI types exactly.

 

Also, I don't think your use of childattr is correct. I believe this is only used on a CI and is used to get the related CI's attribute.

 

Hope this helps some,

 

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: UCMDB DB Push

Thank you for the reply,

 

My TQL is name BusinessApp and my mapping XML is also name BusinessApp.xml

 

When i run the integration i get the following error: 

2015-08-28 13:15:05,143  ERROR  [RequestProcessorAsyncPool-7352] - Replication [DB Push Test_relation] error!!!
appilog.framework.shared.manage.impl.MamResponseException: [ErrorCode [898] Integration [{0}]: adapter [{1}] does not supported the action [{2}]{DB Push Test, DB Push, GetStatusAfterTimeout}]
appilog.framework.shared.manage.impl.MamResponseException: [ErrorCode [898] Integration [{0}]: adapter [{1}] does not supported the action [{2}]{DB Push Test, DB Push, GetStatusAfterTimeout}]
CMDB Operation Internal Error: class com.mercury.topaz.cmdb.shared.fcmdb.dataAccess.exception.AdapterAccessGeneralException : GetStatusAfterTimeout not supported by adapter : operation Data Access Operation: Get Status After Timeout : class com.mercury.topaz.cmdb.shared.base.CmdbException : 
CMDB Internal Error: Error while handling request: {request: ID='7e140212983e3e2279b86cf6a750eaf1' Message='General CMDB request' Operation='com.hp.ucmdb.dataAccess.operations.DataAccessAdapterCommandGetStatusAfterInterruption@293f9f9' Customer ID='1, id name: Default Client' 
Context='CMDB Context: Customer id = '1, id name: Default Client' , User ID = '911' , Caller Application = 'UCMDB-UI,loggedInUser:{admin}''}
	at com.mercury.topaz.cmdb.server.manage.rpm.RequestProcessor.createCmdbResponseOnCmdbError(RequestProcessor.java:459)
	at com.mercury.topaz.cmdb.server.manage.rpm.RequestProcessor.processRequest(RequestProcessor.java:203)
	at com.mercury.topaz.cmdb.server.manage.rpm.RequestProcessor.handleRequest(RequestProcessor.java:123)
	at com.mercury.topaz.cmdb.server.manage.Framework.handleRequest(Framework.java:610)
	at com.mercury.topaz.cmdb.client.manage.api.impl.AbstractCmdbApi.executeCMDBOperation(AbstractCmdbApi.java:38)
	at com.mercury.topaz.cmdb.client.manage.api.impl.AbstractCmdbApi.executeOperation(AbstractCmdbApi.java:57)
	at com.mercury.topaz.cmdb.client.manage.api.impl.InternalApi.executeOperation(InternalApi.java:32)
	at com.mercury.topaz.cmdb.client.manage.api.impl.InternalApi.executeCMDBOperation(InternalApi.java:24)
	at com.mercury.topaz.cmdb.server.manage.ServerApiFacade.executeOperation(ServerApiFacade.java:56)
	at com.mercury.topaz.cmdb.server.manage.ServerApiFacade.executeOperation(ServerApiFacade.java:34)
	at com.hp.ucmdb.synchronizer.operations.AbstractSynchronizerCommandRunSyncUnit.handleExceptionDuringInterruption(AbstractSynchronizerCommandRunSyncUnit.java:1313)
	at com.hp.ucmdb.synchronizer.operations.AbstractSynchronizerCommandRunSyncUnit.updateData(AbstractSynchronizerCommandRunSyncUnit.java:1272)
	at com.hp.ucmdb.synchronizer.operations.AbstractSynchronizerCommandRunSyncUnit.updateDataInChunks(AbstractSynchronizerCommandRunSyncUnit.java:498)
	at com.hp.ucmdb.synchronizer.operations.AbstractSynchronizerCommandRunSyncUnit.replicateSingleTqlFromTopologyDiff(AbstractSynchronizerCommandRunSyncUnit.java:1667)
	at com.hp.ucmdb.synchronizer.operations.AbstractSynchronizerCommandRunSyncUnit.replicateInstancesFromTopologyDiff(AbstractSynchronizerCommandRunSyncUnit.java:407)
	at com.hp.ucmdb.synchronizer.operations.AbstractSynchronizerCommandRunSyncUnit.replicateFromTopologyDiff(AbstractSynchronizerCommandRunSyncUnit.java:346)
	at com.hp.ucmdb.synchronizer.operations.AbstractSynchronizerCommandRunSyncUnit.runSynchUnit(AbstractSynchronizerCommandRunSyncUnit.java:267)
	at com.hp.ucmdb.synchronizer.operations.SynchronizerCommandRunFullSynchronization.synch(SynchronizerCommandRunFullSynchronization.java:61)
	at com.hp.ucmdb.synchronizer.operations.AbstractSynchronizerCommandRunSyncUnit.synchronizerExecute(AbstractSynchronizerCommandRunSyncUnit.java:194)
	at com.hp.ucmdb.synchronizer.operations.AbstractSynchronizerOperation.doExecute(AbstractSynchronizerOperation.java:34)
	at com.mercury.topaz.cmdb.shared.manage.operation.impl.AbstractFrameworkOperation.commonExecute(AbstractFrameworkOperation.java:17)
	at com.mercury.topaz.cmdb.shared.manage.operation.impl.AbstractCommonOperation$OperationExecuteFlowTrackingCommand.execute(AbstractCommonOperation.java:87)
	at com.mercury.topaz.cmdb.shared.manage.operation.impl.AbstractCommonOperation$OperationExecuteFlowTrackingCommand.execute(AbstractCommonOperation.java:60)
	at com.mercury.topaz.cmdb.shared.manage.flowmanagement.api.FlowManager.execute(FlowManager.java:227)
	at com.mercury.topaz.cmdb.shared.manage.operation.flow.OperationInFlowDefaultExecutor.execute(OperationInFlowDefaultExecutor.java:23)
	at com.mercury.topaz.cmdb.shared.manage.operation.impl.AbstractCommonOperation.execute(AbstractCommonOperation.java:158)
	at com.mercury.topaz.cmdb.server.manage.rpm.RequestProcessor.doProcessRequest(RequestProcessor.java:217)
	at com.mercury.topaz.cmdb.server.manage.rpm.RequestProcessor.doProcessRequestWithQueueLimitation(RequestProcessor.java:226)
	at com.mercury.topaz.cmdb.server.manage.rpm.RequestProcessor.processRequest(RequestProcessor.java:190)
	at com.mercury.topaz.cmdb.server.manage.rpm.RequestProcessor.access$300(RequestProcessor.java:49)
	at com.mercury.topaz.cmdb.server.manage.rpm.RequestProcessor$4.run(RequestProcessor.java:537)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
	at java.lang.Thread.run(Thread.java:745)
0 Likes
Highlighted
Trusted Contributor.. Trusted Contributor..
Trusted Contributor..

Re: UCMDB DB Push

Please provide BusinessApp.xml. I'm also curious if this is an OOB scripy that the adapter is running?

 

Virgil

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: UCMDB DB Push

Yes this is running the OOB script.

 

<?xml version="1.0" encoding="UTF-8"?>
<integration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="mappings_schema.xsd">
    <info>
        <source name="UCMDB"  versions="10.x" vendor="HP" />
        <target name="SQL" versions="2008" vendor="Microsoft" />
    </info>
   
    <targetrelations> 
       
            <source_link_type_tree name="containment" mode="update_else_insert" source_ci_type_end1="business_application" source_ci_type_end2="node">
                <target_link_type name="Business">
                <target_ci_type_end1 name="Business_app"/>
                <target_ci_type_end2 name="HostName"/>
                <targetprimarykey/>
                 </target_link_type> 
            </source_link_type_tree>
        </targetrelations>
 
</integration>

My businessApp xml....very simple 

 

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: UCMDB DB Push

Another thing to add...I can push CI just fine...this problem is only for the link

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: UCMDB DB Push

any additional thought / help on this??

0 Likes
Highlighted
Trusted Contributor.. Trusted Contributor..
Trusted Contributor..

Re: UCMDB DB Push

Sorry for the delay but I've been "heads-down" on another issue.

 

I've done some additional testing and am not able to only define the relationships in the mapping file. It seems you must define a minimal CI definiation to get it to work. Also, the syntax for the source_link_type is slightly different than the source_ci_type and it was not correct on the example you sent. I have tested the following in my environment and get a minimal CI as well as the desired relationship. Give this a try and see if it helps:

 

<?xml version="1.0" encoding="UTF-8"?>
<integration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="mappings_schema.xsd">
    <info>
        <source name="UCMDB"  versions="10.x" vendor="HP" />
        <target name="SQL" versions="2008" vendor="Microsoft" />
    </info>
    <targetcis>
        <source_ci_type_tree name="node" mode="update_else_insert">
        <target_ci_type name="node"/>
        </source_ci_type_tree>
    </targetcis>
    <targetrelations>
        <source_link_type_tree name="containment" target_link_type name="Business" mode="update_else_insert" source_ci_type_end1="business_application" source_ci_type_end2="node">
            <target_ci_type_end1 name="Business_app"/>
            <target_ci_type_end2 name="HostName"/>
            <targetprimarykey/>
        </source_link_type_tree>

    </targetrelations>
</integration>

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: UCMDB DB Push

Thank you for all help...it is greatly appreciated.

 

What did you use for your TQL to make this work? I used business_application containment node, with containment as Root.

 

I copy and paste ur mapping to my sandbox and had to update the target_link_type attribute since target_link_type name= "Business" is not allow.  The updated mapping is as below:

<source_link_type_tree name="containment" target_link_type ="Business" mode="update_else_insert" source_ci_type_end1="business_application" source_ci_type_end2="node">
            <target_ci_type_end1 name="business_application"/>
            <target_ci_type_end2 name="node"/>
            <targetprimarykey/>
</source_link_type_tree>

I'm still getting the "GetStatusafterTimeOut is not support by adapter" error.

 

 

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.