fteSetAgentLogLevel (Turn on or turn off logging to file of certain MFT agent operations)
Use the fteSetAgentLogLevel command to turn on or
turn off logging for the interactions between a protocol bridge agent and file servers, and resource
monitor activity.
Use the fteSetAgentLogLevel command to turn on or turn off
logging for the interactions between a protocol bridge agent and file servers, resource monitor
activity, and transfer logs.
Purpose
IBM® MQ
Managed File Transfer provides a logging mechanism that can be used to capture:
- Information about the flows between a protocol bridge agent and file servers
- Details about the polls performed by resource monitors
Progress of transfers
When you use the fteSetAgentLogLevel command to enable logging for a protocol
bridge agent, the agent records details of the FTP, SFTP and FTPS commands that are sent to the file
server, and the responses that are received. This information is written to a log file called
agenteventN.log, where N stands for a number.
On Multiplatforms, the agenteventN.log file
is in the
MQ_DATA_PATH/mqft/logs/coordination_qmgr_name/agents/agent_name
directory.
On z/OS®, the
agenteventN.log file is in the
BFG_DATA/mqft/logs/coordination_qmgr_name/agents/agent_name
directory.
The information in the log file can be useful in diagnosing issues that might occur during a file transfer involving the protocol bridge agent.
When you use the fteSetAgentLogLevel command to enable logging for resource
monitors, the agent records information about the polls performed by the monitors into a log file
called resmoneventN.log, where N stands
for a number.
On Multiplatforms, the resmoneventN.log
file is in the
MQ_DATA_PATH/mqft/logs/coordination_qmgr_name/agents/agent_name
directory.
On z/OS, the
resmoneventN.log file is in the
BFG_DATA/mqft/logs/coordination_qmgr_name/agents/agent_name
directory.
The information in the log file includes:
- The time when the monitor started and finished a poll.
- Details of any managed transfers submitted as a result of a poll.
For more information on resource monitor logging, see Logging MFT resource monitors.
You can turn on, turn off, and set the level of logging that you require, in two ways:
- Use the fteSetAgentLogLevel command to enable or disable logging while the agent is running. You do not need to restart the agent for the change to the logging level to take effect.
- Set properties in the agent.properties file to enable or disable logging
from startup. The properties that need to be set depend on whether logging is being enabled for a
protocol bridge agent, or for resource monitors:
- For protocol bridge agents, logging is controlled using the agentLog property.
- To enable or disable resource monitor logging, use the resourceMonitorLog property.
If you use the fteSetAgentLogLevel command to enable
transfer logging, the agent records information about transfer progress into a log file called
transferlog0.json.
On Multiplatforms, the transferlog0.json file is in the
MQ_DATA_PATH/mqft/logs/coordination_qmgr_name/agents/agent_name/logs
directory.
On z/OS, the transferlog0.json file is in the
BFG_DATA/mqft/logs/coordination_qmgr_name/agents/agent_name/logs
directory.
For more information, see The agent.properties file.
Attention: When the command is run on the system where
a standby instance of a highly available (HA) agent is running, the new log level is applied only to
that instance. The log level on the active instance of the agent, and any other standby instances,
will not be changed.
Note:
You must select only one of the logAgent and
logMonitor options. If you specify both options, the command fails with the
following error
message:
You must select only one of the logAgent,
logMonitor or logTransfer options. If you specify more
than one option, the command fails with the following error
message:
You must select only one of the logAgent and
logMonitor options. If you specify both options, the command fails with the
following error
message:BFGCL0756E:Invalid command options. Specify either logAgent or logMonitor option but not both.
You must select only one of the logAgent,
logMonitor or logTransfer options. If you specify more
than one option, the command fails with the following error
message:BFGCL0756E:Invalid command options. Specify only one of logAgent, logMonitor, or logTransfer options.
Parameters
- -logMonitor monitor_name=log_level
- Required.A comma separated list of resource monitors and logging levels, where:
- monitor_name
- Optional. The name of the resource monitor, or a comma-separated list of resource monitors, that
the logging level is to be applied to. If you do not specify a monitor name, or a comma-separated
list of resource monitors, the logging level is applied to all resource monitors running within the
agent.Attention: If you have specified non-existent resource monitor names in the command, no error is displayed on the console.
- log_level
- Required.
You cannot use the logMonitor option with the
logAgent and logTransfer options. - -logAgent component=operation
- Required.
- -logFilter filter=value
- Optional.
-logTransfer log_level- Required. Attention: If the fteSetAgentLogLevel command is run by a user other the one that started the agent, error message BFGNV0066E is output on the console:
- -p configuration_options
- Optional.
- -? or -h
- Optional. Displays the command syntax.
- agent_name
- Required. Name of the protocol bridge agent for which the logging is enabled or disabled.
Attention: If you have specified non-existent resource monitor names in the command, no
error is displayed on the console.
Example 1
In this example, multiple components are specified in one command, by using a command delimited
group. Logging is enabled for the FTP and SFTP protocol, and disabled for the FTPS protocol, on the
protocol bridge agent PBA1.
fteSetAgentLogLevel -logAgent ftp=on,ftps=off,sftp=on PBA1You can also separate the
components with a comma to achieve the same result, for example;fteSetAgentLogLevel -logAgent ftp,sftp=on,ftps=off PBA1Example 2
In this example, the same component is repeated in a command. The last instance of a
component=operation pair is considered as valid. This example
disables logging for the FTP protocol on the protocol bridge agent PBA1.
fteSetAgentLogLevel -logAgent ftp=on,ftp=off PBA1The previous example has the same effect as this example:
fteSetAgentLogLevel -logAgent ftp=off PBA1Example 3
This example enables the default value of
info level logging for monitor
MON1 of agent
AGENT1:fteSetAgentLogLevel -logMonitor MON1=info AGENT1Example 4
This example enables ,
moderate level logging for monitors MON1
and MON2 of agent
AGENT1:fteSetAgentLogLevel -logMonitor MON1,MON2=moderate AGENT1Example 5
This example turns off logging for monitor
MON1 and enable info
level logging for monitor MON2 of agent
AGENT1:fteSetAgentLogLevel -logMonitor MON1=off,MON2=info AGENT1Return codes
- 0
- Command completed successfully.
- 1
- Command ended unsuccessfully.
