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

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.

Interactive configuration

To configure the agent by running the script and responding to prompts, complete the following steps:

  1. 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.

  2. When prompted for Queue Manager Name, specify the name of the queue manager to be monitored.

  3. 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.

  4. 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.

  5. 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:

  1. Open the mq_silent_config.txt file in a text editor.

    • Linux or UNIXinstall_dir/samples/mq_silent_config.txt
    • Windowsinstall_dir\tmaitm6_x64\samples\mq_silent_config.txt

    where install_dir is the agent installation directory.

  2. Required: For QMNAME, specify the name of the queue manager to be monitored.

  3. 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.

  1. 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.
  2. Save and close the mq_silent_config.txt file, and then run the following command from the command line:

    • Linux or UNIXinstall_dir/bin/mq-agent.sh config instance_name path_to_responsefile
    • Windowsinstall_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.

    • Linux or UNIX

      /opt/ibm/apm/agent/bin/mq-agent.sh config instance_name 
      /opt/ibm/apm/agent/samples/mq_silent_config.txt
      
    • Windows

      C:\IBM\APM\BIN\mq-agent.bat config instance_name 
      "C:\IBM\APM\tmaitm6_x64\samples\mq_silent_config.txt"
      
  3. To start the agent, enter the following command:

    • Linux or UNIX

      install_dir/bin/mq-agent.sh start instance_name
      
    • Windows

      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.