IBM Support

Monitoring MQ Appliance Queue Manager with Application Performance Management

Question & Answer


Question

How to monitor remote queue managers on MQ Appliance environment for Application Performance Management?

Answer

Prerequisites
Before you set up the environment for remote monitoring, make sure that the following software is installed:
1. Application Performance Management version 8.1.2 (with WebSphere MQ Agent)
2. IBM MQ Client version 8

Remote queue manager monitoring on MQ Appliance
1. Create an instance of the WebSphere MQ Agent.

2. Modify the agent instance configuration file to enable remote monitoring
by replacing all the content in the configuration file with the following lines:

SET GROUPNAME (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 host name or IP address of the remote host.
- Qmgr_remote is the name of the remote queue manager.

Tip: You can get the host name from the monitoring file name of the agent instance, which is hostname_mq_Qmgr_remote.cfg.


3. Run the following commands on the remote host 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)#runmqscQmgr_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 used for the listener.
- Chl_name is the name that you assign to the client and server channel.
- Host_IP is the IP address of the remote host.

4. Transfer the client channel definition table file (AMQCLCHL.TAB) to the system where the WebSphere MQ Agent is installed:

M2000#config
M2000(config)#copy mqbackup:///qmgr_AMQCLCHL.TABscp://username@ipaddress/[/]directorypath

Tip: The destination directory on the host of the agent varies, depending on the operating system where the WebSphere MQ Agent is running, :

  • Windows systems: install_dir\TMAITM6_x64
  • UNIX/Linux systems: install_dir/arch/mq/bin
where:
- install_dir is the WebSphere MQ Agent installation directory.
- arch is the agent architecture code of the operating system.

5. Rename the qmgr_AMQCLCHL.TAB file to AMQCLCHL.TAB.

6. Configure the listener to start automatically and then start the listener on the remote queue manager by running the following commands on the remote host:

M2000# mqcli
M2000(mqcli)#runmqscQmgr_remote
>
ALTER LISTENER(Listener) TRPTYPE(tcp) CONTROL(QMGR)
> START LISTENER(Listener)
>
END

where:
- Qmgr_remote is the name of the remote queue manager.
- Listener is the name of the listener on the remote queue manager.

7. Make sure that channel authentication settings are configured properly for the user ID that is used to set up connections between the agent instance and the queue manager.

8. Start all listeners for the remotely monitored queue manager and start the WebSphere MQ Agent instance.

Tip: If IBM MQ version 8 is installed on the system where the monitoring agent is installed, you can create the client channel definition table file (AMQCLCHL.TAB) on the system with the following command:

runmqsc -n
>DEFINE CHANNEL(chl_name) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME(’host_IP(port_no)’) QMNAME(qmgr_remote)
>END


The AMQCLCHL.TAB file will be created within the IBM MQ data directory. The default is . /var/mqm on Linux/AIX systems or C:\Program Files (x86)\IBM\WebSphere MQ on Windows system.

Remote HA queue manager monitoring on MQ Appliance
  • Linux or AIX systems

You must have two different installations of the WebSphere MQ Agent to monitor both the running and runningelsewhere queue managers.

Procedure:

1. Install WebSphere MQ Agent in two different directories the system, for example, /opt/ibm/apm/mqappliance1 and /opt/ibm/apm/mqappliance2.

2. Create the agent instance for each WebSphere MQ Agent installation.

3. Modify the each agent instance configuration file to enable remote monitoring by replacing all the content in the configuration file 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_Name) REMOTE(YES)
SET AGENT NAME(agentID)
SET QUEUE NAME(*) MGRNAME(Qmgr_Name) QDEFTYPE(PREDEFINED)
SET CHANNEL NAME(*) MGRNAME(Qmgr_Name)
PERFORM STARTMON SAMPINT(300) HISTORY(NO)


where:
- Qmgr_ Name is the name of the HA queue manager.
- agentID is the host name or IP address of each remote host.

Tip: You can get the host name from the monitoring file name of the agent instance, which is hostname_mq_Qmgr_remote.cfg.

4. Create a server connection channel and a listener for the primary queue manager with the following commands for the primary queue manager:

M2000# mqcli
M2000(mqcli)#runmqsc qmgr_primary
>DEFINE LISTENER(Listener) TRPTYPE(TCP) PORT(port_NO)
>DEFINE CHANNEL(chl_name) CHLTYPE(SVRCONN) TRPTYPE(TCP)
>END

where:
- Listener is the name of the listener
- qmgr_primary is the name of the primary queue manager.
- port_no is the port number that is used by the Listener
- chl_name is the name that you want to assign to the client and server for the channels.

Important: You must run all these commands before you proceed to the next step.

5. Create the client channel definition table file (e.g. AMQCLCHL.TAB) for the WebSphere MQ Agent for MQ appliance 1 by performing the following steps:

a. Create a new AMQCLCHL.TAB file for the queue manager Qmgr_Name on the MQ appliance 1 as follows:

runmqsc –n
>DEFINE CHANNEL(chl_name) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME(’host_IP_of_appliance1(port_no)’) QMNAME(Qmgr_Name)
>END

where, host_IP_of_appliance1 is the IP address of the MQ appliance 1.

