# Can't collect metrics from Jolokia module

**URL:** https://discuss.elastic.co/t/cant-collect-metrics-from-jolokia-module/126939
**Category:** Beats
**Tags:** metricbeat
**Created:** [April 5, 2018, 1:25pm UTC](https://discuss.elastic.co/t/cant-collect-metrics-from-jolokia-module/126939 "2018-04-05T13:25:01Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Nikita\_Krasnov](https://avatars.discourse-cdn.com/v4/letter/n/53a042/32.png) [@Nikita\_Krasnov](https://discuss.elastic.co/u/Nikita_Krasnov)
#### Post date: [April 5, 2018, 1:25pm UTC](https://discuss.elastic.co/t/cant-collect-metrics-from-jolokia-module/126939/1 "2018-04-05T13:25:01Z")

</div>

Hello to everyone!  
I downloaded`jolokia-jvm-1.5.0-agent.jar` and made command `java -javaagent:/path/to/jolokia-jvm-<version>-agent.jar start [processId]`. And it started.

```
- module: jolokia
  metricsets: ["jmx"]
  enabled: true
  period: 10s
  hosts: ["localhost:8778"]
  namespace: "metrics"
  path: "/jolokia/?ignoreErrors=true&canonicalNaming=false"
  jmx.mappings:
       - mbean: 'java.lang:type=Memory'
         attributes:
           - attr: HeapMemoryUsagePercent
             field: memory.heap_usage_pct
             field_type: integer
           - attr: NonHeapMemoryUsage
             field: memory.non_heap_usage
             field_type: integer
jmx.application:
jmx.instance:

```

When I restart metricbeat service, I get normal log without any exception. But when metrics start to be collecting by metricbeat futher in log, I see string `jolokia:["jmx";{"events":3,"failures":3}}`  
In Kibana I've not found any metrics with name `memory.heap_usage_pct` or `memory.non_heap_usage`  
What I am doing wrong?

---

<div class="post-metadata">

### Author: ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)
#### Post date: [April 5, 2018, 1:53pm UTC](https://discuss.elastic.co/t/cant-collect-metrics-from-jolokia-module/126939/2 "2018-04-05T13:53:15Z")

</div>

Can you see more errors in the logs? What version of metricbeat are you using?

---

<div class="post-metadata">

### Author: ![Nikita\_Krasnov](https://avatars.discourse-cdn.com/v4/letter/n/53a042/32.png) [@Nikita\_Krasnov](https://discuss.elastic.co/u/Nikita_Krasnov)
#### Post date: [April 5, 2018, 2:32pm UTC](https://discuss.elastic.co/t/cant-collect-metrics-from-jolokia-module/126939/3 "2018-04-05T14:32:09Z")

</div>

Metricbeat-6.2.3  
I can't find any errors. Here all logs:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/3/737bbc752e9f25d03feb4207ce05bbc365cd3f4e.png)

`jolokia:["jmx";{"events":3,"failures":3}}` I found in `non-zero metrics`

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 3, 2018, 2:32pm UTC](https://discuss.elastic.co/t/cant-collect-metrics-from-jolokia-module/126939/4 "2018-05-03T14:32:12Z")

</div>

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