search cancel

Recording Alert events to a different log file

book

Article ID: 190644

calendar_today

Updated On:

Products

CA Application Performance Management Agent (APM / Wily / Introscope) CA Application Performance Management (APM / Wily / Introscope) INTROSCOPE DX Application Performance Management

Issue/Introduction

There are too many alert events related entries in the APM logs (IntroscopeEnterpriseManager.log) and it makes it difficult to analyze. It would help having the alert events in a separated log file.

Environment

Release : Any

Component : APM 

Resolution

In order to redirect the events entries in logs to a different log file the following can be used:

- Define a new appender in IntroscopeEnterpriseManager.properties (in this example it is called MyAPMEvents) by setting the new log file path:
     
   log4j.appender.MyAPMEvents.File=logs/MyAPMEvents.log

- Configure the new appender:

   log4j.appender.MyAPMEvents=com.wily.org.apache.log4j.RollingFileAppender
   log4j.appender.MyAPMEvents.layout=com.wily.org.apache.log4j.PatternLayout
   log4j.appender.MyAPMEvents.layout.ConversionPattern=%d{M/dd/yy hh:mm:ss.SSS a z} [%-3p] [%t] [%c] %m%n
   log4j.appender.MyAPMEvents.MaxBackupIndex=4
   log4j.appender.MyAPMEvents.MaxFileSize=2MB

- Redirect events messages to new appender:

   log4j.logger.apm.events=INFO,MyAPMEvents

Additional Information

There is no need to restart EM to have the new appender working.