fteListMonitors (list MFT resource monitors)

Use the fteListMonitors command to list all of the existing resource monitors in a Managed File Transfer network using the command line.

Purpose

The fteListMonitors command lists existing resource monitors. You can filter the command output by specifying an agent name and a resource monitor name.

This command uses the coordination.properties file to connect to the coordination queue manager. For more information, see The MFT coordination.properties file.

You can use the -ox parameter to export a resource monitor to an XML file. For more information on how to use this XML file, see fteCreateMonitor (create an MFT resource monitor).

Specify the optional -p parameter for this command only if you want to use a set of configuration options different from your default set. For more information, see Configuration options.

Resource monitor names

Resource monitor names can contain characters that might not be valid for file names. From IBM® MQ 9.1, if a resource monitor name contains any of the following characters, the fteListMonitors -od command converts that character to its ASCII equivalent:
  • "\" (Back slash) = %5C
  • "/" (Forward slash) =%2F
  • ":" (Colon) =%3A
  • "<" (Less than) = %3C
  • ">" (Greater than) = %3E
  • "''" (Double quotes) = %22
  • "|" (Pipe)=%7C
For example, a resource monitor with name:
SRC.TEST \(TESTING-TEST\)
is saved to a file called:
SRC.TEST %5C(TESTING-TEST%5C)

In addition, from IBM MQ 9.1, you no longer have to use an escape character when specifying any special characters while using the fteListMonitors -ma <agent name> -mn <monitor name> command.

For example, where in earlier releases the command used to be:
fteListMonitors -ma SRC -mn "TEST \(TESTING-TEST\)"
from IBM MQ 9.1 you enter:
fteListMonitors -ma SRC -mn "TEST (TESTING-TEST)"

Syntax

fteListMonitors

Read syntax diagramSkip visual syntax diagramfteListMonitors-p configuration_options -ma monitoring_agent_name  -mn  monitor_name -v -ox  xml_filename -oddirectory_name-mquseriduser_id-mqpasswordpassword

Parameters

-p configuration_options
Optional. This parameter determines the set of configuration options to use to cancel the transfer. By convention use the name of a non-default coordination queue manager as the input for this parameter. The command then uses the set of properties files that are associated with this non-default coordination queue manager.
If you do not specify this parameter, the set of configuration options based on the default coordination queue manager is used.
-ma monitoring_agent_name
Optional. Filters resource monitors by agent name by using the pattern that you provide as input. Asterisk (*) characters are interpreted as wildcards that match zero or more characters. If you do not specify the -ma parameter, all resource monitors associated with all agents for the default coordination queue manager are listed by default.
-mn monitor_name
Optional. Filters resource monitors by monitor name by using the pattern that you provide as input. Asterisk (*) characters are interpreted as wildcards that match zero or more characters. If you do not specify the -mn parameter, all resource monitors associated with all agents for the default coordination queue manager are listed by default.
-mquserid user_id
Optional. Specifies the user ID to authenticate with the coordination queue manager.
-mqpassword password
Optional. Specifies the password to authenticate with the coordination queue manager. You must also specify the -mquserid parameter. If you specify -mquserid, but do not specify -mqpassword, you are prompted to supply the associated password. The password is not displayed.
-v
Optional. Generates verbose output that includes additional information about the status of the resource monitor, including whether the resource monitor is started or stopped, the directory resource path that is being monitored and the trigger conditions.
-ox xml_filename
Optional. You must specify this parameter in combination with the -ma and -mn parameters. Exports the resource monitor to an XML file that can then be used by the fteCreateMonitor command and the -ix parameter.
The -ox parameter must not be combined with the -od parameter.
-od directory_name
Optional. Exports multiple resource monitor definitions to the specified directory. Each resource monitor definition is saved to a separate XML file with a name in the format agent name.monitor name.xml. You must specify a valid target directory for the XML files, otherwise an error message is displayed. This parameter must not be combined with the -ox parameter.
-? or -h
Optional. Displays command syntax.

Examples: list resource monitors

In this example, all resource monitors associated with the monitoring agent (and source agent for the file transfers associated with the resource monitor) AGENT1 are listed:
fteListMonitors -ma AGENT1 
The output from this command is as follows:
C:\Users\Administrator>fteListMonitors -ma AGENT1
5724-H72 Copyright IBM Corp.  2008, 2025.  ALL RIGHTS RESERVED
Agent Name:     Monitor Name:     Resource Type:
AGENT1          MONITOR1          Directory
In the following example, the command includes the -v parameter, which generates verbose output that includes additional information about the status of the resource monitor:
fteListMonitors -ma AGENT1 -v
In this case, the output from the command is as follows:
C:\Users\Administrator>fteListMonitors -ma AGENT1 -v
5724-H72 Copyright IBM Corp.  2008, 2025.  ALL RIGHTS RESERVED
Monitor Information:
     Name:                MONITOR1
     Agent:               AGENT1
     Status:              Stopped
     Resource Type:       Directory
     Resource:            C:\src
     Poll interval:       2 seconds
     Batch size:          1
     Condition:           Match
     Pattern:             * (wildcard)

Example: export one resource monitor to an XML file

In this example, a single resource monitor, MONITOR1, on AGENT1 is exported to the XML file filename1.xml by specifying an XML file name with the -ox parameter:
fteListMonitors -ma AGENT1 -mn MONITOR1 -ox filename1.xml 

Example: export one resource monitor to a specified directory

In this example, a single resource monitor, MONITOR1, on AGENT1 is exported to the directory that is specified by the -od parameter. Except for the difference in the XML file name format, this example is similar to using the -ox parameter.
fteListMonitors -ma AGENT1 -mn MONITOR1 -od /usr/mft/resmonbackup 

Examples: export a batch of resource monitors to an XML file in a specified directory

In all of the following examples, the resource monitors are exported to the directory that is specified by the -od parameter. Each resource monitor definition is saved to separate XML file with a name in the format agent name.monitor name.xml.

In this example, all resource monitors are exported to the specified directory:
fteListMonitors -od /usr/mft/resmonbackup
In this example, all resource monitors on AGENT1 are exported to the specified directory:
fteListMonitors -ma AGENT1 -od /usr/mft/resmonbackup

You can use wildcard matching to define which resource monitors to export by using an asterisk character (*) when you specify a pattern to match to agent names, or monitor names, or both.

In this example, all resource monitors on AGENT1 with names that match the pattern MON* are exported to the specified directory:
fteListMonitors -ma AGENT1 -mn MON* -od /usr/mft/resmonbackup
In this example, all resource monitors on agents with names that match the pattern AGEN* are exported to the specified directory:
fteListMonitors -ma AGEN* -od /usr/mft/resmonbackup
In this example, all resource monitors with names that match the pattern MON* on agents with names that match the pattern AGENT* are exported to the specified directory:
fteListMonitors -ma AGENT* -mn MON* -od /usr/mft/resmonbackup

Return codes

0
Command completed successfully.
1
Command ended unsuccessfully.