# Jolokia module with variable JMX paths

**URL:** <https://discuss.elastic.co/t/jolokia-module-with-variable-jmx-paths/97470>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [August 17, 2017, 6:45pm UTC](https://discuss.elastic.co/t/jolokia-module-with-variable-jmx-paths/97470 "2017-08-17T18:45:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_van\_Rossum](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@Mark\_van\_Rossum](https://discuss.elastic.co/u/Mark_van_Rossum)\
**Post date:** [August 17, 2017, 6:45pm UTC](https://discuss.elastic.co/t/jolokia-module-with-variable-jmx-paths/97470/1 "2017-08-17T18:45:25Z")

</div>

I'd like to export the number of active sessions in Tomcat. This has a path in JMX that looks like:  
"Tomcat.Manager.[context].localhost.active\_sessions" where [context] is the path for the application.  
e.g.  
"Tomcat.Manager./my-app.localhost.active\_sessions"

All my webapps run in their own JVM so there is only ever 1 entry here, but are on different contexts.  
Is there a way to configure the Metricbeat Jolokia module to import 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:** [September 14, 2017, 6:45pm UTC](https://discuss.elastic.co/t/jolokia-module-with-variable-jmx-paths/97470/2 "2017-09-14T18:45:26Z")

</div>

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