Remotely monitoring HA queue managers on MQ Appliance
To remotely monitor HA queue manager on MQ Appliance, you have two options. One is to use a single agent instance to connect to whichever system that has the active queue manager. The other option is to use separate agent instance for each appliance that the queue manager might be running on.
About this task
Only the second option is explained here. To use different agent instances, you need two installations of the WebSphere® MQ agent on Linux or UNIX systems. On Windows systems, you only need one installation of the agent and create separate agent instances.
Procedure
Perform the following steps to use the WebSphere MQ agent installed on Linux or UNIX systems for remote monitoring:
- Install the WebSphere MQ agent in different directories on the system.
- Create an instance of each installed WebSphere MQ agent. For instructions, see Configuring the WebSphere MQ agent.
- Modify the configuration file of each agent instance to enable remote
monitoring by replacing the content with the following lines:
where: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)
- qmgr_name is the name of the HA 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 HA queue manager is running.
The configuration file name and path is install_dir/config/hostname_mq_qmgr_name.cfg.
- Create a pair of client and server channels between the primary queue manager and the WebSphere MQ agent, between the secondary queue manager
and the WebSphere MQ agent on the remote system
where the primary queue manager is installed. Remember: You must run all the following commands before you proceed to the next step.
- Run the following commands for the primary queue manager:
M2000# mqcli M2000(mqcli)#runmqsc qmgr_primary >DEFINE LISTENER(listener_primary) TRPTYPE(TCP) PORT(port_no_primary) >DEFINE CHANNEL(chl_name_primary) CHLTYPE(SVRCONN) TRPTYPE(TCP) >DEFINE CHANNEL(chl_name_primary) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME('host_IP(port_no_primary)') QMNAME(qmgr_primary)
where:- qmgr_primary is the name of the primary queue manager.
- listener_primary is the name of the listener for the primary queue manager.
- port_no_primary is the port number that is used by the listener.
- chl_name_primary is the name that you want to assign to both the server channel and the client channel.
- host_IP is the IP address of the system where the primary queue manager is installed.
- Run the following commands for the secondary queue manager on the primary queue manager. This is
to add the connection information for the secondary queue manager to the client channel definition
table file of the primary queue manager. The same agent can then connect to the secondary queue
manager automatically when the primary queue manager fails over.
>DEFINE LISTENER(listener_secondary) TRPTYPE(TCP) PORT(port_no_secondary) >DEFINE CHANNEL(chl_name_secondary) CHLTYPE(SVRCONN) TRPTYPE(TCP) >DEFINE CHANNEL(chl_name_secondary) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME('host_IP(port_no_secondary)’) QMNAME(qmgr_secondary)
where:- qmgr_secondary is the name of the secondary queue manager on the remote system. It is the same as the primary queue manager name.
- listener_secondary is the name of the listener for the secondary queue manager.
- port_no_secondary is the port number that is used by the listener.
- chl_name_secondary is the name that you want to assign to both the server channel and the client channel.
- host_IP is the IP address of the system where the secondary queue manager is installed.
- Finally, run the following command:
>END >EXIT
- Run the following commands for the primary queue manager:
- Create the client channel definition table file (AMQCLCHL.TAB) for the
WebSphere MQ agent instance on the 1st MQ
appliance.
- Use the runmqsc command or the runmqsc -n command to
create the AMQCLCHL.TAB file for the queue manager on the 1st MQ
appliance:
runmqsc -n >DEFINE CHANNEL(chl_name_primary) CHLTYPE(CLNTCONN) TRPTYPE(TCP)+ >CONNAME('host_IP_appliance1(port_no_primary)') QMNAME(qmgr_name)
where host_IP_appliance1 is the IP address of the 1st MQ appliance; chl_name_primary and port_no_primary are the same as the ones that you defined in Step 4.
Tip: By default, the AMQCLCHL.TAB file is created in the var/mqm/qmgrs/qmgr_name/@ipcc directory. - Move the primary AMQCLCHL.TAB file to the agent_install_dir/arch/mq/bin directory on the system where the WebSphere MQ agent is installed for the primary queue manager.
- Use the runmqsc command or the runmqsc -n command to
create the AMQCLCHL.TAB file for the queue manager on the 1st MQ
appliance:
- Create the client channel definition table file (AMQCLCHL.TAB) for the
WebSphere MQ agent instance on the 2nd MQ
appliance.
- Use the runmqsc command or the runmqsc -n command to
create the AMQCLCHL.TAB file for the queue manager on the 2nd MQ
appliance:
runmqsc -n >DEFINE CHANNEL(chl_name_secondary) CHLTYPE(CLNTCONN) TRPTYPE(TCP)+ >CONNAME('host_IP_appliance2(port_no_secondary)') QMNAME(qmgr_name)
where host_IP_appliance2 is the IP address of the 2nd MQ appliance; chl_name_secondary and port_no_secondary are the same as the ones that you defined in Step 4.
- Move the secondary AMQCLCHL.TAB file to the agent_install_dir/arch/mq/bin directory on the system where the WebSphere MQ agent is installed for the secondary queue manager.
- Use the runmqsc command or the runmqsc -n command to
create the AMQCLCHL.TAB file for the queue manager on the 2nd MQ
appliance:
- 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.
- Start all listeners for both remotely monitored queue manager and start all the WebSphere MQ agent instances.
Perform the following steps to use the WebSphere MQ agent installed on Windows systems for remote monitoring:
- Install the WebSphere MQ agent on the Windows system.
- Create two instances of the WebSphere MQ agent for each HA queue manager.
- Modify the configuration file of each agent instance to enable remote
monitoring by replacing the content with the following lines:
where: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)
- qmgr_name is the name of the HA 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 HA queue manager is running.
Tip: The configuration file name and path is install_dir\TMAITM6_x64\mq_<instance_name>.cfg. - Create a pair of client and server channels between the primary queue manager and the WebSphere MQ agent, between the secondary queue manager
and the WebSphere MQ agent on the remote system
where the primary queue manager is installed. Remember: You must run all the following commands before you proceed to the next step.
- Run the following commands for the primary queue manager:
M2000# mqcli M2000(mqcli)#runmqsc qmgr_primary >DEFINE LISTENER(listener_primary) TRPTYPE(TCP) PORT(port_no_primary) >DEFINE CHANNEL(chl_name_primary) CHLTYPE(SVRCONN) TRPTYPE(TCP) >DEFINE CHANNEL(chl_name_primary) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME('host_IP(port_no_primary)') QMNAME(qmgr_primary)
where:- qmgr_primary is the name of the primary queue manager.
- listener_primary is the name of the listener for the primary queue manager.
- port_no_primary is the port number that is used by the listener.
- chl_name_primary is the name that you want to assign to both the server channel and the client channel.
- host_IP is the IP address of the system where the primary queue manager is installed.
- Run the following commands for the secondary queue manager on the primary queue manager. This is
to add the connection information for the secondary queue manager to the client channel definition
table file of the primary queue manager. The same agent can then connect to the secondary queue
manager automatically when the primary queue manager fails over.
>DEFINE LISTENER(listener_secondary) TRPTYPE(TCP) PORT(port_no_secondary) >DEFINE CHANNEL(chl_name_secondary) CHLTYPE(SVRCONN) TRPTYPE(TCP) >DEFINE CHANNEL(chl_name_secondary) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME('host_IP(port_no_secondary)’) QMNAME(qmgr_secondary)
where:- qmgr_secondary is the name of the secondary queue manager on the remote system. It is the same as the primary queue manager name.
- listener_secondary is the name of the listener for the secondary queue manager.
- port_no_secondary is the port number that is used by the listener.
- chl_name_secondary is the name that you want to assign to both the server channel and the client channel.
- host_IP is the IP address of the system where the secondary queue manager is installed.
- Finally, run the following command:
>END >EXIT
- Run the following commands for the primary queue manager:
- Create the client channel definition table file (AMQCLCHL.TAB) for each
WebSphere MQ agent instance.
- Use the runmqsc command or the runmqsc -n command to
create the AMQCLCHL.TAB file for the queue manager on the 1st MQ
appliance:
runmqsc -n >DEFINE CHANNEL(chl_name_primary) CHLTYPE(CLNTCONN) TRPTYPE(TCP)+ >CONNAME('host_IP_appliance1(port_no_primary)') QMNAME(qmgr_name)
where host_IP_appliance1 is the IP address of the 1st MQ appliance; chl_name_primary and port_no_primary are the same as the ones that you defined in Step 4.
- Create the AMQCLCHL.TAB file for the queue manager on the 2nd MQ
appliance:
runmqsc -n >DEFINE CHANNEL(chl_name_secondary) CHLTYPE(CLNTCONN) TRPTYPE(TCP)+ >CONNAME('host_IP_appliance2(port_no_secondary)') QMNAME(qmgr_name)
where host_IP_appliance2 is the IP address of the 2nd MQ appliance; chl_name_secondary and port_no_secondary are the same as the ones that you defined in Step 4.
- Use the runmqsc command or the runmqsc -n command to
create the AMQCLCHL.TAB file for the queue manager on the 1st MQ
appliance:
- Rename the two AMQCLCHL.TAB file to different names, for example, NODE1.TAB and NODE2.TAB. Transfer them to the directory of install_dir\TMAITM6_x64, where install_dir is the installation directory of the WebSphere MQ agent.
- Modify the kmqcma_instance_name.ini file to set the MQCHLTAB value to the client channel definition table file for each agent instance. For example, set MQCHLTAB=NODE1.TAB in the kmqcma_instance1.ini file and set MQCHLTAB=NODE2.TAB in the kmqcma_instance2.ini file.
- Open the Windows Register Editor, locate the following
key of MQCHLTAB and change it from AMQCLCHL.TAB to the
appropriate client channel definition table file name for each agent instance.
- HKEY_LOCAL_MACHINE\SOFTWARE\Candle\KMQ\Ver730\instance1\Environment
MQCHLTAB=NODE1.TAB
- HKEY_LOCAL_MACHINE\SOFTWARE\Candle\KMQ\Ver730\instance2\Environment
MQCHLTAB=NODE2.TAB
- HKEY_LOCAL_MACHINE\SOFTWARE\Candle\KMQ\Ver730\instance1\Environment
- Make sure that channel authentication settings are configured properly for the user ID that is used to set up connection between agent instance and the queue manager.
- Start all listeners for both remotely monitored queue manager and start all the WebSphere MQ agent instances.