Logging MFT resource monitors
You can obtain diagnostic information about resource monitors by using logging.
About this task
You can use logging for resource monitors by using either the fteSetAgentLoglevel command or the agent.properties file to control resource monitor logging.
Note that existing trace points are still used for capturing information.
The resource monitor logs are written to a file named resmoneventN.log,
where N stands for a number; for example, resmonevent0.log. The event log files record
several actions that take place when a monitor polls a resource, for example, a directory or a
queue.
Attention: All resource monitors of an agent write to the same log
file.
For some example output of a resmoneventN.log file, see What to do if your MFT directory resource monitor is not triggering files.
The following table lists the type of events the resource monitor writes to the log file. The third column describes the log level needed to capture each event where the lowest level is INFO and highest is VERBOSE.
Note that setting a higher log level, also writes lower level events. For example, setting log
level to MODERATE also writes INFO level events, but not VERBOSE level events.
| Number | Event | Log level | Description |
|---|---|---|---|
| 1 | Monitor Created | INFO | A resource monitor has been created. |
| 2 | Monitor Deleted | INFO | A resource monitor has been deleted. |
| 3 | Monitor Stopped | INFO | A resource monitor has been stopped. |
| 4 | Monitor Started | INFO | A resource monitor has been started. |
| 5 | Start Poll | INFO | A resource monitor started a new poll cycle. |
| 6 | End Poll | INFO | A resource monitor poll cycle has ended. |
| 7 | Pattern Match | VERBOSE | A file on the trigger monitor directory, or a message in a queue that matches the specified pattern, has been found. |
| 8 | Pattern Mismatch | VERBOSE | An unmatched file on the trigger monitor directory, or a message in a queue that does not match the specified pattern, has been found. |
| 9 | Transfer Request | INFO | A transfer has been initiated by the resource monitor. |
| 10 | Directory too deep | VERBOSE | The directory monitored by the resource monitor contains more sub-directories to poll, than the number specified in the resource monitor configuration. |
| 11 | File locked | MODERATE | The trigger file monitored by the resource monitor is locked by another process. |
| 12 | File size small | MODERATE | The trigger file is smaller than the size specified in the resource monitor configuration. |
| 13 | File size unstable | MODERATE | The trigger file is being changed more frequently than expected by the resource monitor configuration. |
| 14 | Too many polls | MODERATE | A resource monitor has polled an unstable trigger file too many times. |
| 15 | Items Matched | INFO | Total number of trigger files found in the directory polled by a resource monitor. |
| 16 | Transfer Items | INFO | Total number of items in the transfer request. |
| 17 | FDC Generated | MODERATE | A resource monitor has generated an exception. |
| 18 | Transfer Request | INFO | Transfer request submitted by resource monitor. |
| 19 | Monitor Start Failed | MODERATE | A resource monitor failed to start. |
| 20 | History Cleared | INFO | Monitor history information has been cleared. |
| 21 | Clear Monitor History Failed | INFO | Attempt to clear monitor history information has failed. |
| 22 | Transfer ID | INFO | ID of the transfer request has been submitted by monitor. |
| 23 | Batching | INFO | Total number of transfer requests for matched items: N, where N is a number. |
Procedure
Example
The following sample message sets
verbose level logging for agent
HA2, on queue manager
MFTDEMO:<?xml version="1.0"?>
<log:log version="6.00"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xmlns:log="https://www.ibm.com/log">
<log:originator>
<log:request>
<log:hostName>192.168.7.1</log:hostName>
<log:userID>johndoe</log:userID>
</log:request>
</log:originator>
<log:endpoint agent="HA2" QMgr="MFTDEMO"/>
<log:logMonitor>MON1="verbose"</log:logMonitor>
</log:log>