home / infca / mq / mq_admin (navigation links) El cuerpo, en lances de amor, es parte indispensable del alma.

MQ Explorer | MQ LOCALE | runmqsc | Qmgr | SaveQmgr DAILY ! | Event Mon Exercicis | Links | End

MQ Admin


qm.ini

Amunt! Top Amunt!
MQ Explorer

Homepage.

MQ Explorer is included with an MQ server installation and is also available for download as SupportPac MS0T.

MQ V 5 fa servir PCF ; MQ 6 uses Eclipse : Java.

Start it from Java : strmqcfg (dedicado a mi buen amigo Francisco)

El requeriment fa servir SYSTEM.ADMIN.COMMAND.QUEUE, on esta escoltant el command server. La resposta fa servir cues dinàmiques.

It will use SYSTEM.ADMIN.SVRCONN for any remote queue managers. It will use a bindings connection for any local queue managers, unless you explicitly add them as remote queue managers.

Eclipse Workbench

Enable Eclipse workbench : Window- Preferences - Explorer - Startup in an Eclipse workbench
url ; again.

Wish-List

M'agradaria tenir a la dreta :

Standalone installation
Required definitions for administration

Ensure that you have satisfied the following requirements before trying to use the MQ Explorer.

  1. A command server is running on every remotely administered queue manager.
  2. A suitable TCP/IP listener object must be running on every remote queue manager. This can be the WebSphere MQ listener or, on UNIX systems, the inetd daemon.
  3. A server-connection channel, by default named SYSTEM.ADMIN.SVRCONN, exists on all remote queue managers. You can create the channel using the following MQSC command:
    DEFINE CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN) MCAUSER('mqexplor')
  4. The system queue, SYSTEM.MQEXPLORER.REPLY.MODEL, "TYPE(QMODEL)" must exist.

url

Startup
<path_instalacion_MQ>\bin\strmqcfg.exe -d

The syntax of this command follows:

>>-strmqcfg--+------+--+------+---------------------->< '- -c -' '- -i -'

Optional parameters

-c
-clean is passed to Eclipse. This causes Eclipse to delete any cached data used by the Eclipse runtime.

-i
-init is passed to Eclipse. This causes Eclipse to discard configuration information used by the Eclipse runtime.

url

Sequence by JeffLowrey to fix local QM only accessible as remote ("-i", then "-c" - "i" does not start explorer, but cleans cache)

How does it access a Queue Manager ?

It will use SYSTEM.ADMIN.SVRCONN for any remote queue managers.

It will use a bindings connection for any local queue managers, unless you explicitly add them as remote queue managers.

Configuration file

Remote queue managers are stored in XML file :

%APPDATA%\IBM\MQ Explorer\.metadata\.plugins\com.ibm.mq.explorer.ui\WMQ_Handles.xml

A ZIP file can be exported using : select upper level "IBM WS MQ", right click and "Export MQ Explorer values..."

Reset

Delete the .metadata directory at

C:\Documents and Setting\<userid>\Application Data\IBM\MQ Explorer

Mind Application Data directory is HIDDEN !

Customizing

url

Problems

Local QM showed Status as "Disconnected", and no queue neither channels were displayed :

Solution : missing a PATH entry to "\Program Files\IBM\WebSphere MQ\java\lib". Ensure "mqjbnd05 loaded:" comes up as YES in WebSphere MQ - Properties \ Configuration information \

LOCALE

The explorer is a fully NLS'd product, so all languages are provided regardless of where you download the trial from. If your local machine is set to have french as its main language then the explorer will run in french.
As for making it run in another language without changing your whole machines locale ... you will need to find the two scripts:

runmqcfg.cmd runmqcfg_rcp.cmd

which by default are installed in:

C:\Program Files\IBM\WebSphere MQ\bin

You only need to edit the one that is used (_rcp for rich client mode) but probably safest to edit both of them. In each file, find the line:

set AMQ_EXPLORER="%AMQECLIPSE%\eclipse"

and after that insert the line:

set AMQ_EXPLORER=%AMQ_EXPLORER% -nl en_US

Save the files and then launch the explorer using strmqcfg or the program icon as usual.

If for any reason you wish to use a different locale simply replace en_US with the appropriate locale (provided the explorer is translated into that language) and it will launch in that language.

The locales are simply standard java locale notation; a list of valid java locale's can be found here for those wishing to experiment: URL

Comparing MQexplorer to RUNMQSC

url

RUNMQSC can NOT do : crtmqm, dltmqm, strmqm, endmqm. Neither dspmqaut, dmpmqaut, setmqaut.

