Configuring the IBM MQ (formerly WebSphere MQ) agent
You must assign an instance name to the IBM MQ (formerly WebSphere MQ) agent and configure the agent before it can start monitoring your IBM® MQ (WebSphere MQ) environment.
Before you begin
- Make sure that the agent user ID has appropriate permission to access IBM MQ (WebSphere MQ) objects. If you have not done it, follow the instructions in Authorizing the user IDs to run the agent.
- Configure IBM MQ (WebSphere MQ) to enable the required data collection. If you have not done it, see Configuring IBM MQ (WebSphere MQ) for data enablement.
- You must provide the name of queue manager to be monitored by the IBM MQ (formerly WebSphere MQ) agent. Contact the IBM MQ (WebSphere MQ) administrator if you do not know the appropriate queue manager name. Alternatively, issue the
dspmq
command from thebin
directory within the IBM MQ (WebSphere MQ) installation directory to get a list of the queue managers. The returned QMNAME value is what you must provide when you configure the IBM MQ (formerly WebSphere MQ) agent.
About this task
The IBM MQ (formerly WebSphere MQ) agent is a multiple instance agent; you must create the first instance and manually start the agent.
On UNIX or Linux systems, you can choose to configure the agent with or without interactions. On Windows systems, you can configure the agent without interactions only.
- To configure the agent with interaction, run the configuration script and respond to prompts. See Interactive configuration.
- To configure the agent without interaction, edit the silent response file and then run the configuration script. See Silent configuration.
Interactive configuration
To configure the agent by running the script and responding to prompts, complete the following steps:
-
Enter the following command to create an agent instance:
install_dir/bin/mq-agent.sh config instance_name
where install_dir is the agent installation directory; instance_name is the name you want to give to the instance.
-
When prompted for
Queue Manager Name
, specify the name of the queue manager to be monitored. -
When prompted for
Agent Name
, specify the agent name. Do not press Enter to skip specifying this parameter. Remember: This agent name is different from the agent instance name. The agent instance name is used in the agent configuration file name to distinguish the configuration files between agents, for example,hostname_mq_instancename.cfg
. -
When prompted for WebSphere MQ library path, press Enter to accept the default value, which is the 64-bit library path of IBM MQ (WebSphere MQ) automatically discovered by the IBM MQ(formerly WebSphere MQ) agent. If no default value is displayed, you must provide the 64-bit library path of IBM MQ (WebSphere MQ) to proceed. An example of the 64-bit library path is
/opt/mqm8/lib64
for a Linux system. -
To start the agent, enter the following command:
install_dir/bin/mq-agent.sh start instance_name
Silent configuration
To configure the agent by editing the silent response file and running the script without interaction, complete the following steps:
-
Open the
mq_silent_config.txt
file in a text editor.install_dir/samples/mq_silent_config.txt
install_dir\tmaitm6_x64\samples\mq_silent_config.txt
where install_dir is the agent installation directory.
-
Required: For QMNAME, specify the name of the queue manager to be monitored.
- Required: ForAGTNAME, specify an agent name.
Remember: This agent name is different from the agent instance name. The agent instance name is used in the agent configuration file name to distinguish the configuration files between agents, for example, hostname_mq_instancename.cfg
.
- Optional: For WMQLIBPATH, specify the 64-bit library path of IBM MQ (WebSphere MQ). For example,
/opt/mqm8/lib64
. If no value is specified, the path can be automatically discovered during agent configuration. -
Save and close the
mq_silent_config.txt
file, and then run the following command from the command line:install_dir/bin/mq-agent.sh config instance_name path_to_responsefile
install_dir\BIN\mq-agent.bat config instance_name path_to_responsefile
where instance_name is the name of the instance that you configure, and path_to_responsefile is the full path of the silent response file.
Remember: On Windows systems, do not omit the double quotation marks ("") that enclose the path to the silent response file, especially when the path contains special characters.
For example, if the response file is in the default directory, run the following command.
-
/opt/ibm/apm/agent/bin/mq-agent.sh config instance_name /opt/ibm/apm/agent/samples/mq_silent_config.txt
-
C:\IBM\APM\BIN\mq-agent.bat config instance_name "C:\IBM\APM\tmaitm6_x64\samples\mq_silent_config.txt"
-
To start the agent, enter the following command:
-
install_dir/bin/mq-agent.sh start instance_name
-
install_dir\bin\mq-agent.bat start instance_name
-
Results
Now, you can log in to the IBM Cloud Pak console to view monitoring data.