Configure WebSphere MQ
Websphere MQ Configuration
This section covers the integration steps to provide an alarm integration from Websphere MQ to Moogsoft Enterprise. The integration has following steps:
Adding the jars com.ibm.mq.jmqi.jar and com.ibm.mqjms.jar to Moogsoft Enterprise.
Installing the IBM JDK on the Moogsoft Enterprise server.
Creating a queue or Topic in WebSphere MQ.
After completing the above 3 steps the wmq_config file in Moogsoft Enterprise is configured to receive events from Websphere MQ.
Add the Websphere MQ Jars to Moogsoft Enterprise
The com.ibm.mq.jmqi.jar and com.ibm.mqjms.jar has to be added to Moogsoft Enterprise 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 Enterprise.
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 Enterprise Server
Install the IBM JDK on the Moogsoft Enterprise 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:
Enter the command cd $MOOGSOFT_HOME/bin/ to navigate to the bin directory of Moogsoft Enterprise.
Open the wmq_lam using any editor e.g. vi or vim.
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
Add a user E.g. user2 to the group mqm by executing the following command:
useradd -G mqm user2
Create a queue manager E.g. qm1 by executing the following command:
./crtmqm qm1
Check the status of all the queue managers by executing the following command:
./dspmq
Start the queue manager E.g. qm1 by executing the following command:
./strmqm qm1
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')
Disable the channel authentication for a non SSL connection execute the following command:
./runmqsc qm1 ALTER QMGR CHLAUTH(DISABLED)
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')
Create a queue E.g. queue1 in the queue manager qm1 by executing the following command:
./runmqsc qm1 DEFINE QLOCAL('queue1')
Create a topic E.g. topic11 in the queue manager qm1 by executing the following command:
./runmqsc qm1 DEFINE TOPIC(‘topic1’)
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
Creating a queue manager.
Creating a queue in WebSphere MQ.
Creating a topic in Websphere MQ.
Creating a server connection channel.
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.
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.
Right click on Queue Managers, then navigate to New in the context menu and select Queue Manager.
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
In the Enter data and log values view of the Create Queue Manager dialog box, click Next.
In the Enter configuration options view of the Create Queue Manager dialog box, select the check box Create server-connection channel and click Next.
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.
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
Expand the queue manager created in the above procedure and select Queues.
Right click on Queues, then navigate to New in the context menu and select Local Queue.
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
Expand the queue manager created in the above procedure and select Topics.
Right click on Topics, then navigate to New in the context menu and select Topic.
Enter the topic name in the Name field of the New Topic dialog box E.g. Topic1 and click on Next.
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
Expand the queue manager created in the above procedure and select Channels.
Right click on Channels, then navigate to New in the context menu and select Server-connection Channel.
Enter the channel name in the Name field of the New Server-connection Channel dialog box E.g. Serverchannel1
Click on Select, then select SYSTEM.ADMIN.SVRCONN in the Select the Like Object dialog box and click on OK.
Click on Next. TheChange properties view of the New Server-connection Channel dialog box opens.
Select MCA in the Change properties view of the New Server-connection Channel dialog box.
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
Expand Channels of queue manager created in the above procedure and select Client Connections.
Right click on Client Connections, then navigate to New in the context menu and select Client-connection Channel.
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
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.