MQexplorer can NOT do : RESET CLUSTER, START CHINIT.

Configuration and Display Extension Plug-ins [MS0P]

MS0P = MQ Explorer - Configuration and Display Extension Plug-ins

Explorer extension using Eclipse plug-ins [MH01, gone at v7]

Code here : "T42:\MQ\Explorer_Plugins".

How to install MH01 :

  1. Click on 'Help' on the menu bar
  2. Select 'Software Updates' and click on 'Find and install...'
  3. Select 'Search for new features to install' and click 'Next'
  4. Click on 'New Local Site...' and browse to the location of the unzipped SupportPac zip file contents.
  5. Tick the box next to the new WMQ Healthcheck entry in the site list, and click 'Next'
  6. In the displayed list of available features to install, choose the 'WebSphere MQ Explorer Healthcheck' entry and click 'Next'

Using WebSphere MQ Explorer as a read-only viewer

Security concerns when using MQ Explorer for remote admin

Another MQ Eclipse Explorer

MisterQ, light-weight MQ explorer tool, plugin for the Eclipse platform.


Try to inquire a queue depth :


Amunt! Top Amunt!
RUNMQSC
runmqsc [-e] [-v] [-w WaitTime] [-x] [QmgrName] -e prevents source text for commands from being copied into a report. -v specifies verification mode (available only locally). -w specifies indirect mode. [2] Required channel and queues must exist : XMITQ = target.queue.manager [1] source.to.target channel [1] SYSTEM.ADMIN.COMMAND.QUEUE (target.queue.manager) [1] XMITQ = source.queue.manager [1] target.to.source channel [1] SYSTEM.MQSC.REPLY.QUEUE (source.queue.manager) [1] -x target QM is running under MVS/ESA (indirect mode) [1] page 71, mq v 6.0 system admin guide [2] conecta con el gestor por defecto

You can invoke the runmqsc command in 3 modes :

The object source.queue.manager is the source queue manager from which you can issue MQSC commands and to which the results of these commands (operator messages) are returned. The object target.queue.manager is the name of the target queue manager, which processes the commands and generates any operator messages.

If you are using runmqsc with the -w option, source.queue.manager must be the default queue manager.

runmqsc -w 30 target.queue.manager

RUNMQSC is an utility that lets you view the queue manager objects and their attributes. It launches an interactive (command-line interface) administration session.

If input is from Script file, the syntax is : RUNMQSC QmgrName < InputFile > OutputFile

Complete details in MQSC Command Reference, SC34-6055-02

ALTER CLEAR DEFINE DISPLAY END PING REFRESH CLUSTER SECURITY RESET CHANNEL [1] { AMQ 9526 - sequence } CLUSTER QMGR RESOLVE CHANNEL(ch-name) ACTION( COMMIT | BACKOUT ) - SDR/SVR/CLUSSDR only RESUME START STOP SUSPEND

[1] RESET CHANNEL
If the command is issued to a sender or server channel, then in addition to resetting the value at the end at which the command is issued, the value at the other (receiver or requester) end is also reset to the same value the next time this channel is initiated (and resynchronized if necessary). If the command is issued to a receiver, requester, or cluster-receiver channel, the value at the other end is not reset as well; this must be done separately if necessary.

MQ v 6.0 MQSC command reference, SC34-6597-00, csqzaj10.pdf, pagina 397 [417/501]

[2] RESOLVE CHANNEL
This command is used when the other end of a link fails during the confirmation period, and for some reason it is not possible to reestablish the connection. In this situation the sending end remains in doubt, as to whether or not the messages were received. Any outstanding units of work need to be resolved by being backed out or committed. Care must be exercised in the use of this command. If the resolution specified is not the same as the resolution at the receiving end, messages can be lost or duplicated.

Page 409, MQ v 6.0, "MQSC Command Reference", SC34-6597-00


