Monitor MFT resources

We can monitor Managed File Transfer resources; for example, a queue or a directory. When a condition on this resource is satisfied, the resource monitor starts a task, such as a file transfer. We can create a resource monitor by using the fteCreateMonitor command or the Monitors view in the Managed File Transfer plug-in for IBM MQ Explorer.


Managed File Transfer resource monitoring uses the following terminology:

    Resource monitor
    A resource monitor is process that polls a resource (such as a directory or queue) at a predefined regular interval to see if the resource contents have changed. If they have, the contents are compared with the set of conditions for this monitor. If there is a match, the task for this monitor is started.

    Resource
    The system resource that the resource monitor examines at every poll interval to be compared with the trigger conditions. Queues, directories, or nested directory structures can be the monitored resource.

    Condition and Trigger condition
    A condition is an expression that is evaluated (typically against the content of the monitored resource). If the expression evaluates to true, the condition contributes to the overall trigger condition.
    The trigger condition is the overall condition, which is satisfied when all conditions are satisfied. When the trigger condition is satisfied the task can proceed.

    Task
    A task is the operation that is started when the trigger condition or set of conditions is satisfied. Supported tasks are file transfer and command call.

    Trigger file
    A trigger file is a file that is placed in a monitored directory to indicate that a task (typically a transfer) can begin. For example, it might indicate that all the files to be processed have arrived in a known location and can be transferred or otherwise acted upon. The name of the trigger file can be used to specify the files to be transferred by using variable substitution. For more information, see Customizing MFT tasks with variable substitution.
    The trigger file is also known as ready file or go file. However, in this documentation it is usually referred to as the trigger file.

Resource monitoring is not supported on protocol bridge agents or Connect:Direct bridge agents.

  • MFT resource monitoring concepts
    An overview of the key concepts of the Managed File Transfer resource monitoring feature.
  • Configure MFT monitor tasks to start commands and scripts
    Resource monitors are not limited to performing file transfers as their associated task. We can also configure the monitor to call other commands from the monitoring agent, including executable programs, Ant scripts or JCL jobs. To call commands, edit the monitor task definition XML to include one or more command elements with corresponding command call parameters, such as arguments and properties.
  • Monitor a directory and using variable substitution
    We can monitor a directory using the fteCreateMonitor command. The value of a substitution variable can be substituted in the task XML definition and used to define the transfer behavior.
  • Example: Configuring an MFT resource
    We can specify an IBM MQ queue as the resource to be monitored by a resource monitor by using the -mq parameter with the fteCreateMonitor command.
  • Customizing MFT tasks with variable substitution
    When the trigger conditions of an active resource monitor are satisfied, the defined task is called. In addition to calling the transfer or command task with the same destination agent or the same destination file name every time, we can also modify the task definition at run time. You do this by inserting variable names into the task definition XML. When the monitor determines that the trigger conditions are satisfied, and that the task definition contains variable names, it substitutes the variable names with the variable values, and then calls the task.
  • Examples: Variable substitution
    Examples of variable substitution using XML and IBM MQ Explorer.
  • Monitor a queue and using variable substitution
    We can monitor a queue and transfer messages from the monitored queue to a file by using the fteCreateMonitor command. The value of any IBM MQ message property in the first message to be read from the monitored queue can be substituted in the task XML definition and used to define the transfer behavior.
  • Configure monitor retry behavior for message-to-file transfers
    If a message-to-file transfer that is triggered by a resource monitor fails and leaves the message group that triggered the monitor on the queue, that transfer is resubmitted at subsequent poll intervals. The number of times that the transfer is resubmitted is limited by the monitorGroupRetryLimit property of the monitoring agent.
  • Use a trigger file
    We can use the contents of a trigger file in a resource monitor to define a set of files to transfer in a single transfer request. Each time a matching trigger file is detected, its contents are parsed for source file paths and optionally for destination file paths. These file paths are then used to define file items in the task transfer XML file that you specify, which is submitted as single transfer request to the agent. The definition of the resource monitor determines whether trigger content is enabled.
  • Logging MFT resource monitors
    We can obtain diagnostic information about resource monitors by using logging.
  • Backing up and restoring MFT resource monitors
    We can back up the resource monitors that we want to have available for future use by exporting their definitions to an XML file that we can then import to create a new resource monitor from the backup.
  • Clearing resource monitor history
    We can clear the history of a resource monitor so that another file transfer request can be submitted for a file that was not transferred earlier due to a failure. To clear the resource monitor history, we can use either the fteClearMonitorHistory command or the IBM MQ Explorer.

Parent topic: Administer Managed File Transfer


Related information