Installation of APM Agent In Elasticsearch For Tomcat Server

you can do the installation of an APM agent for java to monitor your Tomcat server where your application is running or hosted. We can install and configure the APM agent for the tomcat application.

This is used to monitor the java based application and you can also monitor other apps using this APM. you can also monitor your application based on ruby, go, etc. and you can create separate APM-server to handle these all tasks.

Installation of APM agent In Elasticsearch For Tomcat Server:

I have installed this APM-server in the elk stack. These tools can help you to monitor your app’s issues.

Step 1: Download Elasticsearch APM agent from here 

Check Out: How To Install APM Server In Elasticsearch Elk Stack

Step 2: Package Name is elastic-apm-agent-1.6.1.jar

After downloading the Elasticsearch agent, put these jar files under your Apache tomcat.

Tomcat location is /opt/tomcat9/apache-tomcat-9.0.13/

I’m moving this package from root to tomcat location.

mv elastic-apm-agent-1.6.1.jar /opt/tomcat9/apache-tomcat-9.0.13/

Step 3: Now you have to make a service for this under this location and change values according to your apps.


Put this code in this file

apm agent tomcat

Check Out: Error Can’t Run Elasticsearch As a Root User In Linux

Give Execution permission to

chmod +x

configure apm agent tomcat

Step 4: kill the tomcat process

ps -ef | grep java
kill -9 pid

install apm agent tomcat

Check Out: How To Install Elasticsearch Using Source Code In Linux

Now start the tomcat service,


If you see the –javaagent by running ps -ef | grep java which means you have correctly defined the Catalina_OPTS.

Step 5: Now go to your Kibana, where you have to check the agent is receiving data or not.

Data successfully received.

Check Out: Configuration of Filebeat For Elasticsearch

Step 6: Now Click on load Kibana objects,

Finally, click on Launch APM.

Step 7: Now click on tomcat-addressbook

Everything is working fine.

YouTube Link: Configure APM for tomcat

That’s it. . configure apm agent tomcat install  

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment