APMIA separate log for each bundle
search cancel

APMIA separate log for each bundle

book

Article ID: 233602

calendar_today

Updated On:

Products

DX SaaS

Issue/Introduction

APM Infrastructure Agent -- separate log for each bundle

APMIA Version: 21.12

Separate the APMIA message from each bundle to make easier to triage.

Have the ability to place the MQ bundle in a separate log.

Or least an option to separate out or combine.

This way I can point to MQ-related problem to the MQ log and enable debug for MQ bundle but not every message.

Example log:

 [INFO] [IntroscopeAgent.CollectorAgent] ARF Communication Parser-Writer in current use : GSON module

 [INFO] [IntroscopeAgent.WebSocketTransportService] WebSocket Transport Service starting

[INFO] [IntroscopeAgent.AccControllerManagementService] Starting ACC Controller Management Service

 [INFO] [IntroscopeAgent.InfrastructureAgent] url of ACC configuration server (introscope.agent.acc.controller.configurationServer.url) set to "http://10.100.0.163:8081"

 [INFO] [IntroscopeAgent.InfrastructureAgent] Configuration property (introscope.agent.acc.controller.watcher.interval) set to "300000"

 [INFO] [IntroscopeAgent.InfrastructureAgent] Error snapshot collection has been enabled

 [INFO] [IntroscopeAgent.InfrastructureAgent] Started Error Reporting service

 [INFO] [IntroscopeAgent.InfrastructureAgent] Agent Sustainability Property (com.wily.introscope.agent.sustainabilitymetrics.enabled) set to default value of "false"

 [INFO] [IntroscopeAgent.InfrastructureAgent] Agent Sustainability Metric enabled property (com.wily.introscope.agent.sustainabilitymetrics.metrics.enabled) set to default value of "false"

 [INFO] [IntroscopeAgent.InfrastructureAgent] Agent Sustainability Report enabled property (com.wily.introscope.agent.sustainabilitymetrics.report.enabled) set to default value of "false"

[INFO] [IntroscopeAgent.InfrastructureAgent] Agent Sustainability Report frequency property (com.wily.introscope.agent.sustainabilitymetrics.report.frequency) set to default value of "60000"

 [INFO] [IntroscopeAgent.MQMonitor] MQProperties:MQ Library Path is :/opt/mqm/java/lib64

[INFO] [IntroscopeAgent.MQMonitor] MQMonitor:Configured Queue Manager List[[default]]

[INFO] [IntroscopeAgent.MQMonitor] MQMonitor:IBM MQ IA properties loaded successfully

[INFO] [IntroscopeAgent.InfrastructureAgent] Performance Event QueueSYSTEM.ADMIN.PERFM.EVENT

[INFO] [IntroscopeAgent.InfrastructureAgent] Queue Manager Event QueueSYSTEM.ADMIN.QMGR.EVENT

1/21/22 12:24:48 AM EST [WARN] [IntroscopeAgent.MQMonitor] MQMonitor:Queue Manager name is mandatory in Bindings Mode for profile: default

1/21/22 12:24:48 AM EST [ERROR] [IntroscopeAgent.MQMonitor] MQMonitor:IBM Websphere Monitoring will not be started as configuration is not valid

1/21/22 12:24:48 AM EST [INFO] [IntroscopeAgent.IsengardMessaging] WebSocket handshake complete.

 

 

Request:

It very hard to trouble if we dump all the message into same log file.

Looking to troubleshoot each bundle separately. In that case I can send a user to appropriate log file to triage. This will help isolate problems quickly.

 

Ask:

Confirm if there is way to separate out each APMIA bundles to own log file

If not please open user story for enhancement request

 

Environment

Release : SAAS

Component : Integration with APM

Resolution

Please create an enhancement to do this by default -- We can make similar log4j configurations in the IntroscopeAgent.profile to output MQMonitor messages to its own log file. And this configuration for each bundle be enabled out of the box.

 

Additional Information

See https://programmer.group/log4j-output-log-to-separate-log-file.html

Working now. I can include in one or files if desired. See the example below.

#
# uncomment to remove from IntroscopeAgent.log file
#log4j.additivity.IntroscopeAgent.EPAgent=false
log4j.logger.IntroscopeAgent.EPAgent=DEBUG, EPAgent
# add to bundle specific file
log4j.appender.EPAgent.Apend=true

log4j.appender.EPAgent.File=../../logs/Introscope-EPA.log
 
# Changing this property requires restarting the Monitored Process
log4j.appender.EPAgent=com.wily.introscope.agent.AutoNamingRollingFileAppender
 
# Changing this property requires restarting the Monitored Process
log4j.appender.EPAgent.layout=com.wily.org.apache.log4j.PatternLayout
 
# Changing this property requires restarting the Monitored Process
log4j.appender.EPAgent.layout.ConversionPattern=%d{M/dd/yy hh:mm:ss a z} [%-3p] [%c] %m%n
 
# Changing this property requires restarting the Monitored Process
log4j.appender.EPAgent.MaxBackupIndex=4
 
# Changing this property requires restarting the Monitored Process
log4j.appender.EPAgent.MaxFileSize=2MB