Logging MFT resource monitors

We can obtain diagnostic information about resource monitors by using logging.


We 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 resmoneventsN.log, where N stands for a number; for example, resmonevents0.log.Attention: All resource monitors of an agent write to the same log file.

For some example output of a resmoneventsN.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 create INFO A resource monitor has been created.
2 Monitor delete INFO A resource monitor has been deleted.
3 Monitor stop INFO A resource monitor has been stopped.
4 Monitor start INFO A resource monitor has been started.
5 Monitor start poll INFO A resource monitor started a new poll cycle.
6 Monitor 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 submit 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 Items in transfer INFO Total number of items in the transfer request.
17 FDC or exception 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.


Procedure

  • To use the fteSetAgentLoglevel to turn resource monitor logging on and off, see fteSetAgentLogLevel for a description of the logMonitor parameter, and examples of how we use the different options.
  • To use the agent.properties file to control resource monitor logging, see The MFT agent.properties file for a description of the additional properties that allow you to carry out the following logging activities:

    • Turn logging on or off
    • Limit the size of each log file
    • Limit the number of logs that resource monitors can generate


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="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:log="http://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>
Parent topic: Monitor MFT resources


Related information