# Metricbeat Jolokia GC Young space

**URL:** <https://discuss.elastic.co/t/metricbeat-jolokia-gc-young-space/182600>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [May 24, 2019, 9:27am UTC](https://discuss.elastic.co/t/metricbeat-jolokia-gc-young-space/182600 "2019-05-24T09:27:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubbercable](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rubbercable/32/46779_2.png) [@rubbercable](https://discuss.elastic.co/u/rubbercable)\
**Post date:** [May 24, 2019, 9:27am UTC](https://discuss.elastic.co/t/metricbeat-jolokia-gc-young-space/182600/1 "2019-05-24T09:27:48Z")

</div>

Metric beat doesn't handle spaces in mbeans well.  
curl localhost:8778/jolokia/read/java.lang:name=G1%20Young%20Generation,type=GarbageCollector

I can curl this to get statistics, but Metricbeat reports:

{  
"error": "javax.management.InstanceNotFoundException : java.lang:name=G1%20Young%20Generation,type=GarbageCollector",  
"error\_type": "javax.management.InstanceNotFoundException",  
"request": {  
"attribute": [  
"CollectionTime",  
"CollectionCount"  
],  
"mbean": "java.lang:name=G1%20Young%20Generation,type=GarbageCollector",  
"type": "read"  
},  
"stacktrace": "javax.management.InstanceNotFoundException: java.lang:name=G1%20Young%20Generation,type=GarbageCollectorntat com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)ntat com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:643)ntat com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678)ntat org.jolokia.handler.ReadHandler$2.execute(ReadHandler.java:60)ntat org.jolokia.backend.executor.AbstractMBeanServerExecutor.call(AbstractMBeanServerExecutor.java:90)ntat org.jolokia.handler.ReadHandler.getAttribute(ReadHandler.java:235)ntat org.jolokia.handler.ReadHandler.fetchAttributes(ReadHandler.java:189)ntat org.jolokia.handler.ReadHandler.doHandleRequest(ReadHandler.java:118)ntat org.jolokia.handler.ReadHandler.doHandleRequest(ReadHandler.java:37)ntat org.jolokia.handler.JsonRequestHandler.handleRequest(JsonRequestHandler.java:161)ntat org.jolokia.backend.MBeanServerHandler.dispatchRequest(MBeanServerHandler.java:156)ntat org.jolokia.backend.LocalRequestDispatcher.dispatchRequest(LocalRequestDispatcher.java:99)ntat org.jolokia.backend.BackendManager.callRequestDispatcher(BackendManager.java:428)ntat org.jolokia.backend.BackendManager.handleRequest(BackendManager.java:158)ntat org.jolokia.http.HttpRequestHandler.executeRequest(HttpRequestHandler.java:197)ntat org.jolokia.http.HttpRequestHandler.handlePostRequest(HttpRequestHandler.java:131)ntat org.jolokia.jvmagent.handler.JolokiaHttpHandler.executePostRequest(JolokiaHttpHandler.java:290)ntat org.jolokia.jvmagent.handler.JolokiaHttpHandler.doHandle(JolokiaHttpHandler.java:236)ntat org.jolokia.jvmagent.handler.JolokiaHttpHandler.handle(JolokiaHttpHandler.java:178)ntat com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)ntat sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)ntat com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)ntat sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)ntat com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)ntat sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)ntat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)ntat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)ntat java.lang.Thread.run(Thread.java:748)n",  
"status": 404  
},

---

<div class="post-metadata">

**Author:** ![Kaiyan\_Sheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaiyan_sheng/32/38247_2.png) [@Kaiyan\_Sheng](https://discuss.elastic.co/u/Kaiyan_Sheng)\
**Post date:** [May 28, 2019, 6:19pm UTC](https://discuss.elastic.co/t/metricbeat-jolokia-gc-young-space/182600/2 "2019-05-28T18:19:35Z")

</div>

@rubbercable Thanks for reporting this. Seems like when specifying `jmx.mappings` in jolokia metricbeat config with `java.lang:type=GarbageCollector,name=collector's name`, jolokia module can not handle `collector's name` with space. What does your config looks like?

---

<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:** [June 25, 2019, 6:19pm UTC](https://discuss.elastic.co/t/metricbeat-jolokia-gc-young-space/182600/3 "2019-06-25T18:19:36Z")

</div>

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