ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Captchure Monitoring Event Elemets and Insert into DB

Post new topic  Reply to topic
 Captchure Monitoring Event Elemets and Insert into DB « View previous topic :: View next topic » 
Author Message
MB Developer
PostPosted: Wed Aug 06, 2014 9:45 pm    Post subject: Captchure Monitoring Event Elemets and Insert into DB Reply with quote

Disciple

Joined: 03 Feb 2014
Posts: 179

Hi Experts,
Greetings,


We are using the monitoring events and store all elements into DB.

I am getting Monitoring Events Exception message

Quote:
<wmb:event xmlns:wmb="http://www.ibm.com/xmlns/prod/websphere/messagebroker/6.1.0/monitoring/event">
<wmb:eventPointData>
<wmb:eventData wmb:productVersion="8002" wmb:eventSchemaVersion="6.1.0.3" wmb:eventSourceAddress="MQ Input.terminal.catch">
<wmb:eventIdentity wmb:eventName="MQ Input.CatchTerminal"/>
<wmb:eventSequence wmb:creationTime="2014-07-01T11:58:39.306999Z" wmb:counter="1"/>
<wmb:eventCorrelation wmb:localTransactionId="7689a83e-b68e-46ca-95f0-3889ad2f5eaf-3" wmb:parentTransactionId="" wmb:globalTransactionId=""/>
</wmb:eventData>
<wmb:messageFlowData>
<wmb:broker wmb:name="MB8BROKER" wmb:UUID="08e20345-7916-4afe-8463-4e68e6a91729"/>
<wmb:executionGroup wmb:name="EG1" wmb:UUID="c32d6eb8-4501-0000-0080-c69ee041d5be"/>
<wmb:messageFlow wmb:uniqueFlowName="MB8BROKER.EG1.Sample_Event_MonitaringExp_MsgFlow" wmb:name="Sample_Event_MonitaringExp_MsgFlow" wmb:UUID="90fef655-4601-0000-0080-f6c7591855e0" wmb:threadId="4436"/>
<wmb:node wmb:nodeLabel="MQ Input" wmb:nodeType="ComIbmMQInputNode" wmb:terminal="catch"/>
</wmb:messageFlowData>
</wmb:eventPointData>
<wmb:applicationData xmlns="">
<wmb:complexContent wmb:elementName="ExceptionList">
<ExceptionList>
<RecoverableException>
<File>F:\build\slot1\S800_P\src\DataFlowEngine\ImbMqOutputNode.cpp</File>
<Line>876</Line>
<Function>ImbMqOutputNode::evaluate</Function>
<Type>ComIbmMQOutputNode</Type>
<Name>Sample_Event_MonitaringExp_MsgFlow#FCMComposite_1_2</Name>
<Label>Sample_Event_MonitaringExp_MsgFlow.MQ Output</Label>
<Catalog>BIPmsgs</Catalog>
<Severity>3</Severity>
<Number>2230</Number>
<Text>Caught exception and rethrowing</Text>
<MessageException>
<File>F:\build\slot1\S800_P\src\DataFlowEngine\ImbMqOutputNode.cpp</File>
<Line>1988</Line>
<Function>ImbMqOutputNode::putMessage</Function>
<Type>ComIbmMQOutputNode</Type>
<Name>Sample_Event_MonitaringExp_MsgFlow#FCMComposite_1_2</Name>
<Label>Sample_Event_MonitaringExp_MsgFlow.MQ Output</Label>
<Catalog>BIPmsgs</Catalog>
<Severity>3</Severity>
<Number>2666</Number>
<Text>Failed to open queue</Text>
<Insert>
<Type>2</Type>
<Text>-1</Text>
</Insert>
<Insert>
<Type>5</Type>
<Text>MQW101</Text>
</Insert>
<Insert>
<Type>2</Type>
<Text>2085</Text>
</Insert>
<Insert>
<Type>5</Type>
<Text></Text>
</Insert>
<Insert>
<Type>5</Type>
<Text></Text>
</Insert>
<Insert>
<Type>5</Type>
<Text>UNNOWN_LQ</Text>
</Insert>
</MessageException>
</RecoverableException>
</ExceptionList>
</wmb:complexContent>
</wmb:applicationData>
<wmb:bitstreamData>
<wmb:bitstream wmb:encoding="CDATA"><![CDATA[<Message>hello this is Pavan Kalyan</Message>]]></wmb:bitstream>
</wmb:bitstreamData>
</wmb:event>



Now I am able to insert all elements into DB except

