Debugging of Pods (4.1)

Usage Engine provides options to further enhance the debugging of your Pod(s). There are parameters that can be customized from the values.yaml file and these will allow you to customize your own format of the log message or even to specify the severity level of the log messages that will be stored in the log files.

Debugging is always enabled/disabled per Pod. Some settings are configured on JMX level, this is for the common parameters such as the JMX port and log patterns. Debug will allow you to enable or disable the JMX option for the Platform.

The following are the log files that will be affected when configuring the customizable parameters:

  • platform.log

  • ec.log

Debugging for the Platform

This section will cover the parameters and information that you will come across when customizing your debugging parameters for the Platform.

JMX Debug

For JMX Debug, you will need to set the following parameters under the debug section in the values.yaml files from the helm chart in order to customize the log files accordingly.

Example: values.yaml file with debug enabled and supporting parameters

mediationzone / values.yaml: debug: script: enabled: true log: level: codeserver: info jetty: 'off' others: warn jmx: remote: enabled: false port: 8818 export: enabled: false port: 8888 log: # Format can be "json" or "raw". Default is "raw" format: raw # Pattern is only for raw format, refer to log4j standard pattern: '%d: %5p: %m%n'

Parameters

Description

Default

Parameters

Description

Default

debug.script.enabled

When this parameter is set to true, the docker-entrypoint*.sh script will be in set -x mode, which will log the steps and commands taken in the script into your log files.

false

debug.jmx.port

This parameter is used to define the value for the JMX port. The value defined here will be assigned to the JMX and rmi port. This port is to be used for connecting into the platform pod, using tools such as Java Mission Control or any other tools that utilizes the JMX port. You will need to enable the JMX feature with another parameter describe in the Debug section.

Note!

You will need to expose the JMX port on the pod where your Platform is located. You can use this command to forward the port.

kubectl port-forward <pod name> <arbitrary port>:<jmx port defined in debug.jmx.port>







debug.log.format

This will be the log format for the supported log files. You can toggle between raw or json format. When using the raw format, you can set the pattern for the log message using the parameter described below.

json

debug.log.pattern

If you set your debug log format to raw, this parameter will allow you to set the formatting pattern of your log message. The pattern uses the standard log4j format which you can refer to from: https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html



debug.log.level.codeserver

You can set the log level for log messages coming from the codeserver.



debug.log.level.jetty

You can set the log level for log messages coming from jetty.



debug.log.level.others

You can set the log level for log messages coming from various other logs from within the pods.



Example: Platform debug enabled

mediationzone / values.yaml: platform: ... ... # Debugging for JMX and logging # JMX refers to .Values.debug.JMX.port debug: jmx: enabled: true webdesktop: ... ... # Debugging for JMX and logging # JMX refers to .Values.debug.JMX.port debug: jmx: enabled: true

Debugging for ECD

If you have had the debug parameters defined and enabled on your platform, ECD will automatically retrieve the parameters and the values from the platform and apply it into your EC deployment. However, you will still be required to expose the JMX port when setting up the ECD.

Â