Suppressing channel error messages from error logs on Multiplatforms
We can prevent selected messages from being sent to the error logs for a specified time interval, for example if the IBM MQ system produces a large number of information messages that fill the error logs.
About this task
There are two ways of suppressing messages for a given time interval:
- By using SuppressMessage and SuppressInterval in the QMErrorLog stanza in the qm.ini file.
- By using the environment variables MQ_CHANNEL_SUPPRESS_MSGS and MQ_CHANNEL_SUPPRESS_INTERVAL.
Procedure
- To suppress messages for a given time interval by using the QMErrorLog stanza in the qm.ini file, specify the messages that are to be written to the queue manager error log once only during a given time interval with SuppressMessage, and specify the time interval for which the messages are to be suppressed with SuppressInterval. For example, to suppress the messages AMQ9999, AMQ9002, AMQ9209 for 30 seconds, include the following information in the QMErrorLog stanza of the qm.ini file:
SuppressMessage=9001,9002,9202 SuppressInterval=30Alternatively, instead of editing the qm.ini file directly, we can use the Extended Queue Manager properties page in IBM MQ Explorer to exclude and suppress messages.
- To suppress messages for a given time interval by using the environment variables MQ_CHANNEL_SUPPRESS_MSGS and MQ_CHANNEL_SUPPRESS_MSGS, complete the following steps:
- Specify the messages that are to be suppressed with MQ_CHANNEL_SUPPRESS_MSGS. We can include up to 20 channel error message codes in a comma-separated list. There is no comprehensive list of message ids that can be included in the MQ_CHANNEL_SUPPRESS_MSGS environment variable. However, the message ids must be channel messages (that is AMQ9xxx: messages). The following examples are for messages AMQ9999, AMQ9002, AMQ9209.
- On UNIX and Linux :
export MQ_CHANNEL_SUPPRESS_MSGS=9999,9002,9209- On Windows:
set MQ_CHANNEL_SUPPRESS_MSGS=9999,9002,9209
- Specify the time interval for which the messages are to be suppressed with MQ_CHANNEL_SUPPRESS_INTERVAL. The default value is 60,5 which means that after the first five occurrences of a given message in a 60 second interval, any further occurrences of that message are suppressed until the end of that 60 second interval. A value of 0,0 means always suppress. A value of 0,n where n > 0 means never suppress.
Parent topic: Use error logs
Related information
- QMErrorLog stanza on UNIX, Linux, and Windows
- QMErrorLog stanza on IBM i
- Environment variables
- Queue manager properties