IBM MQ Managed File Transfer agents publish XML status messages to the SYSTEM.FTE/Log topic on the coordination queue manager at regular intervals. Tools such as the database logger, file logger and IBM MQ Explorer Managed File Transfer plugin subscribe to the SYSTEM.FTE topic on the coordination queue manager, and store the data contained within the messages so that it can be accessed later.

Figure 1: Agents publish status messages to the SYSTEM.FTE topic on the coordination queue manager (via the agent queue manager). Tools such as the IBM MQ Explorer Managed File Transfer plugin and Database logger subscribe to the SYSTEM.FTE topic, and receive copies of the messages.

It is sometimes useful to have a local copy of these status messages, for debugging or audit purposes. This can be achieved by enabling the logCapture functionality on an agent. When logCapture is turned on, an agent will write copies of the status messages to a file before publishing them to the SYSTEM.FTE topic.

Figure 2: When the logCapture functionality is enabled, an agent will write the status messages to a local capture log as well as publish them to the SYSTEM.FTE topic.

Enabling logCapture

Turning on the logCapture functionality is quite easy. All you need to do is add the following line to the agent.properties file for your agent:

logCapture=true

When the agent is restarted, it will start writing copies of the status messages to a capture log file called:

<MQ_DATA_PATH>\mqft\logs\<coordination_qmgr_name>\agents\<agent_name>\logs\capture0.log

The default maximum size of a capture log is 10MB, and an agent will create 10 historical files before the oldest one is overwritten. The maximum size of the capture log file, and the number of historical files to create, can be changed using the agent properties logCaptureFileSize and logCaptureFiles respectively.

The format of the logCapture files

Each line in the capture log has the following format:

<Timestamp in UTC>!<Topic string that the message was published on>!<XML status message that was published>

To interpret the contents of the file, you first need to identify the specific topic string that the agent used to publish the message. Once you’ve done that, look at the schema definition for that particular topic string in IBM Knowledge Center. The schema definitions can then be used to interpret the messages.

The table below shows the three different types of topic string that you can expect to see in the capture log, along with links to their schema definitions.

Topic

IBM Knowledge Center topic containing schema definition

SYSTEM.FTE/Log/<agent name>/<transfer identifier>

File transfer log message formats
SYSTEM.FTE/Log/<agent name>/<schedule identifier>

Scheduled file transfer log message formats
SYSTEM.FTE/Log/<agent name>/Monitors/<monitor name>/<monitor identifier>

MFT monitor log message format

Here is an example, taken from the capture log on my system:

2019-04-04T10:23:27.224Z!SYSTEM.FTE/Log/V91LTSAGENT1/414d51207061756c745639314c545320f4bea55c25b00603!<?xml version="1.0" encoding="UTF-8"?><transaction version="6.00" ID="414d51207061756c745639314c545320f4bea55c25b00603" agentRole="sourceAgent" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="TransferLog.xsd" xmlns=""><action time="2019-04-04T10:23:27.211Z">started</action><sourceAgent agent="V91LTSAGENT1" QMgr="paultV91LTS" agentType="STANDARD"><systemInfo architecture="amd64" name="Windows 10" version="10.0"/></sourceAgent><destinationAgent agent="V91LTSAGENT2" QMgr="paultV91LTS"></destinationAgent><originator><hostName>localhost</hostName><userID>PT</userID><mqmdUserID>PT</mqmdUserID></originator><transferSet startTime="2019-04-04T10:23:27.212Z" total="1" bytesSent="0"><metaDataSet><metaData key="com.ibm.wmqfte.SourceAgent">V91LTSAGENT1</metaData><metaData key="com.ibm.wmqfte.DestinationAgent">V91LTSAGENT2</metaData><metaData key="com.ibm.wmqfte.MqmdUser">PT</metaData><metaData key="com.ibm.wmqfte.OriginatingUser">PT</metaData><metaData key="com.ibm.wmqfte.OriginatingHost">localhost</metaData><metaData key="com.ibm.wmqfte.TransferId">414d51207061756c745639314c545320f4bea55c25b00603</metaData><metaData key="com.ibm.wmqfte.Priority">0</metaData></metaDataSet></transferSet></transaction>

This message was published to the topic:

SYSTEM.FTE/Log/V91LTSAGENT1/414d51207061756c745639314c545320f4bea55c25b00603

and was for managed transfer 414d51207061756c745639314c545320f4bea55c25b00603. Looking at the XML within the message, it can be seen that it was published to indicate that the managed transfer was started (as shown by the <action time="2019-04-04T10:23:27.211Z">started</action> entry).

As always, I hope this helps! If you have any questions on this, let me know and I’ll be happy to answer them.

Join The Discussion

Your email address will not be published.