Amunt! Top Amunt!
DISPLAY QMGR ALL
display qmgr all 1 : display qmgr all AMQ8408: Display Queue Manager details. QMNAME(FEM49P01) ACCTCONO(DISABLED) ACCTINT(1800) ACCTMQI(OFF) ACCTQ(OFF) ACTIVREC(MSG) ALTDATE(2006-08-02) ALTTIME(12.09.06) AUTHOREV(DISABLED) CCSID(1051) CHAD(DISABLED) CHADEV(DISABLED) CHADEXIT( ) CHLEV(DISABLED) CLWLDATA( ) CLWLEXIT( ) CLWLLEN(100) CLWLMRUC(999999999) CLWLUSEQ(LOCAL) CMDLEVEL(600) COMMANDQ(SYSTEM.ADMIN.COMMAND.QUEUE) CRDATE(2006-08-02) CRTIME(12.09.06) DEADQ(DLQ) DEFXMITQ( ) DESCR( ) DISTL(YES) INHIBTEV(DISABLED) IPADDRV(IPV4) LOCALEV(DISABLED) LOGGEREV(DISABLED) MAXHANDS(256) MAXMSGL(4194304) MAXPRTY(9) MAXUMSGS(10000) MONACLS(QMGR) MONCHL(OFF) MONQ(OFF) PERFMEV(DISABLED) PLATFORM(UNIX) QMID(FEM49P01_2006-08-02_12.09.06) REMOTEEV(DISABLED) REPOS( ) REPOSNL( ) ROUTEREC(MSG) SCHINIT(QMGR) SCMDSERV(QMGR) SSLCRLNL( ) SSLCRYP( ) SSLEV(DISABLED) SSLFIPS(NO) SSLKEYR(/var/mqm/qmgrs/QMN1/ssl/key) SSLRKEYC(0) STATACLS(QMGR) STATCHL(OFF) STATINT(1800) STATMQI(OFF) STATQ(OFF) STRSTPEV(ENABLED) SYNCPT TRIGINT(999999999)

SaveQmgr and change control
[wbrkadm@dmqb261]:/MQHA/cfg/SaveRestoreMQ/fitxers> saveqmgrc.aix -h Usage is: saveqmgrc.aix [options], where [options] are one or more of the following optional switches -h | -? : gives help (this) -v version : determines which version of MQSC to generate and can be '2','5','51','52','53' or '6' The default is to generate mqsc at the version of the connected queue manager Note: see read.me for more information on this flag -m lqmgr : is the name of the local qmgr to connect (MQCONN) -r rqmgr : is the name of the remote qmgr (XMITQ name) -f [file] : allows the output file to be named, if -f is not specified, the output file defaults to SAVEQMGR.TST if -f is specified without a filename, it is named "qmgrname".MQS -o : specifies to replace (overwrite) the output file if the -o flag is not specified, then the default is to append if the file exists (on iSeries, *REPLACE,*APPEND must be specified after the -o flag) -F [file] : behaves the same as -f except no header line is created in the output file (and CURDEPTH, ALTDATE and ALTTIME are not reported) -c : directs output to STDOUT and overrides use of -f flag -s : suppress creation of objects that begin with "SYSTEM*", system objects. -R : create RESET CHANNEL commands for non-client/svrconn channels -p : Create 'local queue' definitions from PERMDYN queues. -i : Ignore 'pcf' error codes 'damaged object' 'unknown object'. Sets RetCode to WARNING if this error encountered. -q : Quiet mode, do not issue warning about unknown PCF attributes -1 : generate entire DEFINE command on one line (which does NOT include ALTDATE etc) -2 : on a 2nd line, generate the DEFINE as a comment (which DOES include ALTDATE etc) If either the -a or -x switch is used, then MQCONNX will be used for the client connection -a host : is the address of the host for a client connection (default is "localhost") -x channel : is the SVRCONN name for a client connection (default is SYSTEM.DEF.SVRCONN) -C cipher spec : indicates to use an SSL cipher spec for this client connection -k key repository : name of key respository directory if using SSL for client connection -eX channel exit : X = 'y' for security, 's' for send, 'r' for receive -dX "channel exit data": X = 'y' for security, 's' for send, 'r' for receive. SAVEQMGR V6.0.2

Mind SYSTEM.DEF.SVRCONN has to have mcauser=mqm (temporarily). Otherwise

MQCONN failed for MQPRD01, CC=2 RC=2035

We recently implemented MQDocument at my shop. Every morning when my MS03 batch job runs to back up every QM in the system, it calls out to MQDocument to compare today's MS03 for each QM to yesterday's MS03s. It then produces a little report that gets emailed to me listing what if anything got added, deleted or changed on each QM. Plus it keeps a rolling 90 days of these reports. Gotta say that was the best money spent. Careful as people are, stuff happens. Scanning that report every morning has allowed me to catch some things that would eventually become big and hairy problems.


Approaches to monitoring MQ

There are various approaches to monitoring WebSphere MQ. Each approach is applied and used in a different way, and each approach returns monitoring information in a different form. Depending on how you intend to monitor your MQ system you will use one, or a combination of, the following approaches:

MQ monit

Event queues

