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. We 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.
We 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.
Syntax
fteListMonitors
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 we 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 we 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 we do not specify the -mn parameter, all resource monitors associated with all agents for the default coordination queue manager are listed by default.
- -mquserid (userID)
- 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 monitor, including whether the 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.
- -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.
Example: list resource monitors
In this example, all resource monitors associated with the monitoring agent (and source agent for the file transfers associated with the monitor) AGENT1 are listed:fteListMonitors -ma AGENT1
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.xmlExample: 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/resmonbackupExamples: 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/resmonbackupIn this example, all resource monitors on AGENT1 are exported to the specified directory:fteListMonitors -ma AGENT1 -od /usr/mft/resmonbackupWe 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/resmonbackupIn 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/resmonbackupIn 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.