# Jolokia Module Event Field Does not Work

**URL:** <https://discuss.elastic.co/t/jolokia-module-event-field-does-not-work/290464>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [November 29, 2021, 4:44pm UTC](https://discuss.elastic.co/t/jolokia-module-event-field-does-not-work/290464 "2021-11-29T16:44:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrismuzyn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrismuzyn/32/97783_2.png) [@chrismuzyn](https://discuss.elastic.co/u/chrismuzyn)\
**Post date:** [November 29, 2021, 4:44pm UTC](https://discuss.elastic.co/t/jolokia-module-event-field-does-not-work/290464/1 "2021-11-29T16:44:30Z")

</div>

Hi Everyone,  
We are using Metricbeat's Jolokia plugin to autodiscover and then query Jolokia for several metrics from different mbeans.

Per the documentation [here](https://www.elastic.co/guide/en/beats/metricbeat/7.15/metricbeat-metricset-jolokia-jmx.html):

> The `event` setting is optional. Use this setting to group all attributes with the same `event` value into the same event when sending data to Elastic.

However, when given the below config, we still receive 2 separate events in our elasticsearch database, one for Memory and one for Classloading, rather than the single event coalesced under "myEvent". The same occurs when using wildcards for lang:type.

```auto
        jmx.mappings:
          - mbean: "java.lang:type=Memory"
            attributes:
            - attr: HeapMemoryUsage
              field: HeapMemoryUsage
              event: myEvent
          - mbean: "java.lang:type=ClassLoading"
            attributes:
            - attr: LoadedClassCount
              field: LoadedClassCount
              event: myEvent

```

So my question is, is this a bug, or is this intended behavior? I can share my full config if needed. We have observed this on metricbeat versions 6.8 and 7.15.

Thanks,  
Chris

---

<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:** [December 27, 2021, 6:45pm UTC](https://discuss.elastic.co/t/jolokia-module-event-field-does-not-work/290464/2 "2021-12-27T18:45:22Z")

</div>

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