# Metric beat jolokia module cannot read attribute "Value"

**URL:** <https://discuss.elastic.co/t/metric-beat-jolokia-module-cannot-read-attribute-value/92190>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [July 7, 2017, 2:20am UTC](https://discuss.elastic.co/t/metric-beat-jolokia-module-cannot-read-attribute-value/92190 "2017-07-07T02:20:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hacktopia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hacktopia/32/19836_2.png) [@hacktopia](https://discuss.elastic.co/u/hacktopia)\
**Post date:** [July 7, 2017, 2:20am UTC](https://discuss.elastic.co/t/metric-beat-jolokia-module-cannot-read-attribute-value/92190/1 "2017-07-07T02:20:10Z")

</div>

Jolokia agent version: "1.3.6"  
METRICBEAT\_VERSION=6.0.0-alpha1

I get the following error message while trying to read kafka jmx metric from jolokia  
**Error:**  
`"message": "1 error: No key found for metric: 'kafka.controller:name=ActiveControllerCount,type=KafkaController_Value', skipping..."`

This happens only with attributes called **Value**. Other attributes like **Count** work just fine.

```
jmx.mappings:
    - mbean: 'kafka.server:name=TotalProduceRequestsPerSec,type=BrokerTopicMetrics'
      attributes:
        - attr: Count
          field: broker.topic.count
    - mbean: 'kafka.server:name=MessagesInPerSec,type=BrokerTopicMetrics'
      attributes:
        - attr: MeanRate
          field: broker.messages_per_sec.meanRate
        - attr: RateUnit
          field: broker.messages_per_sec.rateUnit
    - mbean: 'kafka.controller:type=KafkaController,name=ActiveControllerCount'
      attributes:
        - attr: Value
          field: broker.active_controller.count
```

---

<div class="post-metadata">

**Author:** ![hacktopia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hacktopia/32/19836_2.png) [@hacktopia](https://discuss.elastic.co/u/hacktopia)\
**Post date:** [July 7, 2017, 10:52pm UTC](https://discuss.elastic.co/t/metric-beat-jolokia-module-cannot-read-attribute-value/92190/2 "2017-07-07T22:52:50Z")

</div>

Update:  
Using metricbeat version 6.0.0-alpha2 changes the error message to:  
`	"message": "1 error: metric key '' not found in response" `

And the response looks like:

```
[jolokia.jmx] The response body from jolokia host 10.61.12.192:8778 is: [  
   {  
      "request":{  
         "mbean":"kafka.server:name=TotalProduceRequestsPerSec,type=BrokerTopicMetrics",
         "attribute":"Count",
         "type":"read"
      },
      "value":{  
         "Count":0
      },
      "timestamp":1499467454,
      "status":200
   },
   {  
      "request":{  
         "mbean":"kafka.controller:name=ActiveControllerCount,type=KafkaController",
         "type":"read"
      },
      "value":{  
         "Value":1
      },
      "timestamp":1499467454,
      "status":200
   }
]
```

---

<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:** [July 10, 2017, 12:20pm UTC](https://discuss.elastic.co/t/metric-beat-jolokia-module-cannot-read-attribute-value/92190/3 "2017-07-10T12:20:10Z")

</div>

One difference I spotted in your config is that for Value you have:

```auto
- mbean: 'kafka.controller:type=KafkaController,name=ActiveControllerCount'

```

But for count you have:

```auto
- mbean: 'kafka.server:name=TotalProduceRequestsPerSec,type=BrokerTopicMetrics'

```

Shouldn't name and type be the other way around?

---

<div class="post-metadata">

**Author:** ![hacktopia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hacktopia/32/19836_2.png) [@hacktopia](https://discuss.elastic.co/u/hacktopia)\
**Post date:** [July 10, 2017, 5:55pm UTC](https://discuss.elastic.co/t/metric-beat-jolokia-module-cannot-read-attribute-value/92190/4 "2017-07-10T17:55:12Z")

</div>

I've tried both configuratoins but that didn't seem to change anything.

Update: That actually worked in alpha2 version. Thanks a lot.

---

<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:** [July 18, 2017, 6:17am UTC](https://discuss.elastic.co/t/metric-beat-jolokia-module-cannot-read-attribute-value/92190/5 "2017-07-18T06:17:49Z")

</div>

Glad do hear it's working.

---

<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:** [August 15, 2017, 6:18am UTC](https://discuss.elastic.co/t/metric-beat-jolokia-module-cannot-read-attribute-value/92190/6 "2017-08-15T06:18:11Z")

</div>

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