Installation of APM Agent In Elasticsearch For Tomcat Server

Installation of apm agent In Elasticsearch For Tomcat Server

you can do installation of apm agent for java to monitor your Tomcat server where your application are running or hosted.

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 task.

I have installed this apm-server in elk stack. This tools can help you to monitor your apps 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 file 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.

vim setenv.sh

Put this code in this file setenv.sh

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

Give Execution permission to setenv.sh

chmod +x setenv.sh

Step 4 : kill the tomcat process

ps -ef | grep java

kill -9 pid

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

Now start the tomcat service,

./startup.sh

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 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.

That’s it.

Sponsored

LEAVE A REPLY

Please enter your comment!
Please enter your name here

two + eighteen =