# Getting error while monitoring JVM via metricbeat

**URL:** <https://discuss.elastic.co/t/getting-error-while-monitoring-jvm-via-metricbeat/117403>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [January 29, 2018, 7:20am UTC](https://discuss.elastic.co/t/getting-error-while-monitoring-jvm-via-metricbeat/117403 "2018-01-29T07:20:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahulkumar](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@Rahulkumar](https://discuss.elastic.co/u/Rahulkumar)\
**Post date:** [January 29, 2018, 7:20am UTC](https://discuss.elastic.co/t/getting-error-while-monitoring-jvm-via-metricbeat/117403/1 "2018-01-29T07:20:06Z")

</div>

Hi Team,

I am using simple commands to monitor JVM attributes with the help of metricbeat.

```
- module: jolokia
  metricsets: ["jmx"]
  enabled: true
  period: 1s
  hosts: ["host:8075"]
  namespace: "metrics"
  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

```

Here, 8075 is my JMX port.  
I am getting below error in Kibana:

`failed to unmarshal jolokia JSON response '': invalid character '\x00' looking for beginning of value`

Let me know how to resolve this issue.

---

<div class="post-metadata">

**Author:** ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)\
**Post date:** [January 29, 2018, 11:53am UTC](https://discuss.elastic.co/t/getting-error-while-monitoring-jvm-via-metricbeat/117403/2 "2018-01-29T11:53:32Z")

</div>

I have seen a similar issue: [Metricbeat jolokia module: "Cannot unmarshal json response"](https://discuss.elastic.co/t/metricbeat-jolokia-module-cannot-unmarshal-json-response/89744)  
This might be useful for you.

Let me know if you need further assistance.

---

<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:** [February 26, 2018, 11:54am UTC](https://discuss.elastic.co/t/getting-error-while-monitoring-jvm-via-metricbeat/117403/3 "2018-02-26T11:54:15Z")

</div>

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