Enable Log for tomcat APM Agent

How to enable/Configure logs for APM Agent(Tomcat). I am using this.
export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.log_level=DEBUG"
export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.log_file=/opt/elastic-apm/log.txt"

But files are not getting genrated

Kibana version:

Elasticsearch version:

APM Server version:

APM Agent language and version:

Browser version:

Original install method (e.g. download page, yum, deb, from source, etc.) and version:

Fresh install or upgraded from other version?

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):

Steps to reproduce:
1.
2.
3.

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Your configuration seems right.

Which version of the agent are you using?

Please try out and report what you get:

  • without configuring log_file
  • with -Delastic.apm.log_file= _AGENT_HOME_/log.txt"

export CATALINA_OPTS="$CATALINA_OPTS -javaagent:/opt/APM/elastic-apm-agent-1.16.0.jar"
export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.service_name=sofware"
export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.application_packages=com.package.test"
export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.server_urls=http://ip:8200"
export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.log_level=DEBUG"
export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.log_file=/opt/APM/log.txt"

But log file is not getting generated.

The Problem has been resolved. Now we can see the stats in Kibana APM. Upgraded Java Version and Agent Permission issue

1 Like