Is there an example available about how to use jvm.memory.heap.used To get this data in kibana.
1 Answers
There are few steps to follow before you will be able to create simple visualization for jvm.memory.heap.used
metric.
Download and start APM server, you will find instructions here
For osx you can do this with following commands:
curl -L -O https://artifacts.elastic.co/downloads/apm-server/apm-server-7.2.0-darwin-x86_64.tar.gz
tar xzvf apm-server-7.2.0-darwin-x86_64.tar.gz
cd apm-server-7.2.0-darwin-x86_64/
./apm-server -e
Run your app with an attached agent
java -javaagent:/path_to_agent/elastic-apm-agent-1.9.0.jar \
-Delastic.apm.service_name=my-application \
-Delastic.apm.server_url=http://localhost:8200 \
-Delastic.apm.secret_token= \
-Delastic.apm.application_packages=org.example \
-jar Main.jar
Make sure elasticsearch is receiving data from apm agent
Prepare index patter for apm indices
Create a visualization
I want to show jvm.memory.heap.used
usage over time so I'll select date histogram for a bucket
and max value in a given time by configuring metrics like this
in the end, we should see something like this
You can find an interactive tutorial inside Kibana about gathering APM data from java applications. If you fill find creating visualizations problematic, check this tutorial.
Hope that helps.

- 9,664
- 3
- 41
- 43