search cancel

Enabling JMS Health Debug logging in NetOps r21.2.2+ releases

book

Article ID: 230125

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

In the past, I configured org.ops4j.pax.logging.cfg to display JMS Health Stats on com.ca.im.common.core.jms.log

## JMS Health Statistics
log4j.logger.com.ca.im.core.jms.health.JmsBrokerHealthAnalyser=DEBUG,sift
log4j.additivity.com.ca.im.core.jms.health.JmsBrokerHealthAnalyser=false

This was done in the (default path) /opt/IMDataAggregator/apache-karaf-<version>/etc/org.ops4j.pax.logging.cfg file.

It resulted in messages like this being written to the (default path) /opt/IMDataAggregator/apache-karaf-<version>/data/log/com.ca.im.common.core.jms.log file.

This file does not exist until the DEBUG is configured/enabled and begins writing messages. No messages to write, no log gets created.

2020-05-01 17:34:24,467 | DEBUG | pool-13-thread-1 | JmsBrokerHealthAnalyser | s.health.JmsBrokerHealthAnalyser 149 | | JMS Health Statistics => Memory: 168.89KB/678.13MB, Disk: 0/5.54GB, Pending: 7 msgs, Enqueue: 160 msg/sec, Dequeue: 164 msg/sec, Delay: 0 secs, Dropped: 0 msgs
2020-05-01 17:34:54,469 | DEBUG | pool-13-thread-1 | JmsBrokerHealthAnalyser | s.health.JmsBrokerHealthAnalyser 121 | | JMS Health: received statistics: temp=0, size=0

Now the log is not displayed anymore. This seems to happen after 21.2.4/5 upgrade.

NOTE: This issue would NOT be seen for this DEBUG in releases r21.2.1 and older.
 

Environment

DX NetOps Performance Management releases r21.2.2 and newer.

Cause

New version of apache-karaf-4.2.6 introduced in r21.2.2 and newer releases brought changes to how the logging is configured.

Resolution

The configuration for logging karaf messages changed with the latest apache-karaf-4.2.6 release embedded in r21.2.2 and newer DX NetOps releases.

To resolve this configure the logging in the new release using these steps.

  1. Remove the old deprecated logging config entries that only work with apache-karaf-2.3.6 version.
  2. In the (default path) /opt/IMDataAggregator/apache-karaf-4.2.6/etc/org.ops4j.pax.logging.cfg file find the following new section:
    #
    # JMS Health logging
    #
    # log4j2.logger.JMSHealth.name = com.ca.im.core.jms.health
    # log4j2.logger.JMSHealth.level = DEBUG
    # log4j2.logger.JMSHealth.appenderRef.sift.ref = sift
  3. Remove the comments ('#' symbols) from the lines that start with log4j2. When done editing it should appear as:
    #
    # JMS Health logging
    #
    log4j2.logger.JMSHealth.name = com.ca.im.core.jms.health
    log4j2.logger.JMSHealth.level = DEBUG
    log4j2.logger.JMSHealth.appenderRef.sift.ref = sift
  4. Save the changes to the file.
  5. New log messages should appear in the newly created (default path) /opt/IMDataAggregator/apache-karaf-4.2.6/data/log/com.ca.im.common.core.jms.log file.

Additional Information

The debug logging method noted in this articles Introduction does NOT apply to DX NetOps Performance Management releases r21.2.x and newer.

It applies ONLY to r20.2.x and earlier releases.

It does not work in the new r21.2.2+ releases.