This article shows how to set up TNT4J Stream with WGS to capture IBM MQ statistics and send them to XRay.
WGS Prerequisites
Your WGS IBM MQ agent shall be configured to pick original IBM MQ statistical events from the SYSTEM.ADMIN.STATISTICS.QUEUE queue by replacing that local queue with an alias queue pointing to the NASTEL.PUBSUB.EVENT.QUEUE local queue.
The agent configuration file pubsub.tst shall have a section like this:
DEFINE QALIAS(SYSTEM.ADMIN.STATISTICS.QUEUE) + TARGTYPE(QUEUE) TARGET(NASTEL.PUBSUB.EVENT.QUEUE) + REPLACE
Setup TNT4J Stream
All required configuration shall be done in the tnt-data-source.xml file.
- Configure WGS access:
-
Set the WGS host and port to connect to:
<property name="Host" value="[WGS_HOST]"/> <property name="Port" value="4010"/>
-
Set your WGS user credentials:
<!-- user and password as required by the WGS --> <property name="UserName" value="[USER_NAME]"/> <!-- password can be encoded using bin/utils/su shell script --> <property name="Password" value="[USER_PASS]"/>
-
Set your WGS group manager name if it is not the default one
MQM:<!-- Your WGS group manager name --> <property name="NEXCMD.EXCA_MANAGER_NAME" value="MQM"/>
-
Set the statistics events you want to track:
<!-- Set of statistics events to track --> <property name="NEXCMD.EXIA_MON_MSG_TYPE" value="NEXCMD.EXMONT_STAT_MQI | NEXCMD.EXMONT_STAT_Q | NEXCMD.EXMONT_STAT_CHL"/>
-
- Configure XRay access:
-
Set your XRay access token:
<property name="event.sink.factory.EventSinkFactory.prod.Url" value="https://stream.meshiq.com"/> <property name="event.sink.factory.EventSinkFactory.prod.Token" value="<YOUR-XRAY-ACCESS-TOKEN>"/>
-
Run TNT4J Stream
Execute the shell script:
-
Linux
./run.sh
-
Windows
run.bat