IBM Performance Management

Remotely monitoring queue managers on MQ Appliance

You can use the WebSphere® MQ agent to monitor remote queue manager on MQ Appliance environment. To do it, you must configure an agent instance and set up connections between the agent and the queue manager.

Before you begin

You must create an instance of the WebSphere MQ agent for remote monitoring. For instructions, see Configuring the WebSphere MQ agent.

Procedure

  1. Open one of the following agent configuration files, depending on the operating system:
    • Windowsinstall_dir\TMAITM6_x64\mq_<instance_name>.cfg
    • Linux or AIXinstall_dir/config/hostname_mq_qmgr_remote.cfg
  2. Modify the configuration file of the agent instance to enable remote monitoring by replacing all the content with the following lines:
    SET   GROUP NAME (GROUP1) -
    DEFAULT(YES) -
    RETAINHIST(120) -
    COMMAND (YES) -
    MSGACCESS(DESC) -
    EVENTS(REMOVE) -
    ACCOUNTINGINFO(REMOVE) -
    STATISTICSINFO(REMOVE)
    
    SET MANAGER NAME(qmgr_remote) REMOTE(YES)
    SET AGENT NAME(agentID)
    SET QUEUE NAME(*) MGRNAME(qmgr_remote) QDEFTYPE(PREDEFINED)
    SET CHANNEL NAME(*) MGRNAME(qmgr_remote)
    PERFORM STARTMON SAMPINT(300) HISTORY(NO)
    where:
    • Qmgr_remote is the name of the remote queue manager.
    • agentID is the ID to identify the queue manager system. It is usually the host name or the IP address of the remote system where the queue manager is running.
  3. Run the following commands on the remote system where the queue manager is installed to define a client channel, a server connection channel, and a listener on the remote queue manager for communication with the monitoring agent:
    M2000# mqcli
    M2000(mqcli)#runmqsc qmgr_remote
    > DEFINE LISTENER(listener) TRPTYPE(TCP) PORT(port_NO) 
    > DEFINE CHANNEL(chl_name)CHLTYPE(SVRCONN) TRPTYPE(TCP)
    > DEFINE CHANNEL(chl_name) CHLTYPE(CLNTCONN) TRPTYPE(TCP)
    CONNAME('host_IP(port_NO)') QMNAME(Qmgr_remote)
    > END
    where:
    • qmgr_remote is the name of the remote queue manager.
    • listener is the name of the listener on the remote queue manager.
    • port_NO is the port number to be used for the listener.
    • chl_name is the name that you assign to both the server channel and the client channel.
    • host_IP is the IP address of the remote system.
  4. Create the client channel definition table file (AMQCLCHL.TAB) for the queue manager with the runmqsc or runmqsc -n command.
    Tip:
    • If IBM® MQ (WebSphere MQ) V8.0 or later is installed on the system where the WebSphere MQ agent is running, you can use the following command to create the AMQCLCHL.TAB file for remote monitoring:
      runmqsc -n
      > DEFINE CHANNEL(chl_name) CHLTYPE(CLNTCONN) TRPTYPE(TCP)
      > CONNAME('host_IP(port_NO)') QMNAME(qmgr_remote) 
      > END
    • To monitor HA queue managers on MQ Appliance, you can use one agent instance to connect to whichever system that has the active queue manager. To do it, create two client channel definition table files for the HA queue managers (one for each IP address).
      runmqsc -n
      > DEFINE CHANNEL(chl_name) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME('host_IP1(port_NO)') QMNAME(HA_qmgr) 
      > DEFINE CHANNEL(chl_name) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME('host_IP2(port_NO)') QMNAME(HA_qmgr) 
      > END
  5. Transfer the AMQCLCHL.TAB file in binary mode to the system where the WebSphere MQ agent is installed. You can use File Management in IBM MQ Console user interface to do it. On Linux or UNIX systems, you can also use the following command:
    M2000#config
    M2000(config)#copy mqbackup:///qmgr_AMQCLCHL.TAB scp://username@ipaddress/[/]destdirectory
    Tip: The destination directory varies depending on the operating system where the WebSphere MQ agent is installed.
    • Windowsinstall_dir\TMAITM6_x64
    • Linux or AIXinstall_dir/arch/mq/bin
  6. Rename qmgr_AMQCLCHL.TAB to AMQCLCHL.TAB.
  7. Configure the listener to start automatically and then start the listener on the remote queue manager by running the following commands on the remote system:
    M2000# mqcli
    M2000(mqcli)#runmqsc qmgr_remote
    > ALTER LISTENER(listener) TRPTYPE(tcp) CONTROL(qmgr_remote) 
    > START LISTENER(listener) 
    > END
  8. Make sure that channel authentication settings are configured appropriately for the user ID that is used to set up connection between agent instance and queue manager.
  9. Start all listeners for both remotely monitored queue manager and start the WebSphere MQ agent.