MQ 9.1.0 delivers features and enhancements beyond those that were available in IBM MQ Version 9.0.0. In this blog we would like to point out some of the error log enhancements available with MQ 9.1. Some of the error log enhancements available are:
– Message severity with error messages
– UTC time addition in error log messages
– Rename over rollover
– MQ error logs in JSON format

Message severity with error messages
From MQ 9.0.3 onwards environment variable ‘AMQ_DIAGNOSTIC_MSG_SEVERITY’ is available which adds message severity to the message number. When this environment variable is set, the MQ process writing the error log message will append message severity as a single uppercase alphabetic character. The messages are classified into 4 types:
-I(Informational)
Example: AMQ8003I: IBM MQ queue manager ‘QM’ started using V9.1.0.0.
-W(Warning)
Example: AMQ9542W: Queue manager is ending.
-E(Error)
Example: AMQ9999E: Channel ‘CHAN_NEW’ to host ‘127.0.0.1’ ended abnormally.
-S(Severe)
Example: Command server MQGET failed with reason code 2009.
-T(Termination)
Example: AMQ8301T: IBM MQ storage monitor job could not be started.

The error log messages can include CommentInsert(), ArithInsert() sections to provide more information on MQ objects, integer values associated with the error log message.
For example:
12/10/2018 10:46:06 – Process(8552.1) User(MUSR_MQADMIN) Program(amqzxma0.exe)
Host(xyz) Installation(Installation1)
VRMF(9.1.0.0) QMgr(QM)
Time(2018-11-20T05:16:06.418Z)
ArithInsert1(60)
CommentInsert1(QM)
AMQ7229I: 60 log records accessed on queue manager ‘QM’ during the log replay phase.

12/10/2018 22:48:17 – Process(5464.3) User(MUSR_MQADMIN) Program(amqrmppa.exe)
Host(xyz) Installation(Installation2)
VRMF(9.1.0.0) QMgr(QM)
Time(2018-11-09T17:18:17.755Z)
CommentInsert1(CHAN_NAME)
CommentInsert2(5464(12000))
CommentInsert3(127.0.0.1)
AMQ9999E: Channel ‘CHAN_NAME’ to host ‘127.0.0.1’ ended abnormally.

AMQ_DIAGNOSTIC_MSG_SEVERITY is set as a default value in from MQ 9.0.4 level onwards and at MQ 9.1 level. This variable needs to be set to 0 in case we don’t want to append severity to error message.

UTC time addition in error log messages
When IBM MQ processes write a message to an error log, the message time in ISO 8601 format, in Coordinated Universal Time (UTC), is included as a Time( ) attribute. This is particularly useful when comparing error logs between queue managers located internationally.
12/10/2018 22:48:17 – Process(5464.3) User(MUSR_MQADMIN) Program(amqrmppa.exe)
Host(xyz) Installation(Installation2)
VRMF(9.1.0.0) QMgr(QM)
Time(2018-11-09T17:18:17.755Z)

Rename over rollover
Prior to IBM MQ Version 9.1, when AMQERR01.LOG reaches the maximum configured size, AMQERR02.LOG is renamed to be AMQERR03.LOG. Then, the contents of AMQERR01.LOG are copied into AMQERR02.LOG, and AMQERR01.LOG is truncated to empty. This meant that it was possible for certain tools to miss messages that the tool has not processed, before those messages were copied into AMQERR02.LOG.
From IBM MQ Version 9.1, the logic is changed, so that AMQERR01.LOG is renamed to AMQERR02.LOG.

MQ error logs in JSON format
MQ error logs are in human readable format which could be challenging for other applications to process information in the logs. With MQ 9.1 and MQ 9.0.4 continuous delivery release, we can have the error log information in JSON format. This feature can be enabled using environment variable AMQ_ADDITIONAL_JSON_LOG with the value 1. These JSON error logs will be located in same directories as the AMQLOG01/2/3.LOG files and have names AMQLOG01/2/3.json.
Detailed explanation on this is available in the following blog:
https://developer.ibm.com/messaging/2017/12/05/introducing-mq-error-logs-json-format/

The above options explained could help design tools to manage error logs much more efficiently.

Join The Discussion

Your email address will not be published.