ExceptionMessage
ErrorType
ErrorSeverity

and CDATA i.e PARENTID


I write insert code



Quote:

PASSTHRU('INSERT INTO EXCEPTION_DETAILS VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',msgFlowName,eventType,nodeName,'','','',brkName,egName,
eventTimeStamp,'','','','','','',appName,'','',parentID,'');



Based on above query I am able to insert all values and I am passing empty values for ExceptionMessage ,ErrorType,ErrorSeverity


I will write code for getting Text i.e ExceptionMessage

Quote:

DECLARE messageText CHAR;
SET messageText = 'Exception:';

DECLARE ptrException reference to InputRoot.XMLNSC.ns:event.ns:applicationData.ns:complexContent.ns:elementName.*[1];

WHILE lastmove(ptrException) DO
DECLARE insertCount INT CARDINALITY(ptrException.Insert[]);
DECLARE idx INT 1;

IF ptrException.Text IS NOT NULL THEN
SET messageText = messageText || ' | ' || ptrException.Text;
END IF;

WHILE idx <= insertCount DO
IF ptrException.Insert[idx].Type = '5' THEN
SET messageText = messageText || ' | ' || ptrException.Insert[idx].Text;
END IF;

SET idx = idx + 1;
END WHILE;

MOVE ptrException lastchild;
END WHILE;



Now My Insert query is

Quote:

PASSTHRU('INSERT INTO EXCEPTION_DETAILS VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',msgFlowName,eventType,nodeName,messageText,'','',brkName,egName,
eventTimeStamp,'','','','','','',appName,'','',parentID,'');


But It will insert Exception: i.e I already set it please give solution for this .....


I already search for this but not getting...


http://www.ibm.com/developerworks/websphere/library/techarticles/0911_fan/0911_fan.html

http://www.mqseries.net/phpBB2/viewtopic.php?t=55888&postdays=0&postorder=asc&start=0



Quote:

DECLARE ns NAMESPACE 'http://www.ibm.com/xmlns/prod/websphere/messagebroker/6.1.0/monitoring/event';

DECLARE inputRefMsgFlowData REFERENCE TO InputRoot.XMLNSC.ns:event.ns:eventPointData.ns:messageFlowData;
DECLARE inputRefEventPointData REFERENCE TO InputRoot.XMLNSC.ns:event.ns:eventPointData.ns:eventData;

DECLARE msgFlowName CHARACTER inputRefMsgFlowData.ns:messageFlow.ns:name;
DECLARE eventType CHARACTER inputRefEventPointData.ns:eventIdentity.ns:eventName;
DECLARE nodeName CHARACTER inputRefMsgFlowData.ns:node.ns:nodeLabel;
DECLARE brkName CHARACTER inputRefMsgFlowData.ns:broker.ns:name;
DECLARE egName CHARACTER inputRefMsgFlowData.ns:executionGroup.ns:name;
DECLARE eventTime CHARACTER inputRefEventPointData.ns:eventSequence.ns:creationTime;
DECLARE appName CHARACTER;
SET appName = '';
DECLARE userName CHARACTER;
SET userName = '';
DECLARE parrentID CHARACTER inputRefEventPointData.ns:eventCorrelation.ns:parentTransactionId;
DECLARE globalID CHARACTER inputRefEventPointData.ns:eventCorrelation.ns:globalTransactionId;
DECLARE localID CHARACTER inputRefEventPointData.ns:eventCorrelation.ns:localTransactionId;

--DECLARE msgPayload CHARACTER InputRoot.XMLNSC.ns:event.ns:bitstreamData.ns:bitstream.{encoding}.CDATA;
DECLARE payLoad CHARACTER;
SET payLoad = InputRoot.XMLNSC.ns:event.ns:bitstreamData.ns:bitstream.(XMLNSC.CDataField)ns:encoding;

INSERT INTO DataSource.EXCEPTION_DETAILS_P(MESSAGEFLOWNAME,EVENTTYPE,NODENAME,BROKERNAME,EXECUTIONGROUPNAME,EVENT_TIMESTAMP,APPLICATIONNAME,USERNAME,PARENTID,GLOBALID,LOCALID,
MESSAGEPAYLOAD,EXCEPTIONMESSAGE,ERRORTYPE,ERRORSEVERITY) VALUES (msgFlowName,eventType,nodeName,brkName,egName,eventTime,appName,userName,parrentID,globalID,localID,payLoad,'','','');
Thanks in Advance
_________________
Thanks....
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Captchure Monitoring Event Elemets and Insert into DB
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.