Configuring the WebSphere MQ agent

You must assign an instance name to the 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 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 the bin 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 WebSphere MQ agent.

About this task

The 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.
Important: If you also installed Monitoring Agent for WebSphere MQ, which is delivered as one component of the ITCAM for Applications product, on the same system as the WebSphere MQ agent, which is delivered in Cloud APM, do not use them to monitor the same queue manager on the system.

Interactive configuration

Procedure

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 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 to be used as the middle qualifier of the managed system 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. The agent name is used as a short identifier to create unique managed system names. To understand when a unique managed system name is required, see Specifying unique managed system names for multiple queue managers.
  4. If you want to monitor a remote queue manager, specify the following configuration parameters. If you want to monitor a local queue manager, press Enter to proceed.
    • Connection Name: The connection name for remote monitoring. The format is IP_address (port_number), for example, 127.0.0.1(1414). If this is the first time you configure the agent instance, you can press Enter to accept the default of null. The appropriate connection name can be automatically discovered.
    • Channel: The name of channel used for remote data collection. If this is the first time you configure the agent instance, you can press Enter to accept the default of null. The SYSTEM.DEF.SVRCONN channel will be used.
    Limitation: Error logs of a remote queue manager cannot be monitored. When the agent is monitoring a remote queue manager, the MQ Errors Details dashboard contains no data.
  5. 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 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.
  6. To start the agent, enter the following command:
    install_dir/bin/mq-agent.sh start instance_name

Silent configuration

Procedure

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 AIXinstall_dir/samples/mq_silent_config.txt
    • Windowsinstall_dir\tmaitm6_x64\samples\mq_silent_config.txt
    where install_dir is the installation directory of WebSphere MQ agent.
  2. Required: For QMNAME, specify the name of the queue manager to be monitored.
  3. Required: For AGTNAME, specify the agent name to be used as the middle qualifier of the managed system 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. The agent name is used as a short identifier to create unique managed system names. To understand when a unique managed system name is required, see Specifying unique managed system names for multiple queue managers.
  4. If you want to monitor a remote queue manager, specify the following configuration parameters:
    • CONNAME: The connection name for remote monitoring. The format is IP_address (port_number), for example, 127.0.0.1(1414).
    • CHANNEL: The name of channel used for remote data collection. If not specified, the SYSTEM.DEF.SVRCONN channel will be used.
    Limitation: Error logs of a remote queue manager cannot be monitored. When the agent is monitoring a remote queue manager, the MQ Errors Details dashboard contains no data.
  5. 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.
  6. Save and close the mq_silent_config.txt file, and then run the following command from the command line:
    • Linux or AIXinstall_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 AIX
      /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"
  7. To start the agent, enter the following command:
    • Linux or AIX
      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 Cloud APM console and use the Applications editor to add the WebSphere MQ agent instance to the Application Performance Dashboard. For instructions on how to start the Cloud APM console, see Starting the Cloud APM console. For information about using the Applications editor, see Managing applications.

What to do next