|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Implementing Common logging by using Eventmonitoring profile |
« View previous topic :: View next topic » |
Author |
Message
|
Android 23 |
Posted: Thu Jul 20, 2017 2:44 am Post subject: Implementing Common logging by using Eventmonitoring profile |
|
|
Apprentice
Joined: 27 Mar 2017 Posts: 38
|
Hii Guys,
I have created a Event Monitoring Profile and connected it with pub-sub by using Subscription queue and sub queue manager through RFHUTIL tool.
After that i can't find Common logging sample or examples .So, that i can monitor the events that i raised in the profile.
Monitoring profile.xml:
Code: |
<?xml version="1.0" encoding="UTF-8"?>
<p:monitoringProfile p:version="2.0" xmlns:p="http://www.ibm.com/xmlns/prod/websphere/messagebroker/6.1.0.3/monitoring/profile" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="MonitoringProfile.xsd ">
<p:eventSource p:enabled="true" p:eventSourceAddress="Compute.terminal.in">
<p:eventPointDataQuery>
<p:eventIdentity>
<p:eventName p:literal="Compute.InTerminal" p:queryText="">
<p:prefixMapping p:URI="" p:prefix=""/>
</p:eventName>
</p:eventIdentity>
<p:eventCorrelation>
<p:localTransactionId p:queryText="" p:sourceOfId="automatic">
<p:prefixMapping p:URI="" p:prefix=""/>
</p:localTransactionId>
<p:parentTransactionId p:queryText="" p:sourceOfId="automatic">
<p:prefixMapping p:URI="" p:prefix=""/>
</p:parentTransactionId>
<p:globalTransactionId p:queryText="" p:sourceOfId="automatic">
<p:prefixMapping p:URI="" p:prefix=""/>
</p:globalTransactionId>
</p:eventCorrelation>
<p:eventSequence p:name="creationTime"/>
</p:eventPointDataQuery>
<p:applicationDataQuery>
<p:simpleContent p:dataType="string" p:name="Name" p:targetNamespace="">
<p:valueQuery p:queryText="$EV/data/XMLNSC/EmployeeDetails/Name" xsi:type="p:queryType">
<p:prefixMapping p:URI="" p:prefix=""></p:prefixMapping>
</p:valueQuery>
</p:simpleContent>
</p:applicationDataQuery>
<p:bitstreamDataQuery p:bitstreamContent="all" p:encoding="hexBinary"/>
</p:eventSource>
<p:eventSource p:enabled="true" p:eventSourceAddress="Compute.terminal.out">
<p:eventPointDataQuery>
<p:eventIdentity>
<p:eventName p:literal="Compute.OutTerminal" p:queryText="">
<p:prefixMapping p:URI="" p:prefix=""/>
</p:eventName>
</p:eventIdentity>
<p:eventCorrelation>
<p:localTransactionId p:queryText="" p:sourceOfId="automatic">
<p:prefixMapping p:URI="" p:prefix=""/>
</p:localTransactionId>
<p:parentTransactionId p:queryText="" p:sourceOfId="automatic">
<p:prefixMapping p:URI="" p:prefix=""/>
</p:parentTransactionId>
<p:globalTransactionId p:queryText="" p:sourceOfId="automatic">
<p:prefixMapping p:URI="" p:prefix=""/>
</p:globalTransactionId>
</p:eventCorrelation>
<p:eventSequence p:name="creationTime"/>
</p:eventPointDataQuery>
<p:applicationDataQuery>
<p:simpleContent p:dataType="string" p:name="DOB" p:targetNamespace="">
<p:valueQuery p:queryText="$EV/data/XMLNSC/EmployeeDetails/DOB" xsi:type="p:queryType">
<p:prefixMapping p:URI="" p:prefix=""></p:prefixMapping>
</p:valueQuery>
</p:simpleContent>
<p:simpleContent p:dataType="date" p:name="SYSTEM_DATE" p:targetNamespace="">
<p:valueQuery p:queryText="$EV/data/XMLNSC/EmployeeDetails/SYSTEM_DATE" xsi:type="p:queryType">
<p:prefixMapping p:URI="" p:prefix=""></p:prefixMapping>
</p:valueQuery>
</p:simpleContent>
</p:applicationDataQuery>
<p:bitstreamDataQuery p:bitstreamContent="body" p:encoding="hexBinary"/>
</p:eventSource>
</p:monitoringProfile>
|
And should i declare another flow for common logging and different monitoring profile for it and how can i access monitoring through common logging.
Thanks & Regards.
Android 23. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jul 20, 2017 4:53 am Post subject: Re: Implementing Common logging by using Eventmonitoring pro |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Android 23 wrote: |
So, that i can monitor the events that i raised in the profile. |
Anything that can subscribe to the events (or in the scenario you describe, get the event messages from the queue) can consume the events.
Android 23 wrote: |
should i declare another flow for common logging |
Or use any other mechanism of your choice (e.g. a Java app) to consume the events and produce the logging you desire. It's a design decisions, pros and cons to both, you pays your money, you makes your choice....
Android 23 wrote: |
and different monitoring profile for it |
Or no monitoring profile for it, or don't enable events for the monitoring flow.....
Android 23 wrote: |
and how can i access monitoring through common logging. |
By consuming the events as I describe above. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Android 23 |
Posted: Fri Jul 21, 2017 4:28 am Post subject: |
|
|
Apprentice
Joined: 27 Mar 2017 Posts: 38
|
After configuring Event monitoring profile.But my message is not moving to subscription queue.
Topic : $SYS/Broker/MONT/Monitoring/server/MonitorflowTest
Sub queue: SUB
Any the message is moving into Mqoutput queue and not in subscription queue.
Thanks & Regards |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jul 21, 2017 4:40 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Android 23 wrote: |
Any the message is moving into Mqoutput queue and not in subscription queue. |
Any message going through the broker flow will continue to go where it's going (I assume an MQOutput node based on your comment) irrespective of any monitoring.
If you're not getting anything in the subscription queue, possible causes include but are not limited to:
- Misspelt topic. Try subscribing to something more general and see what turns up
- The event profile is not properly applied. Verify that it's been applied to the flow in question, especially if you've redeployed the flow
- Event monitoring is not enabled. Applying an event profile does not mean event messages will be generated. Check that they're active for the flow in question, especially if you've redeployed as this resets them. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Android 23 |
Posted: Mon Jul 24, 2017 5:10 am Post subject: |
|
|
Apprentice
Joined: 27 Mar 2017 Posts: 38
|
Quote: |
<p:simpleContent p:dataType="string" p:name="Name" p:targetNamespace="">
<p:valueQuery p:queryText="$EV/data/XMLNSC/EmployeeDetails/Name" xsi:type="p:queryType">
<p:prefixMapping p:URI="" p:prefix=""></p:prefixMapping>
</p:valueQuery>
</p:simpleContent> |
Can i write like this
Quote: |
<p:valueQuery p:queryText="$EV/data/XMLNSC/EmployeeDetails/Name" xsi:type="p:queryType"> |
And i have EV as Environment in ESQL code.
should i declare as $Environment instead of $EV.
Please go through my Monitoring profile once. So, that i can rectify my error in it and work on it.
My Monitoring Profile:
Code: |
<?xml version="1.0" encoding="UTF-8"?>
<p:monitoringProfile p:version="2.0" xmlns:p="http://www.ibm.com/xmlns/prod/websphere/messagebroker/6.1.0.3/monitoring/profile" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="MonitoringProfile.xsd ">
<p:eventSource p:enabled="true" p:eventSourceAddress="Compute.terminal.in">
<p:eventPointDataQuery>
<p:eventIdentity>
<p:eventName p:literal="Compute.InTerminal" p:queryText="">
<p:prefixMapping p:URI="" p:prefix=""/>
</p:eventName>
</p:eventIdentity>
<p:eventCorrelation>
<p:localTransactionId p:queryText="" p:sourceOfId="automatic">
<p:prefixMapping p:URI="" p:prefix=""/>
</p:localTransactionId>
<p:parentTransactionId p:queryText="" p:sourceOfId="automatic">
<p:prefixMapping p:URI="" p:prefix=""/>
</p:parentTransactionId>
<p:globalTransactionId p:queryText="" p:sourceOfId="automatic">
<p:prefixMapping p:URI="" p:prefix=""/>
</p:globalTransactionId>
</p:eventCorrelation>
<p:eventSequence p:name="creationTime"/>
</p:eventPointDataQuery>
<p:applicationDataQuery>
<p:simpleContent p:dataType="string" p:name="Name" p:targetNamespace="">
<p:valueQuery p:queryText="$EV/data/XMLNSC/EmployeeDetails/Name" xsi:type="p:queryType">
<p:prefixMapping p:URI="" p:prefix=""></p:prefixMapping>
</p:valueQuery>
</p:simpleContent>
</p:applicationDataQuery>
<p:bitstreamDataQuery p:bitstreamContent="all" p:encoding="hexBinary"/>
</p:eventSource>
<p:eventSource p:enabled="true" p:eventSourceAddress="Compute.terminal.out">
<p:eventPointDataQuery>
<p:eventIdentity>
<p:eventName p:literal="Compute.OutTerminal" p:queryText="">
<p:prefixMapping p:URI="" p:prefix=""/>
</p:eventName>
</p:eventIdentity>
<p:eventCorrelation>
<p:localTransactionId p:queryText="" p:sourceOfId="automatic">
<p:prefixMapping p:URI="" p:prefix=""/>
</p:localTransactionId>
<p:parentTransactionId p:queryText="" p:sourceOfId="automatic">
<p:prefixMapping p:URI="" p:prefix=""/>
</p:parentTransactionId>
<p:globalTransactionId p:queryText="" p:sourceOfId="automatic">
<p:prefixMapping p:URI="" p:prefix=""/>
</p:globalTransactionId>
</p:eventCorrelation>
<p:eventSequence p:name="creationTime"/>
</p:eventPointDataQuery>
<p:applicationDataQuery>
<p:simpleContent p:dataType="string" p:name="DOB" p:targetNamespace="">
<p:valueQuery p:queryText="$EV/data/XMLNSC/EmployeeDetails/DOB" xsi:type="p:queryType">
<p:prefixMapping p:URI="" p:prefix=""></p:prefixMapping>
</p:valueQuery>
</p:simpleContent>
<p:simpleContent p:dataType="date" p:name="SYSTEM_DATE" p:targetNamespace="">
<p:valueQuery p:queryText="$EV/data/XMLNSC/EmployeeDetails/SYSTEM_DATE" xsi:type="p:queryType">
<p:prefixMapping p:URI="" p:prefix=""></p:prefixMapping>
</p:valueQuery>
</p:simpleContent>
</p:applicationDataQuery>
<p:bitstreamDataQuery p:bitstreamContent="body" p:encoding="hexBinary"/>
</p:eventSource>
</p:monitoringProfile> |
Thanks & Regards |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jul 24, 2017 5:23 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Android 23 wrote: |
Can i write like this
Quote: |
<p:valueQuery p:queryText="$EV/data/XMLNSC/EmployeeDetails/Name" xsi:type="p:queryType"> |
And i have EV as Environment in ESQL code. |
No.
Android 23 wrote: |
should i declare as $Environment instead of $EV. |
The monitoring profile certainly has no knowledge of your ESQL because it's a broker function separate to your code, so $EV certainly won't work. I didn't think you could use anything except the message body for content (and I've certainly never done anything other than that) so that would be an interesting experiment.
Android 23 wrote: |
Please go through my Monitoring profile once. So, that i can rectify my error in it and work on it. |
Firstly, you don't indicate where I should send my invoice to be paid. Secondly, a monitoring profile contains flow-specific content that I can't possibly verify. For instance, do you really have a compute node called Compute? Probably, but I can't know that.
I'd suggest you hard code some of this to at least verify that your subscription works. Once you've done that, then try with the monitoring profile. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|