How Can I Monitor IBM WebSphere MQ Channel?

Background

Customers running IBM WebSphere typically use the WebSphere MQ Explorer on Windows systems to a) define message channels and associated objects; and b) monitor and control message channels

This document reviews how to automate the monitoring of WebSphere MQ Channels using the Argent Guardian

Part One, The Test: Argent Guardian System Command Rule

First, create a text file (display_mq_channel_status.txt, e.g.) with the following contents:

DISPLAY CHSTATUS(FOO)

Where “FOO” is the channel you want to test

The following diagram shows possible channel status values:

IBM WebSphere MQ Channel Status Values

In the Argent Guardian, configure a new System Command Rule such as shown in the screenshot below

The command we’re using is

c:\mq\java\bin\runmqsc < c:\scripts\display_mq_channel_status.txt

Note the Rule Criteria

Sample System Command Rule In The Argent Guardian

Part Two, The Alert: Argent Alert Console System Command Alert

Now that we have configured the Rule to test, we’ll configure a new Argent Alert Console System Command Alert to start the “FOO” channel

First, create a text file (start_mq_channel_FOO.txt, e.g.) with the following contents:

START CHANNEL(FOO)

Where “FOO” is the channel you want to start

Next setup the Alert: Navigate to the Alerts icon, System Command Alerts

Create a new System Command Alert, using the UNC path to point to \\WEBSPHERE_HOST\c$\mq\java\bin\runmqsc using the ‘start_mq_channel_FOO.txt’ file as the argument

Part Three, Putting It All Together

Finally, create a Relator with your new System Command Rule and System Command Alert

Right-click and “Test Relator” to ensure the Rule portion is working properly, then use the “Test Alert” on the Alert Definition to verify that portion is working correctly as well

Once you’re satisfied all is in order, place the Relator into production


Notes:

  • This example assumes IBM WebSphere is installed on the same server as Argent

    In production, however it is more likely to be on a separate machine

    In this case, you can use ‘psexec’ from the SysInternals toolkit to execute the ‘runmqsc’ command remotely

  • This example also assumes a Windows Server installation of IBM WebSphere

    If you’re using UNIX/Linux, then the appropriate combination is of course a UNIX/Linux Rule (Bourne Shell Script) and corresponding UNIX/Linux Action Script for the Alert