Configuring log targets using the command line

You can configure a logging target by using the IBM® MQ Appliance command line interface.

About this task

First you configure the log target to specify where and how it is written. You then specify a subscription to one or more events for your log target. You can restrict the messages in log targets by object filters, event category, and event priority. You could, for example, subscribe to all events and then specify object, event, or IP address filters to extract the exact information that you are interested in to your log target.

Procedure

To configure a log target:

  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 configuration.
  4. Use the log target commands to configure your logging target. Use these commands to specify features such as log type, log events, IP address of the target where the log is written. For example, the following commands set up a syslog-tcp target on the remote machine rmach.hursley.ibm.com, capturing diagnostic messages from a queue manager named QM1:
    mqa(config)# logging target QM1_messages
    New Log Target configuration
    
    mqa(config logging target QM1_messages)# summary "Remote logging to rmach.hursley.ibm.com for queue manager QM1"
    mqa(config logging target QM1_messages)# type syslog-tcp
    mqa(config logging target QM1_messages)# timestamp syslog
    mqa(config logging target QM1_messages)# local-ident "warrior12"
    mqa(config logging target QM1_messages)# remote-address "198.51.100.0" "1514"
    mqa(config logging target QM1_messages)# local-address 198.51.100.12
    mqa(config logging target QM1_messages)# event "qmgr" 
    mqa(config logging target QM1_messages)# object qmgr QM1
    mqa(config logging target QM1_messages)# exit
    mqa(config)# write mem