You can define event queues either as local queues, alias queues, or as local definitions of remote queues. If you define all your event queues as local definitions of the same remote queue on one queue manager, you can centralize your monitoring activities.

Event queues


Event Monitoring

When an event occurs, the queue manager puts an event message on the appropriate event queue, if defined.
The event message contains information about the event.

Event Monitoring, SC34-6069-02.

Amunt! Top Amunt!
Event Types

MQ instrumentation events come in the following types :

Monitoring, SC34-6593, page 33/411.

Queue manager events [SYSTEM.ADMIN.QMGR.EVENT]
Channel and Bridge events [SYSTEM.ADMIN.CHANNEL.EVENT]
Queues used for events
 This event queue:            Contains messages from:       As
---------------------------- -------------------------     ----------------
 SYSTEM.ADMIN.QMGR.EVENT      Queue manager events          Not Authorized
 SYSTEM.ADMIN.CHANNEL.EVENT   Channel events                Channel stopped
 SYSTEM.ADMIN.PERFM.EVENT     Performance events            Queue full
 SYSTEM.ADMIN.CONFIG.EVENT    Configuration events          Change object
 SYSTEM.ADMIN.LOGGER.EVENT    Logger events                 New log extent

Type of Event How to Enable it Queue to be used
qmgr + authority events ALTER QMGR AUTHOREV (ENABLED) SYSTEM.ADMIN.QMGR.EVENT
channel + autodefinition events ALTER QMGR CHADEV (ENABLED) SYSTEM.ADMIN.CHANNEL.EVENT
channel + channel events ALTER QMGR CHLEV (EXCEPTION) SYSTEM.ADMIN.CHANNEL.EVENT
qmgr + inhibit events ALTER QMGR INHIBTEV (ENABLED) SYSTEM.ADMIN.QMGR.EVENT
qmgr + local events ALTER QMGR LOCALEV (ENABLED) SYSTEM.ADMIN.QMGR.EVENT
logger events ALTER QMGR LOGGEREV(ENABLED) SYSTEM.ADMIN.LOGGER.EVENT
performance events ALTER QMGR PERFMEV (ENABLED) SYSTEM.ADMIN.PERFM.EVENT
qmgr + remote events ALTER QMGR REMOTEEV (ENABLED) SYSTEM.ADMIN.QMGR.EVENT
channel + SSL events ALTER QMGR SSLEV (ENABLED) SYSTEM.ADMIN.CHANNEL.EVENT
qmgr + start/stop events ALTER QMGR STRSTPEV (ENABLED) SYSTEM.ADMIN.QMGR.EVENT
configuration events ALTER QMGR CONFIGEV (ENABLED) (zOS only)
command events ALTER QMGR CMDEV (ENABLED) (zOS only)

Monitoring MQ

cmqc.h
#define MQIA_Q_DEPTH_MAX_EVENT 42 x2A #define MQIA_Q_DEPTH_HIGH_EVENT 43 x2B #define MQIA_Q_DEPTH_LOW_EVENT 44 x2C #define MQIA_Q_SERVICE_INTERVAL_EVENT 46 x2E #define MQIA_AUTHORITY_EVENT 47 x2F #define MQIA_INHIBIT_EVENT 48 x30 #define MQIA_LOCAL_EVENT 49 x31 #define MQIA_REMOTE_EVENT 50 x32 #define MQIA_CONFIGURATION_EVENT 51 x33 #define MQIA_START_STOP_EVENT 52 x34 #define MQIA_PERFORMANCE_EVENT 53 x35 #define MQIA_CHANNEL_AUTO_DEF_EVENT 56 x38 #define MQIA_CHANNEL_EVENT 73 x49 #define MQIA_BRIDGE_EVENT 74 x4A #define MQIA_SSL_EVENT 75 x4B #define MQIA_LOGGER_EVENT 94 x5E #define MQIA_COMMAND_EVENT 99 x63
Configuration Monitoring

Configuration events are reported when objects are created, or modified. The event messages for configuration events are put on the SYSTEM.ADMIN.CONFIG.EVENT queue.

Configuration events are available on WebSphere MQ for z/OS only.

Monitoring MQ

How to enable Security Events ?
???

Amunt! Top Amunt!
Q depth monitoring - High Depth Event

Performance Event (Event Tab) Enabled

SYSTEM.ADMIN.PERFM.EVENT

Monitoring, SC34-6593

MQFMT = MQEVENT

MS0P

ALTER QMGR PERFMEV(ENABLED) DEFINE QLOCAL(QL1) ALTER QLOCAL(QL1) + MAXDEPTH(10) + QDPMAXEV(DISABLED) + QDEPTHHI(80) + QDPHIEV(ENABLED) + QDEPTHLO(20) + QDPLOEV(DISABLED)
Enabling Queue Full events