Tip: the chl_name and port_no must be the same as the ones that are defined in step 4.

b. Move the primary AMQCLCHL.TAB file to the install_dir/arch/mq/bin destination directory.

where:
- install_dir is the WebSphere MQ Agent installation directory for the qmgr_primary primary queue manager.
- arch is the agent architecture code of the operating system.

Destination directory example: /opt/ibm/apm/mqappliance1/lx8266/mq/bin

6. Create the client channel definition table file (e.g. AMQCLCHL.TAB) for the WebSphere MQ Agent for MQ appliance 2.

a. Use the same method to create another AMQCLCHL.TAB file of the queue manager Qmgr_Name on the MQ appliance 2 as follows:

runmqsc –n
>DEFINE CHANNEL(chl_name) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME(’host_IP_of_appliance2(port_no)’) QMNAME(Qmgr_Name)
>END

where, host_IP_of_appliance2 is the IP address of the MQ appliance 2.

Tip: the chl_name and port_no must be the same as the ones that are defined in step 4.

b. Move the secondary AMQCLCHL.TAB file to the install_dir/arch/mq/bin destination directory.

where:
- install_dir is the WebSphere MQ Agent installation directory for the qmgr_secondary secondary queue manager.
- arch is the agent architecture code of the operating system.

Destination directory example: /opt/ibm/apm/mqappliance2/lx8266/mq/bin

7. Make sure that channel authentication settings are configured properly for the user ID that is used to set up connections between agent instance and the queue manager.

8. Start all listeners for the remotely monitored queue manager and start all the WebSphere MQ Agent instances.
  • Windows system

You only need one installation of the WebSphere MQ Agent to monitor the both running and runningelsewhere queue managers.

Procedure:

1. Create two agent instances of WebSphere MQ Agent for each HA queue manager.

2. Modify the each agent instance configuration file to enable remote monitoring by replacing all the content in the configuration file 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_Name) REMOTE(YES)
SET AGENT NAME(agentID)
SET QUEUE NAME(*) MGRNAME(Qmgr_Name) QDEFTYPE(PREDEFINED)
SET CHANNEL NAME(*) MGRNAME(Qmgr_Name)
PERFORM STARTMON SAMPINT(300) HISTORY(NO)


where:
- Qmgr_ Name is the name of the HA queue manager.
- agentID is the host name or IP address of each remote host.

Tip: The configuration files are in the directory of install_dir\TMAITM6_x64, where install_dir is the WebSphere MQ Agent installation directory.

3. Create a server connection channel and a listener for the primary queue manager with the following commands for the primary queue manager:

M2000# mqcli
M2000(mqcli)#runmqsc qmgr_primary
>DEFINE LISTENER(Listener) TRPTYPE(TCP) PORT(port_NO)
>DEFINE CHANNEL(chl_name) CHLTYPE(SVRCONN) TRPTYPE(TCP)
>END

where:
- Listener is the name of the listener
- qmgr_primary is the name of the primary queue manager.
- port_no is the port number that is used by the Listener
- chl_name is the name that you want to assign to the client and server for the channels.

Important: You must run all these commands before you proceed to the next step.

4. Create the client channel definition table file (AMQCLCHL.TAB) for the each instance. Follow the instructions of Step 5 and 6 in the Linux or AIX systems section above.

5. Rename the client channel definition table files (e.g. NODE1.TAB, NODE2.TAB) and then transfer them to the install_dir\TMAITM6_x64 directory.

6. Edit the .ini file for each agent instance to specify the renamed table file for the MQCHLTAB value.
For example, after you create two WebSphere MQ Agent instances, which are instance1 and instance2, two files, kmqcma_instance1.ini and kmqcma_instance2.ini, are created in the C:\IBM\APM\TMAITM6_x64 installation directory. Specify the MQCHLTAB value as follows in each .ini file:
  • In the kmqcma_instance1.ini file: MQCHLTAB=NODE1.TAB
  • In the kmqcma_instance2.ini file: MQCHLTAB=NODE2.TAB

where NODE1.TAB and NODE1.TAB are the new names that you assigned to the client channel definition table files in Step 5.

7. Open the Windows registry editor by typing regedit in the command line. Locate the following key of the MQCHLTAB and change it from AMQCLCHL.TAB to the proper value.
For example:
HKEY_LOCAL_MACHINE\SOFTWARE\Candle\KMQ\Ver730\instance1\Environment
MQCHLTAB=NODE1.TAB
HKEY_LOCAL_MACHINE\SOFTWARE\Candle\KMQ\Ver730\instance2\Environment
MQCHLTAB=NODE2.TAB

where, instance1 and instance2 are the two WebSphere MQ Agent instance names.

8. Make sure that channel authentication settings are configured properly for the user ID that is used to set up connections between agent instance and queue manager.

8. Start listeners for monitored queue manager and start all the agent instances.

Both queue managers' group widgets of the MQ Appliance HA environment will be displayed in the APM UI.

[{"Product":{"code":"SSATHD","label":"IBM SmartCloud Application Performance Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"IBM SmartCloud Application Performance Management","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"7.7.0","Edition":"Advanced","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 June 2018

UID

swg21973806