Configure WebSphere MQ

Websphere MQ Configuration

This section covers the integration steps to provide an alarm integration from Websphere MQ to Moogsoft AIOps. The integration has following steps:

  • Adding the jars com.ibm.mq.jmqi.jar and com.ibm.mqjms.jar to Moogsoft AIOps.

  • Installing the IBM JDK on the Moogsoft AIOps server.

  • Creating a queue or Topic in WebSphere MQ.

After completing the above 3 steps the wmq_config file in Moogsoft AIOps is configured to receive events from Websphere MQ.

Add the Websphere MQ Jars to Moogsoft AIOps

The com.ibm.mq.jmqi.jar and com.ibm.mqjms.jar has to be added to Moogsoft AIOps to establish a connection with Websphere MQ. Copy the com.ibm.mq.jmqi.jar and com.ibm.mqjms.jar to the $MOOGSOFT_HOME/lib/cots/nonDist directory in Moogsoft AIOps.

Note

The com.ibm.mq.jmqi.jar and com.ibm.mqjms.jar for Linux can be found in the directory /opt/mqm/java/lib

Note

The com.ibm.mq.jmqi.jar and com.ibm.mqjms.jar for windows can be found in the directory C:\Program Files\IBM\WebSphere MQ\java\lib.

Install the IBM JDK on the Moogsoft AIOps Server

Install the IBM JDK on the Moogsoft AIOps Server and set the java class path in the wmq_lam to the installed IBM JDK class path. To set the classpath proceed as follows:

  1. Enter the command cd $MOOGSOFT_HOME/bin/ to navigate to the bin directory of Moogsoft AIOps.

  2. Open the wmq_lam using any editor e.g. vi or vim.

  3. Enter the path /opt/ibm/java-x86_64-80/jre/bin/java in the java_vm field of the wmq_lam binary file.

    Note

    The path given here should be the path where the IBM JDK is installed.

Create a queue and Topic in WebSphere MQ on Linux

  1. Add a user E.g. user2 to the group mqm by executing the following command:

    useradd -G mqm user2
  2. Create a queue manager E.g. qm1 by executing the following command:

    ./crtmqm qm1
  3. Check the status of all the queue managers by executing the following command:

    ./dspmq
  4. Start the queue manager E.g. qm1 by executing the following command:

    ./strmqm qm1
  5. Create a server connection channel in the created queue manager qm1 by executing the following command.

    ./runmqsc qm1
    DEFINE CHANNEL('CHAN2') CHLTYPE(SVRCONN) TRPTYPE(TCP) +
    DESCR('Server-connection to Client_1')
    
  6. Disable the channel authentication for a non SSL connection execute the following command:

    ./runmqsc qm1
    ALTER QMGR CHLAUTH(DISABLED)
    
  7. Create a client connection channel in the created queue manager qm1 by executing the following commad:

    DEFINE CHANNEL('CHAN2') CHLTYPE(CLNTCONN) TRPTYPE(TCP) +
    CONNAME(9.20.4.26) QMNAME(QM1) DESCR('Client-connection to Server_1')
    
  8. Create a queue E.g. queue1 in the queue manager qm1 by executing the following command:

    ./runmqsc qm1
    DEFINE QLOCAL('queue1')
  9. Create a topic E.g. topic11 in the queue manager qm1 by executing the following command:

    ./runmqsc qm1
    DEFINE TOPIC(‘topic1’)
  10. Execute the command 'end' to exit the CLI.

Create a queue and Topic in WebSphere MQ on Windows

WebSphere MQ is an IBM standard for program-to-program messaging across multiple platforms. It sends messages across networks of diverse components. The application connects to WebSphere MQ to send or receive a message. Configuring WebSphere MQ to function with LAM has the following steps:

Note

The following steps are only for Windows

  1. Creating a queue manager.

  2. Creating a queue in WebSphere MQ.

  3. Creating a topic in Websphere MQ.

  4. Creating a server connection channel.

  5. Creating a client connection channel.

Create a Queue Manager

A queue manager manages the resources associated with it, in particular the queues and topics that it owns. To add a queue manager in Websphere MQ, proceed as follows:

Note

The following steps are for WebSphere MQ installed on a windows system.

  1. Click on the Windows Start button and navigate to All Programs > IBM WebSphere MQ, then click on WebSphere MQ Explorer (Installation1). The WebSphere MQ Explorer (Installation1) application opens.

  2. Right click on Queue Managers, then navigate to New in the context menu and select Queue Manager.

  3. Go to the Create Queue Manager dialog box, Enter basic values view, and enter the name of the queue manager in the field Queue manager name and click Next. E.g. Queue_Manager1

  4. In the Enter data and log values view of the Create Queue Manager dialog box, click Next.

  5. In the Enter configuration options view of the Create Queue Manager dialog box, select the check box Create server-connection channel and click Next.

  6. In the Enter listener options view of the Create Queue Manager dialog box, enter the port required for listening in the Listen on port no. and click Next. The port which is not used anywhere can only be entered here. By default the port no. 1414 is assigned here and if it is used by any other queue manager, then enter any other port. E.g. 1417.

  7. In the Enter MQ Explorer options of the Create Queue Manager dialog box, click on Finish.

The queue manager is created.

Create a Queue in WebSphereMQ
  1. Expand the queue manager created in the above procedure and select Queues.

  2. Right click on Queues, then navigate to New in the context menu and select Local Queue.

  3. Enter the queue name in the Name field of the New Local queue dialog box E.g. Queue1 and click on Finish.

The queue is created.

Create a Topic in WebSphereMQ
  1. Expand the queue manager created in the above procedure and select Topics.

  2. Right click on Topics, then navigate to New in the context menu and select Topic.

  3. Enter the topic name in the Name field of the New Topic dialog box E.g. Topic1 and click on Next.

  4. Enter the topic string in the Topic String field of the Change Properties view of the New Topic dialog box E.g. Topic1, then click on Finish.

The topic is created.

Create a Server Connection Channel
  1. Expand the queue manager created in the above procedure and select Channels.

  2. Right click on Channels, then navigate to New in the context menu and select Server-connection Channel.

  3. Enter the channel name in the Name field of the New Server-connection Channel dialog box E.g. Serverchannel1

  4. Click on Select, then select SYSTEM.ADMIN.SVRCONN in the Select the Like Object dialog box and click on OK.

  5. Click on Next. TheChange properties view of the New Server-connection Channel dialog box opens.

  6. Select MCA in the Change properties view of the New Server-connection Channel dialog box.

  7. Enter the user id for the connection in the MCA User ID field and click on Finish.

The server connection channel is created.

Create a Client Connection Channel
  1. Expand Channels of queue manager created in the above procedure and select Client Connections.

  2. Right click on Client Connections, then navigate to New in the context menu and select Client-connection Channel.

  3. Enter the client connection channel name in the Name field of the New Client-connection Channel and click Next. E.g.Serverchannel1

    Note

    The client connection channel name should be the same as the server connection channel name

  4. Enter the queue manger name in the Queue Manager name field E.g. QueueManger1, then enter localhost in the Connection name field of the Change Properties view and click Finish.

The client connection channel is created.