Professional Documents
Culture Documents
WMQ MONITORING
USER GUIDE
IBM WebSphere MQ Monitoring
TABLE OF CONTENTS
WMQ Monitoring............................................................................................................................... 1
User GUIDE .......................................................................................................................................... 1
1 Introduction ................................................................................................................................ 3
2 Features Overview .................................................................................................................... 3
3 High Level Architecture ........................................................................................................... 3
4 Up and Running .......................................................................................................................... 4
4.1 Prerequisite ........................................................................................................................................................... 4
4.2 Installation ............................................................................................................................................................ 5
4.2.1 IBM WAS Liberty Profile .............................................................................................................................................5
4.2.2 Apache Tomcat................................................................................................................................................................6
4.2.3 Oracle GlassFish..............................................................................................................................................................6
4.2.4 Important Notes .............................................................................................................................................................7
4.3 Configuration ........................................................................................................................................................ 7
4.3.1 Customize Settings ........................................................................................................................................................7
4.3.2 Configure Database .......................................................................................................................................................7
4.3.3 Configure Notification ..................................................................................................................................................7
5 Start Monitoring ......................................................................................................................... 8
5.1 Login ........................................................................................................................................................................ 8
5.2 Logout...................................................................................................................................................................... 9
5.3 Change Password ................................................................................................................................................ 9
5.4 Create Connection................................................................................................................................................ 9
5.5 Create Monitor ................................................................................................................................................... 12
5.6 Monitor Management ...................................................................................................................................... 16
5.7 Monitor MQTT Clients ..................................................................................................................................... 16
5.8 Monitor MQTT Pub and Sub .......................................................................................................................... 17
5.9 Create Dashboard ............................................................................................................................................. 20
5.10 Simple Dashboard .......................................................................................................................................... 20
5.11 SenderReceiver Dashboard......................................................................................................................... 24
5.12 Alert View.......................................................................................................................................................... 25
5.13 Export Metadata ............................................................................................................................................. 26
6 Trouble Shooting .................................................................................................................... 26
6.1 Get more verbose information ..................................................................................................................... 27
6.2 Common issues .................................................................................................................................................. 27
7 Useful Links .............................................................................................................................. 27
IBM WebSphere MQ Monitoring
1 Introduction
This guide will cover how to use this lightweight but powerful web based WebSphere MQ
monitoring tool. This monitoring tool targets WebSphere MQ administrators and users who
would like to take advantage of this tool features, such as visualization of WebSphere MQ system
health and custom alert conditions for WebSphere MQ objects, including queues, topics,
channels, listeners, and queue managers.
2 Features Overview
The detailed monitoring features provided by this monitoring tool are as follows:
This is the high level architecture describes how the monitoring application works.
Back-end: Java standard web application
Front-end: Dojo based web UI.
Database: Embedded Apache Derby (default), configurable for other databases, DB2, Oracle,
MySQL etc.
IBM WebSphere MQ Monitoring
4 Up and Running
This monitoring tool is pretty simple and easy to install, since it is implemented as a standard Java
Web Application, it can be easily deployed on any Java application servers, for example WebSphere
Application Server for Liberty Profile and Apache Tomcat etc., and after deployment the monitoring
application is up and running.
4.1 Prerequisite
Make sure you have the following softwares are installed before installing the WebSphere MQ
monitoring tool.
Install Java application server, for example IBM WebSphere Application Server for Liberty
Profile, Apache Tomcat etc. with minimum servlet 3.0 supports. And of course JDK or JRE is
required to be installed with minimum version 1.6.
Install a more modern web browser to access the web UI, Google Chrome is recommended.
Supported browsers: Chrome 26.0.1410.63+, and IE 9, IE 10, Firefox 17 ESR+, it works best
with Google Chrome.
Note: this guide will not cover any information about the installation of WebSphere MQ and Java
EE Application Server. Please refer to IBM Information Center: install WebSphere MQ and refer to
corresponding documentations for other Java EE application servers or servlet engines. Please use
WebSphere Application Server Liberty Profile instead of full profile that may have class loading
issue with this monitoring application.
IBM WebSphere MQ Monitoring
Since this monitoring tool is a java based application, so it will run on any platforms that support
java. E.g. Windows, Linux, Solaris and AIX etc. are all supported, and please do install IBM JDK or
JRE if you are running AIX.
4.2 Installation
Note: If you have already installed the softwares mentioned in the Prerequisite chapter, then
nothing else than the monitoring tool itself need to be installed. Please avoid the spaces in path if
you are using the default database derby.
Deploy the monitoring application as a WAR to Java application server, then the WebSphere MQ
monitoring is up and running. It’s just that simple.
Here we provide detailed instructions for IBM WAS Liberty profile v8.5.5 and Apache Tomcat
7.x.
<server description="wmq-monitoring">
<featureManager>
<feature>localConnector-1.0</feature>
<feature>servlet-3.0</feature>
</featureManager>
<httpEndpoint host="0.0.0.0" httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint"/>
.../apps/wmq-monitoring/index.html
.../apps/wmq-monitoring/login.html
.../apps/wmq-monitoring/...
Install Tomcat
Just unzip it to a directory.
Only GlassFish server V4 are tested and supported, download it from here.
Installation steps are skipped from this guide. After the server is started, please do the following
steps.
Go to GlassFish admin console, go to Configurations > Server Config > JVM Settings,
switch to the JVM Options tab and add the following option:
-Dcom.sun.enterprise.overrideablejavaxpackages=javax.ws.rs,javax.ws.rs.core,javax.ws.rs.ext
Note: if you need some customization, please unpack the WAR and make modifications on the
configuration files and redeploy it. Please follow the following chapter to customize the monitoring
application settings.
IMPORTANT: if you are using default database (derby), please do not deploy multiple wmq-
monitoring war in the application server, no matter same version or not. Because derby requires
ONLY one instance per JVM process, and also the database files cannot be shared if you are running
multiple application server instances but point to the same database directory. The database files
are located at wmq-monitoring/WEB-INF/database. You can just safely to delete this folder to
cleanup the database, and you will get a clean environment after restart.
4.3 Configuration
Monitoring application uses an embedded Apache Derby database by default. Customizations are
allowed, by update the configuration files inside the WAR and redeploy it after changes.
Note: all the configuration steps below are optional, unless you want some customizations.
Note: please edit this configuration file with caution, any invalid inputs may cause the monitoring
application failed to start.
Note: currently supported databases are: Apache derby (default), MySQL, Microsoft SQL Server and
IBM DB2 v7.1 and later. And the database schema is automatically generated on monitoring
application startup, so you do not need to create database schema manually. One thing you will need
to create the database.
It’s highly recommended configure the database to a more powerful RDBMS like MySQL. Because the
embedded Apache Derby database may not working very well when lots of monitors are running with
large data collected.
There two template configuration files, make a copy to configure your own.
WEB-INF/notification/mail/alert - for notifications
IBM WebSphere MQ Monitoring
You can have multiple email notifications by creating multiple properties files.
5 Start Monitoring
This monitoring web application UI is developed based on Dojo Toolkit with awesome look and
feel.
5.1 Login
Authentication is required by this monitoring application, it navigates to the login page if you
have not yet login. Entering the default username and password, mqadmin/mqadmin and click
Login button to login. After login successfully, it will navigates to the home page. You are
encouraged to change the password after first login.
Note: After some time of inactivity, you will be out automatically logout.
IBM WebSphere MQ Monitoring
5.2 Logout
Click the username in the upper right corner of the home page, then click the ‘Sign out’ menu
from the dropdown list and click OK in the confirm dialog.
Figure 3 Logout
Click the username in the upper right corner of the home page, then click the ‘Edit Profile’
menu from the dropdown list.
Enter the current password and new password and click ‘Save’ button to save changes.
Note: Before you can start monitoring, you MUST have a QM connection created, and make sure
your QMGR is running when creating a QM connection, because a queue with a randomly
generated name SYSTEM.MONITOR.XXX will be created in the target QMGR, where XXX is UUID.
Click the New QM Connection button to create a connection that stands for a connection to a
queue manager.
Connection Basics: The connection metadata contains the following information in order to
be able to connect to the remote Queue Manager:
Name: the unique identifier for a connection.
IBM WebSphere MQ Monitoring
Server Host: the host of the Queue Manager you are trying to connect.
Server Port: the listening port of the Queue Manager you are trying to connect.
Server Connection Channel: the server connection channel of the Queue Manager.
MQ User ID: the authorized MCA User ID for the server connection channel.
Description: the basic description of the connection.
Once the connection is created, the queue manager is connected automatically, and the Monitors
tab will be available. And if the MQTT service of the queue manager is installed, the MQTT state
will be “Available”, which means MQTT related objects can be monitored, and the MQTT tab
will be available as well.
You can disconnect from the QMGR manually, if you don’t want monitor anything of the QMGR
for some particular reasons, e.g. reduce the QMGR resources consumption. And you can
reconnect it again later. All the connections will be started automatically when monitoring tool
starts. You can disable this by updating the property connectionAutoStart=false in the
config.properties file. And once it is disabled, you will need to connect each connection
manually from the Web UI. This feature is available since version 0.2.1.
Note: the version information displayed on Queue Manager Tab is not available for MQ V7.0 and
older.
Click the selected connection to open a new tab named after the connection name, then open the
Monitors tab.
The monitor metadata contains the following information in order to be able to monitor a
MQ Object in a more desirable way:
Monitor Name: the unique identifier for a monitor.
Monitor Category: the category of a monitor, only queue, topic, channel, and listener are
supported.
Monitor Type: the detailed MQ object type for a monitor.
Monitor Measurement: the property of a MQ object that is monitored.
View Type: the view that the monitor will be displayed. Line Chart and Area Chart are
supported.
Monitor Object: the MQ Object name that is monitored.
Update Every: the monitor view update frequency.
Sliding Window: the monitor view display time window. It means the latest N minutes,
hours or days. (The monitor statistics is a historical data)
Data Expiration Time: the long the monitor historical data will be kept. It means the aging
data will be removed from database after N minutes, hours or days.
Alert Rule: the rule used to evaluate the health state of the monitored MQ Object and
generate alerts that can be viewed in alert tab.
IBM WebSphere MQ Monitoring
Note: the rule is using LDAP filter alike syntax, the rule syntax:
Examples:
Note: no validation is performed on the property, any invalid property input of the alert rule will
cause the monitoring system failed to evaluate the health state of the monitored MQ object and no
alert message will be generated.
IBM WebSphere MQ Monitoring
Note:
If a connection is deleted, then all the related monitors that are created in that connection will be
deleted as well. There is no way to create monitor for QueueManager from UI at the moment, the UI
for QMGR monitor will be implemented in the later version.
The QueueManager is monitored by default, which means a monitor named qmgr is created
automatically when a connection is created. The default configuration for this monitor can be
changed in the config.properties, and it applies for all connections. The configurations are only
used when creating a new connection, which means any changes made to this configuration later,
will NOT affect the existing connections.
########################################################
# QMGR monitor (a.k.a system monitor)
########################################################
#support: s|m|h|d
qmgrMonitorPollingInterval=5m
#support: m|h|d
qmgrMonitorSlidingWindow=30m
#support: m|h|d
qmgrMonitorDataExpirationTime=2h
You can only update the qmgr monitor configurations through RESTful API after connection is
created at the moment, we will provide the UI for this configuration in later version. Please refer to
the wmq-monitoring-devguide.pdf for details.
JSON data:
{
monitor:{
pollingInterval:"5m",
IBM WebSphere MQ Monitoring
slidingWindow:"20m",
dataExpirationTime:"1h",
healthRule:"error(queueManagerStatus=Unavailable)"
}
}
If create monitor succeeded, all monitors will be shown in the grid of the Monitors tab.
Select a monitor and click the Activate or Deactivate to start or stop monitor.
If MQTT service is configured and started, the MQTT tab will be enabled.
IBM WebSphere MQ Monitoring
Toolbar actions:
Filter: check box. Enable or disable the MQTT filter search.
Filter object: dropdown list. Select a filter object from client id, channel name,
connection name, and channel status.
Filter string: input text box. Input filter string, support wildcard such as ‘*’.
Search: search MQTT client.
Refresh: refresh search results.
Previous page: previous 100 search results.
Next page: next 100 search results.
Monitor: click to open Monitor MQTT tab.
Note:
If filter object or string is changed or filter is enabled or disabled, you should click Search
button to refresh the table below. Refresh button only refresh the last time search result.
Each request can get a maximum of 100 results. And these results will be paged at the bottom
of this tab.
Select a topic from the Topic select dropdown list. The topic monitor will be activated
automatically. The topic measurement is ‘published messages count’, so when sending
message to the selected topic, the monitor chart will be updated accordingly.
IBM WebSphere MQ Monitoring
Note:it is same to monitor the topics by creating a monitor in the monitors tab, except for the
topic string is different, which is exactly the same value as defined in the topic object without
implicitly added /# at the end.
Select a destination, and type text in text box and click Send.
If message is sent successfully, the history record will be displayed in the box.
Note: if you failed to send the message to a topic or to a client, please check the OS that monitoring
application is running has the user account that exists in the target OS that the queue manager is
running.
IBM WebSphere MQ Monitoring
A dashboard is a visual display of a set of monitors. And it can apply a display pattern for a
certain use-case.
Currently, only simple and sender-receiver patterns are supported. With the pattern, the
dashboard can display the monitors in a more appropriate way which better fit the business
scenario.
If the monitor is inactive, click the Activate button in the center or in the top right corner of each
monitor.
The dashboard supports two kind of chart, Line Chart and Area Chart.
The Area Chart is preferred to monitor the measurement such as channelStatus and
listenerStatus.
IBM WebSphere MQ Monitoring
The table in the bottom displays the detailed information of the monitor, and it refreshes every 5
minutes. Click on the scroll button on the right to view more information.
IBM WebSphere MQ Monitoring
The SenderReceiver Dashboard is used for monitoring a topical messaging scenario, with
message sending from transmit queue via sender-receiver channels and finally reach the target
queue, normally would be a local queue.
When monitor a transmit queue, you may also want to know the information of the
sender/receiver channel and the target queue which receives the messages. In this way, the
dashboard provides a more clean view to show what’s going on behind the scene.
Select monitors from the dropdown list and add or remove them to the specific position in the
dashboard as indicated above. For other information it is the same as Simple Dashboard.
The Alert tab will collect all alert messages generated by the active monitors that met the alert
condition that is defined on monitor creation.
The tooltip displays the total of alert messages. It updates every 50 seconds.
IBM WebSphere MQ Monitoring
Alert messages table will be refreshed each time when you accessed.
Alert basics:
Connection: the connection in which the monitor is created.
Monitor: the monitor that generates the alert message.
Level: alert level. WARN or ERROR.
Rule: the monitor alert rule item. A full rule may contain several items.
Result: the alert reason that means the condition is met.
Time: the time the alert message is generated.
And if you have configured email alerts, you will receive the emails once the alert conditions are
satisfied.
You may want to export all the connections metadata and import to another monitoring instance
to avoid lots of recreation work.
Unfortunately, we didn’t provide way to export and import the metadata at the moment. We
suggest you create a script to create the connection and monitors etc. using RESTful API, please
refer to wmq-monitoring-devguide.pdf for more information.
6 Trouble Shooting
This WebSphere MQ monitoring tool is offered as free software, and it is not well tested and
without any support. There are might be some bugs and issues, please use it in production with
caution.
It’s highly recommended configure the database to a more powerful RDBMS like MySQL instead of
the default embedded Apache Derby database, and it may reduce the errors. And please don’t
IBM WebSphere MQ Monitoring
operate on the monitoring database tables manually, which may corrupt the application. If that
happed, just drop all the tables and restart deploys the monitoring application, the monitoring
application will create the schema automatically on start up.
If a connection failed to connect, but your QMGRs do running. It may probably because the
connection to the target QMGRs are lost due to some network issue etc. some time ago, and the
monitoring task failed to connect after certain retries, and finally stopped retrying, even if the
network issue get solved. In such case, you need restart the monitoring application, and it will
resume all the connections. A force retry feature from UI may be provided in future.
In case you are running into problems, please take a look at the error logs that is located in logs
directory of the monitoring application. For any unrecoverable errors, try to refresh the page or
restart the monitoring application. Please file an issue here if you need help.
Once you run into any error, please try to enable log level to DEBUG to get more information by
updating wmq-monitoring/WEB-INF/log4j.xml to:
<category name="com.ibm.mq.monitoring">
<level value="DEBUG" />
</category>
Issue: ERROR XSDB6: Another instance of Derby may have already booted the database
tomcat7\webapps\wmq-monitoring\WEB-INF\database.
Action: make sure you have not deployed multiple wmq-monitoring wars in webapps
directory. Please see explanations here.
7 Useful Links
WebSphere MQ requirements
Hardware and software requirements.
IBM WebSphere MQ Monitoring
WebSphere MQ SupportPacs
Downloadable code, documentation, and performance reports for the WebSphere MQ family of
products.