JVM Memory details using metricbeat

Is it possible to get the JVM Memory details using metricbeat in 6.4.0

Hello @460, is this https://www.elastic.co/guide/en/beats/metricbeat/6.4/metricbeat-metricset-jolokia-jmx.html what you are looking for?

We have a linux servers. We need to get data related to JVM using metricbeat. How to do that?

You need to install Jolokia as mentioned in the link above and then use the Jolokia module.

I enabled the jolokia module in metricbeat and edited the jolokia,yml file as follows:

Module: jolokia

Docs: https://www.elastic.co/guide/en/beats/metricbeat/6.4/metricbeat-module-jolokia.html

  • module: jolokia
    metricsets: ["jmx"]
    enabled: true
    period: 10s
    namespace: "jolokia_metrics"
    hosts: ["localhost:9200"]
    jmx.mappings:
    • mbean: 'java.lang:type=Runtime'
      attributes:
      • attr: Uptime
        field: uptime
    • mbean: 'java.lang:type=GarbageCollector,name=ConcurrentMarkSweep'
      attributes:
      • attr: CollectionTime
        field: gc.cms_collection_time
      • attr: CollectionCount
        field: gc.cms_collection_count
    • mbean: 'java.lang:type=Memory'
      attributes:
      • attr: HeapMemoryUsage
        field: memory.heap_usage
      • attr: NonHeapMemoryUsage
        field: memory.non_heap_usage

Since elasticsearch is a java application, I started my elasticsearch. It has no password.

But I am not able to get any.......data related to jvm stats.

Can you help me to rectify this issue

You have configure the hosts to localhost:9200 which is normally the Elasticsearch endpoint. Under which address / port is your Jolokia service running?

Thanks for the reply. I am running the whole thing on windows. Jolokia and metricbeat will be running on the same address right? If that's the case, Its the localhost itself the jolokia is running. I don't know how to find the port number on which it would be running.

Can you please post the step-by-step process to get the JVM details along with what the hosts should be

This blog post might help you: https://www.elastic.co/blog/monitoring-java-applications-with-metricbeat-and-jolokia

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.