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.


Before starting

If user authority management has been enabled by setting the authorityChecking attribute to true in the agent.properties file, the user who clears the monitor history must have the appropriate authority as shown in the following table.

User clearing the monitor history MFT access authority Required authority
The same user as the one that created the resource monitor. Monitor BROWSE on SYSTEM.FTE.AUTHMON1.<monitor_agent_name>

This is the same authority as the authority required to create or delete the resource monitor.

Any user other than the user that created resource monitor. Monitor operations SET on SYSTEM.FTE.AUTHPS1.<agent_name>

This is the same authority as the authority required to delete the resource monitor.

For more information about user authority management, see Restricting user authorities on MFT agent actions.

If a user without the required authority attempts to clear the resource monitor history, the fteClearMonitorHistory command outputs an error message and logs the failure in the agent's output0.log file. For more information, see fteClearMonitorHistory: clear resource monitor history.


About this task

If a file transfer has been initiated and a file cannot be transferred for any reason, the resource monitor does not select this file for transfer again in its next poll because the monitor history indicates that the file was seen in an earlier poll and it has not been modified since then (see MFT resource monitoring concepts).

Before Version 9.1.3, if a file fails to transfer, the file transfer can only be initiated again either if the file is deleted and then placed in the directory again, or if the file is updated so that the last modified date attribute is changed, or if the resource monitor itself is recreated.

However, from Version 9.1.3, we can clear the resource monitor history either by using the fteClearMonitorHistory command or by using the IBM MQ Explorer. Clearing the history allows another transfer request for a file that has failed to transfer to be submitted without the need to either delete file and then place in the directory again, or update the file to change its last modified date attribute, which is useful, for example, in situations where there is need for the file to be transferred but modifying the file is not possible. Being able to clear the history of a resource monitor also means that there is no need to recreate the resource monitor in order to submit another transfer request for a file that has failed to transfer.

The sample SCSQFCMD member shipped with Managed File Transfer on z/OS includes a JCL script to clear a monitor's history.


Procedure

  • To use the fteClearMonitorHistory command to clear the resource monitor history, enter the command in the following format:
    fteClearMonitorHistory -p <configuration> -ma <agent name> -mn <monitor name> -w 1000
    Only the -ma and -mn parameters are required. All other parameters are optional. For more information about how to use the fteClearMonitorHistory command, including examples, see fteClearMonitorHistory: clear resource monitor history. If the history is cleared successfully, the command outputs the following message:
    BFGCL0780I: A request to clear history of resource monitor 'monitor name' of agent 'agent name' has been issued.
    BFGCL0251I: The request has successfully completed.
    and logs the success in the agent's output0.log file.

    If the attempt to clear the resource monitor history fails, the fteClearMonitorHistory outputs an error message and logs the failure in the agent's output0.log file.

  • To use the resource monitor view in the IBM MQ Explorer MFT Plug-in to clear the resource monitor history, right-click the resource monitor and select Clear History from the drop-down menu. If the history is cleared successfully the following message is displayed:
    BFGUI00171: Resource monitor history cleared successfully.
    If the attempt to clear the history fails, an error message is displayed. For example:
    BFGUI0016E Failed to clear history of specified resource monitor - reason 2059

Parent topic: Monitor MFT resources