Creating a log target for the file system monitor

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:
    1. Start the IBM MQ Appliance web UI and click the Administration icon Administration icon.
    2. Select Miscellaneous > Log targets.
    3. Click Add.
    4. Specify a name for the log target, for example, "MQ_fs_monitor".
    5. In the General Configuration section, complete the following steps:
      1. Specify a Target Type of File.
      2. Select a Log Format of XML (you could alternatively select Text).
    6. 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.
    7. Open the Event Subscriptions tab and complete the following steps:
      1. Click Add.
      2. Select an Event Category of fs-usage-monitor.
      3. Select a Minimum event priority of information
    8. Click Apply, and when the window closes, click Save changes.
  • To create a log target by using the CLI:
    1. Connect to the IBM MQ Appliance as described in Command line access. Log in as an administrative user.
    2. Type config to enter global configuration mode.
    3. 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".
    4. 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.