# ERROR: metricset jolokia.jmx: mbean properties must be in the form key=value

**URL:** <https://discuss.elastic.co/t/error-metricset-jolokia-jmx-mbean-properties-must-be-in-the-form-key-value/215778>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [January 20, 2020, 4:10pm UTC](https://discuss.elastic.co/t/error-metricset-jolokia-jmx-mbean-properties-must-be-in-the-form-key-value/215778 "2020-01-20T16:10:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![vmoragar](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@vmoragar](https://discuss.elastic.co/u/vmoragar)\
**Post date:** [January 20, 2020, 4:10pm UTC](https://discuss.elastic.co/t/error-metricset-jolokia-jmx-mbean-properties-must-be-in-the-form-key-value/215778/1 "2020-01-20T16:10:05Z")

</div>

Hi,  
I use metricbeat (jolokia) to get jmx information in Websphere.

jmx.mappings:

- mbean: 'WebSphere:type=ThreadPool,name=WebContainer,\*'  
attributes:
  - attr: maximumSize  
field: threadpool.maximumSize

The error is:  
2020-01-20T17:00:57.768+0100 INFO module/wrapper.go:252 Error fetching data for metricset jolokia.jmx: mbean properties must be in the form key=value: WebSphere:type=ThreadPool,name=  
WebContainer,\*

But If you put this url:  
jolokia-war-1.6.2/read/WebSphere:type=ThreadPool,name=WebContainer,\*  
the result is:  
{"value":{"WebSphere:cell=Cell01,mbeanIdentifier=cells/Cell01/nodes/Node01/servers/server\_01\_01/server.xml#ThreadPool\_1527689262778,name=WebContainer,node=Node01,platform=dynamicproxy,process=Fortuny\_01\_01,spec=1.0,type=ThreadPool,version=8.0.0.4":{"maximumSize":50,"name":"WebContainer","inactivityTimeout":60000,"growable":true,"minimumSize":50,"stats":{"statistics":[{"lowWaterMark":1,"highWaterMark":4,"unit":"N/A","current":2,"name":"ActiveCount","upperBound":0,"wSImpl":{"enabled":true,"highWaterMark":4,"unit":"N/A","mean":1.245895201393063,"statisticType":7,"name":"ActiveCount","integral":2.6420724E7,"lastSampleTime":1579519581782,"startTime":1579498375565,"lowWaterMark":1,"dataInfo":{"aggregatable":true,"participation":null,"unit":"N/A","level":7,"updateOnRequest":false,"dependency":null,"name":"ActiveCount","statisticSet":"basic","platform":"all","submoduleName":null,"type":5,"id":3,"description":"The number of concurrently active threads.","zosAggregatable":true,"category":"all","comment":"The number of concurrently active threads","resettable":true},"current":2,"id":3,"upperBound":0,"description":"The number of concurrently active threads.","lowerBound":0},"description":"The number of concurrently active threads.","lowerBound":0,"lastSampleTime":1579519581782,"startTime":1579498375565},{"lowWaterMark":1,"highWaterMark":50,"unit":"N/A","current":7,"name":"PoolSize","upperBound":50,"wSImpl":  
.........

---

<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:** [January 20, 2020, 4:34pm UTC](https://discuss.elastic.co/t/error-metricset-jolokia-jmx-mbean-properties-must-be-in-the-form-key-value/215778/2 "2020-01-20T16:34:11Z")

</div>

Hi @vmoragar and welcome to discuss 🙂

Yeah, I am afraid that mbean definitions with wildcards in this form are not supported by Metricbeat.

Could you compare the results with this configuration?

```auto
jmx.mappings:
    mbean: 'WebSphere:type=ThreadPool,name=WebContainer,node=*'
    attributes:
        attr: maximumSize
        field: threadpool.maximumSize

```

I have created an issue in any case because it'd be nice to support wildcards on this format: [https://github.com/elastic/beats/issues/15684](https://github.com/elastic/beats/issues/15684)

Thanks for reporting!

---

<div class="post-metadata">

**Author:** ![vmoragar](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@vmoragar](https://discuss.elastic.co/u/vmoragar)\
**Post date:** [January 22, 2020, 9:04am UTC](https://discuss.elastic.co/t/error-metricset-jolokia-jmx-mbean-properties-must-be-in-the-form-key-value/215778/3 "2020-01-22T09:04:29Z")

</div>

Hi @jsoriano,  
I put this configuration  
mbean: 'WebSphere:type=ThreadPool,name=WebContainer,node=\*'

And error is:  
":"javax.management.InstanceNotFoundException : No MBean with pattern WebSphere:cell=Cell01,name=WebContainer,node=\*,type=ThreadPool

Detail:  
2020-01-21T12:21:57.598+0100 DEBUG [jolokia.jmx] jmx/config.go:499 Jolokia response body {"host": "localhost:9081", "host": "localhost:9081", "uri": "h  
ttp://localhost:9081/jolokia-war-1.6.2/%3FignoreErrors=true&canonicalNaming=false", "body": "[{"value":{"Uptime":20998229,"StartTime":1579584694202},"status":200,"timest  
amp":1579605692,"request":{"type":"read","attribute":["Uptime","StartTime"],"mbean":"java.lang:type=Runtime"}},{"value":{"MaxHeapSize":4294967296,"HeapMemoryUsage":{"  
init":4294967296,"max":4294967296,"committed":4294901760,"used":635674904},"NonHeapMemoryUsage":{"init":0,"max":-1,"committed":249902744,"used":160514408}},"status":200,"  
timestamp":1579605692,"request":{"type":"read","attribute":["HeapMemoryUsage","NonHeapMemoryUsage","MaxHeapSize"],"mbean":"java.lang:type=Memory"}},{"value":{"ThreadCou  
nt":100},"status":200,"timestamp":1579605692,"request":{"type":"read","attribute":"ThreadCount","mbean":"java.lang:type=Threading"}},{"error\_type":"javax.management.Ins  
tanceNotFoundException","status":404,"error":"javax.management.InstanceNotFoundException : No MBean with pattern WebSphere:cell=Cell01,name=WebContainer,node=_,type=ThreadPool found fo  
r reading attributes","stacktrace":"javax.management.InstanceNotFoundException: No MBean with pattern WebSphere:cell=Cell01,name=WebContainer,node=_,type=ThreadPool found for reading attributes

I find a work around:  
I put

- mbean: 'WebSphere:cell=Cell01,name=WebContainer,node=Node01,platform=dynamicproxy,process=server\_01\_01,spec=1.0,type=ThreadPool,version=8.0.0.4,mbeanIdentifier=\*'  
with this configuration work fine.  
thanks for all

---

<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:** [January 22, 2020, 9:51am UTC](https://discuss.elastic.co/t/error-metricset-jolokia-jmx-mbean-properties-must-be-in-the-form-key-value/215778/4 "2020-01-22T09:51:14Z")

</div>

Good to see that you found a workaround, but I wonder if with this configuration you are finding all the mbeans that you expected.

In the example request you posted on the first comment there is an mbean with a property `process=Fortuny_01_01`. I guess this is not going to be collected if the configuration contains the fixed property `process=server_01_01`.

I wonder if this configuration with two wildcards would work for this case:

```auto
mbean: 'WebSphere:cell=Cell01,name=WebContainer,node=Node01,platform=dynamicproxy,process=*,spec=1.0,type=ThreadPool,version=8.0.0.4,mbeanIdentifier=*'

```

---

<div class="post-metadata">

**Author:** ![vmoragar](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@vmoragar](https://discuss.elastic.co/u/vmoragar)\
**Post date:** [January 22, 2020, 3:33pm UTC](https://discuss.elastic.co/t/error-metricset-jolokia-jmx-mbean-properties-must-be-in-the-form-key-value/215778/5 "2020-01-22T15:33:23Z")

</div>

thanks,  
I put

```auto
- mbean: 'WebSphere:cell=Cell01,name=WebContainer,node=Node01,platform=dynamicproxy,process=*,spec=1.0,type=ThreadPool,version=8.0.0.4,mbeanIdentifier=*' 

```

And work fine.

---

<div class="post-metadata">

**Author:** ![vmoragar](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@vmoragar](https://discuss.elastic.co/u/vmoragar)\
**Post date:** [January 22, 2020, 3:54pm UTC](https://discuss.elastic.co/t/error-metricset-jolokia-jmx-mbean-properties-must-be-in-the-form-key-value/215778/6 "2020-01-22T15:54:52Z")

</div>

Hi Jaime,  
I would like to transform in json value for read ActiveCount.current

jolokia.metrics.threadpool.webcontainer.stats.statistics {  
"startTime": 1579671098013,  
"unit": "N/A",  
"wSImpl": {  
"highWaterMark": 7,  
"unit": "N/A",  
"lowWaterMark": 1,  
"lastSampleTime": 1579706417998,  
"description": "The number of concurrently active threads.",  
"enabled": true,  
"mean": 1.639672808468067,  
"id": 3,  
"integral": 57913219,  
"lowerBound": 0,  
"current": 3,  
"startTime": 1579671098013,  
"upperBound": 0,  
"statisticType": 7,  
"dataInfo": {  
"updateOnRequest": false,  
"name": "ActiveCount",  
"platform": "all",  
"zosAggregatable": true,  
"description": "The number of concurrently active threads.",  
"statisticSet": "basic",  
"category": "all",  
"unit": "N/A",  
"aggregatable": true,  
"comment": "The number of concurrently active threads",  
"id": 3,  
"level": 7,  
"type": 5,  
"resettable": true  
},  
"name": "ActiveCount"  
},  
"lowWaterMark": 1,  
"lowerBound": 0,  
"description": "The number of concurrently active threads.",  
"highWaterMark": 7,  
"name": "ActiveCount",  
"upperBound": 0,  
"current": 3,  
"lastSampleTime": 1579706417998  
}  
{  
"lowWaterMark": 1,  
"highWaterMark": 50,  
"current": 8,  
"name": "PoolSize",  
"upperBound": 50,  
"lastSampleTime": 1579699931684,  
"wSImpl": {  
"unit": "N/A",  
"lowWaterMark": 1,  
"current": 8,  
"integral": 208810227,  
"name": "PoolSize",  
"id": 4,  
"statisticType": 7,  
"mean": 7.2418883811221955,  
"lastSampleTime": 1579699931684,  
"startTime": 1579671098013,  
"dataInfo": {  
"resettable": false,  
"unit": "N/A",  
"description": "The average number of threads in a pool.",  
"zosAggregatable": true,  
"aggregatable": true,  
"level": 7,  
"updateOnRequest": false,  
"name": "PoolSize",  
"id": 4,  
"statisticSet": "basic",  
"platform": "all",  
"type": 5,  
"category": "all",  
"comment": "Average number of threads in Pool"  
},  
"upperBound": 50,  
"enabled": true,  
"description": "The average number of threads in a pool.",  
"lowerBound": 50,  
"highWaterMark": 50  
},  
"lowerBound": 50,  
"startTime": 1579671098013,  
"unit": "N/A",  
"description": "The average number of threads in a pool."  
}

---

<div class="post-metadata">

**Author:** ![vmoragar](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@vmoragar](https://discuss.elastic.co/u/vmoragar)\
**Post date:** [January 22, 2020, 3:55pm UTC](https://discuss.elastic.co/t/error-metricset-jolokia-jmx-mbean-properties-must-be-in-the-form-key-value/215778/7 "2020-01-22T15:55:28Z")

</div>

Thanks for all.  
Regards

---

<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 19, 2020, 3:55pm UTC](https://discuss.elastic.co/t/error-metricset-jolokia-jmx-mbean-properties-must-be-in-the-form-key-value/215778/8 "2020-02-19T15:55:28Z")

</div>

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