You can create a log target to consume the output of the file system monitor.
About this task
The file system monitor is enabled by default and generates log events for the system file
systems and queue manager files systems. You can define log targets to consume the output of the
monitor. (You can also configure the file system monitor to assign different parameters to
particular system file systems or queue managers - see Configuring the file system monitor.)
This topic describes an example log target that outputs to a local file on the appliance. For
more examples, including one that writes to a syslog target, see Log target examples.
Procedure
-
To create a log target by using the IBM MQ Appliance web UI:
- Start the IBM MQ Appliance web UI and click the
Administration icon
.
- Select .
- Click Add.
- Specify a name for the log target, for example, "MQ_fs_monitor".
- In the General Configuration section, complete the following
steps:
- Specify a Target Type of File.
- Select a Log Format of XML (you could
alternatively select Text).
- In the Destination Configuration section, specify a
File Name in the form
logstore:///filename
. The Logstore
directory is the suggested destination, but you could specify different directories such as
local or logtemp.
- Open the Event Subscriptions tab and complete the following
steps:
- Click Add.
- Select an Event Category of fs-usage-monitor.
- Select a Minimum event priority of
information
- Click Apply, and when the window closes, click Save
changes.
- To create a log target by using the CLI:
- Connect to the IBM MQ Appliance as
described in Command line access. Log in as an administrative
user.
- Type
config
to enter global configuration mode.
- Enter the following command to create your logging target configuration:
logging target name
Where
name specifies the name of the log target, for example,
"MQ_fs_monitor".
- Use the log target commands to configure your logging target. Use these commands to
specify the features of the log target. The following example shows the commands for an example
file system monitoring log target named "MQ_fs_monitor".
mqa(config)# logging target MQ_fs_monitor
New Log Target configuration
mqa(config logging target MQ_fs_monitor)# type file
mqa(config logging target MQ_fs_monitor)# format xml
mqa(config logging target MQ_fs_monitor)# type local-file logstore:///fs_logfile
mqa(config logging target MQ_fs_monitor)# event fs-usage-monitor info
mqa(config logging target MQ_fs_monitor)# exit
mqa(config)# write mem
- For guidance on using the REST interface to configure the appliance, see REST management interface.