# Metricbeat jolokia problem using wildcard

**URL:** <https://discuss.elastic.co/t/metricbeat-jolokia-problem-using-wildcard/114943>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [January 10, 2018, 7:42pm UTC](https://discuss.elastic.co/t/metricbeat-jolokia-problem-using-wildcard/114943 "2018-01-10T19:42:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![belingueres](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/belingueres/32/26441_2.png) [@belingueres](https://discuss.elastic.co/u/belingueres)\
**Post date:** [January 10, 2018, 7:42pm UTC](https://discuss.elastic.co/t/metricbeat-jolokia-problem-using-wildcard/114943/1 "2018-01-10T19:42:08Z")

</div>

Hi:  
I configured jolokia to get metrics on a Tomcat 7 ThreadPool.  
The configuration included the wildcard (\*) to avoid to specify the pool name (which changes from Tomcat 7 to Tomcat 8) this way:

- module: jolokia  
metricsets: ["jmx"]  
period: 10s  
hosts: ["localhost:8080"]  
namespace: "metrics"  
path: "/jolokia/?ignoreErrors=true&canonicalNaming=false"  
jmx.mapping:  
jmx.application:  
jmx.instance:

jolokia webapp actually returns all the ThreadPool instances (in my case only one named "http-bio-8080") however metricbeat does not send the metrics to Logstash but rather a field with:

error.message: "1 error: metric key '' not found in response"

As suggested in a github [issue](https://github.com/elastic/beats/issues/5709), I changed the wildcard for the ACTUAL name returned by jolokia and it worked fine.

However I just wanted to know if can be improved such behavior to allow the wildcard to work when **only one mbean is found** (many results returned would seem like you need to refine the actual metric to get).

Thanks in advance,  
Gabriel

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [January 11, 2018, 10:43pm UTC](https://discuss.elastic.co/t/metricbeat-jolokia-problem-using-wildcard/114943/2 "2018-01-11T22:43:45Z")

</div>

I think this is a valid request. I even wonder what we should do if we have multiple returns for the name? As you describe it works with the webapp, I assume the jolokia API should also support such requests.

Could you open a feature request on Github for this?

---

<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 8, 2018, 10:44pm UTC](https://discuss.elastic.co/t/metricbeat-jolokia-problem-using-wildcard/114943/3 "2018-02-08T22:44:05Z")

</div>

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