When enabled, a Queue Full event is generated when an application is unable to put a message onto a queue because the queue is full.

To enable Queue Full events on the queue MYQUEUE, use the following MQSC commands:

ALTER QMGR PERFMEV(ENABLED) ALTER QLOCAL('MYQUEUE') QDPMAXEV(ENABLED)

Automatically enabling events :

MQ v 6.0 Monitoring, page 36 [58/411].

Event message reference

Message descriptor (MQMD) in event messages : the message type is MQMT_DATAGRAM, and the message format is MQFMT_EVENT.

Message data in event messages - the event message data is in programmable command format (PCF), as is used in PCF command inquiries and responses. The event message consists of two parts: the event header and the event data.

Event header (MQCFH) - the information in MQCFH specifies:

MQCFH.Type := "Event" ;
MQCFH.Command := MQCMD_Q_MGR_EVENT | MQCMD_PERFM_EVENT | MQCMD_CHANNEL_EVENT | MQCMD_CONFIG_EVENT | MQCMD_COMMAND_EVENT | MQCMD_LOGGER_EVENT
MQCFH.Reason := MQRC_* ;

MQ v 6.0 Monitoring, chapter7 [71/411].

#define MQRC_Q_FULL 2053 #define MQRC_Q_DEPTH_HIGH 2224 #define MQRC_Q_DEPTH_LOW 2225
Let's make it run
T42:\MQ\Eines\EventMonitor> EvMo X1 SYSTEM.ADMIN.PERFM.EVENT Argument (1) = (EvMo). Argument (2) = (X1). Argument (3) = (SYSTEM.ADMIN.PERFM.EVENT). >>> MQ Connect to [X1]. +-+ MQ Connect CC [0], RC [0]. >>> MQ Open on object [SYSTEM.ADMIN.PERFM.EVENT] with options [x'2009']. +-+ MQ Open CC [0], RC [0]. ... wait for event message ... > ...get the event message ... > Tue Apr 28 18:14:03 2009 Unknown Event message, [45]. CompCode(WARNING) It's an unknown reason, [2224]. +++ MQRC_Q_DEPTH_HIGH ... wait for event message ... > ...get the event message ... > Unknown Event message, [45]. CompCode(WARNING) It's an unknown reason, [2053]. +++ MQRC_Q_FULL

Amunt! Top Amunt!
Log d'instalació

If you used the lauchpad to install MQ, check this file in your user Temp folder : MQv6_Install_YYYY-MM-DDTHH-MM-SS.log


Admin exercices

Environment :

. | . . QM1 | QM2 . . | . . QR1 QM2 QM1.QM2 QL2 QT2 . . - - - - ---------- - - - - . . | | | | -> O ) | | | | . . -- -- ---------- -- -- . . [AMQSREQ] | . . QL1 QM2.QM1 QM1 [AMQSECHA] . . - - ---------- - - . . | | ( O <- | | . . -- ---------- -- . . | . . [DLQ] | [DLQ] .

Config & run :

QM1 : DEFINE QL(DLQ) * we always want a dead letter queue DEFINE QL(QM2) USAGE(XMITQ) TRIGGER INITQ(SYSTEM.CHANNEL.INITQ) TRIGDATA(QM1.QM2) * transmit queue DEFINE QL(QL1) * answer queue DEFINE QR(QR1) RQMNAME(QM2) RNAME(QL2) XMITQ(QM2) * remote queue QM2 : DEFINE QL(DLQ) * we always want a dead letter queue DEFINE QL(QM1) USAGE(XMITQ) TRIGGER INITQ(SYSTEM.CHANNEL.INITQ) TRIGDATA(QM2.QM1) * transmit queue DEFINE QL(QL2) TRIGGER INITQ(QT2) PROCESS(RSP) * request recevive queue DEFINE QL(QT2) * trigger message init queue DEFINE PROCESS(RSP) APPLICID('AMQSECH.EXE') * process to start answering program DOS : start RUNMQTRM -m QM2 -q QT2 * trigger monitor AMQSREQ.EXE QR1 QM1 QL1 QL1 QM1 * send request and display response

Amunt! Top Amunt!
Links

Overview

MQ v 6 Monitoring

Cacti.

MS0P = MQ Explorer - Configuration and Display Extension Plug-ins


Ep ! Valid HTML 4.01!   Valid CSS! Escriu-me !
Updated : 02/12/2010.  
Uf !