26. February 2018
2 min

Java Application Performance Management with the Elastic Stack

Elasticsearch, Logstash and Kibana also known as the ELK stack have been widely adapted by development and operation teams and used successfully by our customers for log analytics - as one piece of the puzzle - to provide outstanding reliable software systems. The Elastic APM solution (currently available as beta version) adds another piece to the puzzle.

Elastic APM instruments your application, collects performance metrics from your Node.js or Python application and ships the metric data to Elasticsearch. Kibana provides pre-configured dashboards and a dedicated APM UI to view performance metrics, transactions and other information like function and database calls.

Java and Elastic APM

While the Elastic Website tells us that Node.js and Python are supported and others are on the way like Ruby and JavaScript, we were surprised that good old Java is not mentioned. Maybe Java is also on the way and just not highlighted. We don’t know what’s on the road-map and asked ourselves why should we wait when we can close the gap ourselves? We took “If you don’t see what you need, you can build it or leverage the open source community”[1] seriously and built a Java agent that instruments Java applications and ships the performance metrics to Elasticsearch via the Elastic APM Server. There is no need to change the source code of your application: just start the agent along with it and you get the data basically for free. It’s a big benefit when you need performance metrics from an application and you have no access to the source code.

Using Kibana and X-Pack you can visualize the collected data, create dashboards, detect anomalies and create alerts. With the dedicated APM UI you can drill-down into transaction traces to see executed methods. Not having all relevant data in one place limits effectiveness in managing your application.


What we would like to have as well is an application flow map and real user experience metric data from the browser and iOS and Android devices – in one place. We have this on the way. In our next post, we will explore anomaly detection in Kibana to detect application performance anomalies in real-time.

Questions? Thoughts? You want stay up-to-date on the topic? We would love to hear from you. Tweet us at @novatecgmbh or email us at apm@novatec-gmbh.de


Comment article


  1. Andre

    Hi Marius,

    Thanks for your answers. So i have installed Java agent from the link that you gave above and i’ve using parameters that you mention. but i cant see any data in kibana.

    Can you give me some syntax or way to make sure that there’s data flow in my Elastic APM server and Elasticsearch? Sorry im new here. Thanks in advance.


  2. Marius Oehler

    Hi Andre,

    because the Elastic APM feature is not in the main/master brunch yet, you have to use an agent which has been build from the following brunch https://github.com/mariusoe/inspectIT/tree/elastic-apm-poc
    This is not the case if you use the released agent version because it is based on the master.

    If you’re using an agent based on that brunch you can add the already mentioned VM arguments (-Delastic-apm.host=.) to send the data to Elastic. If this has been done, you should see the data incoming in the Elastic APM server and Elasticsearch.


  3. Andre

    Hi all,

    I’ve installed elasticsearch engine, kibana , APM manager, inspectiT CMR on my server and inspectiT java agent to server that i want to monitor.
    The problem is i see data on my CMR server but there’s nothing on my kibana.
    How to make sure my APM manager and elasticsearch engine consumed data from java agent?
    Can someone guide me, how to setup kibana if APM manager and elasticsearch has consumed my data? because is hard to find documentation about that . Thank in advance .

  4. Christoph Heger

    To setup the Java agent you need to follow the general setup https://inspectit-performance.atlassian.net/wiki/spaces/DOC18/pages/93009260/Installation+Guide and you need to add additional parameters to ship data to elastic.

    * Install CMR (required because the agent polls the instrumentation from the CMR
    * Add java agent to application server
    – Add -Dinspectit.repository=[REPOSITORY_IP]:[REPOSITORY_PORT] -Dinspectit.agent.name=[AGENT_DISPLAY_NAME]
    – Add -Delastic-apm.host=: to the JVM parameters when including the agent.

    You need a running elastic search + elastic apm instance.

    The agent will report the data directly to Elastic APM and polls its instrumentation configuration (what should be monitored) from the CMR.

  5. kaouther

    agent jar installed . but didn’t communicate with elastic apm
    java -javaagent:/root/inspectIT/inspectit.agent.java/build/release/inspectit-agent.jar -Dinspectit.repository= -Dinspectit.agent.name=Instance1 -version
    févr. 21, 2018 10:59:54 AM rocks.inspectit.agent.java.javaagent.JavaAgent premain
    INFOS: inspectIT Agent: Starting initialization…
    10:59:56.274 [main] INFO rocks.inspectit.agent.java.SpringAgent – Location of inspectit-agent.jar set to: /root/inspectIT/inspectit.agent.java/build/release/inspectit-agent.jar
    10:59:56,255 |-INFO in ch.qos.logback.classic.LoggerContext[default] – Could NOT find resource [logback.groovy]
    10:59:56,255 |-INFO in ch.qos.logback.classic.LoggerContext[default] – Could NOT find resource [logback-test.xml]
    10:59:56,255 |-INFO in ch.qos.logback.classic.LoggerContext[default] – Could NOT find resource [logback.xml]
    10:59:56,258 |-INFO in ch.qos.logback.classic.BasicConfigurator@345f69f3 – Setting up default configuration.
    10:59:56,300 |-WARN in Logger[rocks.inspectit.agent.java.SpringAgent] – No appenders present in context [default] for logger [rocks.inspectit.agent.java.SpringAgent].

    févr. 21, 2018 11:00:03 AM rocks.inspectit.agent.java.javaagent.JavaAgent preloadClasses
    INFOS: Preloading classes …
    févr. 21, 2018 11:00:03 AM rocks.inspectit.agent.java.javaagent.JavaAgent preloadClasses
    INFOS: Preloading classes complete…
    févr. 21, 2018 11:00:03 AM rocks.inspectit.agent.java.javaagent.JavaAgent premain
    INFOS: inspectIT Agent: Initialization complete…
    openjdk version “1.8.0_161”
    OpenJDK Runtime Environment (build 1.8.0_161-b14)
    OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)

    on the apm server side I have no data received from this server
    any help please ?

  6. kaouther

    Hi Christophe;

    thank you for your help .

    I’ve installed the agent on my application server. How di I tell him to which elastic server send data ?


  7. Amel

    Dear all ;

    Even following documentation, I am not able to install inspectIT agent with jboss. Could you help me please

    many thanks in advance

  8. kaouther

    Many thanks for your help. Finally migration to 1.6 done . I’ll test on it and give yoou feedback

  9. Ivan Senic


    unfortunately, the agent Christoph linked here is only working with Java 1.6+. From our experience, most of the people already moved to Java 1.6, at least. We are already in the Java 10 release candidate time, the version 1.4.2 is so old.

    However, we do have the knowledge inside of our department on how can we instrument and collect data from the Java 1.4.2 application as well. We could offer you this as part of our consulting services. Let us know if you are interested.


  10. kaouther

    Thank you for all these informations. My java version is 1.4.2 . It will be possible to monitor it with this version ?

    Application server Jboss EAP 5.

    Best regards

  11. Christoph Heger


    you find the code branch here: https://github.com/mariusoe/inspectIT/tree/elastic-apm-poc

    You can follow the inspectIT user guide to set things up as there some parts of inspectIT needed until we fully decoupled the agent. https://inspectit-performance.atlassian.net/wiki/spaces/DOC/overview

    We would be glad about your feedback and to learn about your use cases and requirements. That’s how we can make design decisions that brings users the greatest value in using the agent.


  12. kaouther


    Could you help me to istall this agent please ? I am not familar with java Env and I have to troboulshout performance problems in production.
    I’ve installed my Elastic stack 6.1
    Many thans in advance

  13. Steffen

    Is there a way to access the Java Agent written by you or will it stay closed source within NovaTec?