APM is configured in Java as a jar. you can see it here
Now, How do I make sure the logs from java app are being sent to apm server and then to elasticsearch. I dont see any service related to java in kibana.
You only need to do this if you actually want to enhance the traces via the public API. I suggest to remove that until you need it. You are also using a very old version of the API.
You are using the wrong jar to runtime attach to your application. See the installation instructions where to download the correct jar for remote attachment.
As the exception message suggests, you are probably trying to attach with a JRE but attaching requires a JDK. Could you send me the output of java -version?
Please try to verify that the java command you are using is coming from a JDK bin and jre/bin.
Regardless, any reason why you can't install the agent through the -javaagent configuration?
First can you echo your JAVA_HOME it is still unclear if you are using a JRE or JDK
echo $JAVA_HOME
Also your your startup command should look something like the following, substitute the URL of your APM Server. You do not need the APM as part of the dependency for the application to use the automatic instrumentation.
A complete quick sample on how to run Petclinic with APM can be found here. You can ignore the docker stuff but it shows you how to build and run Petclinic and get APM data. This is a fork that I put a performance bug in that you can find with APM
I've followed the same procedure and able to configure for the java app. It's working well
And, the spring pet-clinic app you have mentioned is monolith. I've also configured it for micro-services based pet-clinic app(https://github.com/elastic/spring-petclinic).
Configured it for java, python. trying to set up front end. Not much aware of how to start the front-end app. I'm exploring, please let me know if you are aware of it.
Also, I've one question related to java apm.
I also wanted to monitor jvm and threads. Is there any way using APM ? or do i need to use beats for that ?
@rahulnama the Java agent is sending JVM metrics that are stored in dedicated APM indices.
Since Kibana version 7.2, the APM UI also shows JVM memory and thread count on the Metrics tab.
There is a work going on to expand that to show more JVM metrics (like GC), better filtering options and more in upcoming releases.
All my java apps are running in production(assume on ec2 instances). Now I've to integrate them with APM without re-deploying/re-starting the java app. how to achieve this. We are using ansible for remote installation of apm on different machines.
If you see in the image it's displaying number of occurences as 214 and 56 in last 5 mins. However, I've clicked the error page only 6-7 times. not sure why is it showing such a high count ?
Any suggestions ?
Running petclinic app. need your help.
I want to use mysql (instead of hsqldb)which is installed on AWS ec2. In that case I can also track the mysql metrics and query logs using packetbeat and filebeat.
Could you explain me how to configure mysql for spring-petclinic?
I've changed the details of mysql in appliation.properties file.
And also I've changed database=mysql(hsqldb). Also tried running scripts manually.
but when I build and run I see lot of errors. could you let me know what else is needed to run app with mysql running on localhost.
That is really petclinic related not elastic stack related there is a whole community and lots of help around petclinic perhaps you can share your error messages and get some help there... of course include your error messages because without them no one will be able to really help
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.