# JMX conf multiple hosts

**URL:** <https://discuss.elastic.co/t/jmx-conf-multiple-hosts/210736>\
**Category:** Logstash\
**Created:** [December 5, 2019, 3:09pm UTC](https://discuss.elastic.co/t/jmx-conf-multiple-hosts/210736 "2019-12-05T15:09:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gidi\_Kalef](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gidi_kalef/32/43651_2.png) [@Gidi\_Kalef](https://discuss.elastic.co/u/Gidi_Kalef)\
**Post date:** [December 5, 2019, 3:09pm UTC](https://discuss.elastic.co/t/jmx-conf-multiple-hosts/210736/1 "2019-12-05T15:09:31Z")

</div>

Hi ,

is it possible to add multiple hosts to jmx.conf:

{  
//Required, JMX listening host/ip  
"host" : "192.168.1.2",  
//Required, JMX listening port  
"port" : 1335,  
//Optional, the username to connect to JMX  
"username" : "user",  
//Optional, the password to connect to JMX  
"password": "pass",  
//Optional, use this alias as a prefix in the metric name. If not set use \_  
"alias" : "test.homeserver.elasticsearch",  
//Required, list of JMX metrics to retrieve  
"queries" : [  
{  
//Required, the object name of Mbean to request  
"object\_name" : "java.lang:type=Memory",  
//Optional, use this alias in the metrics value instead of the object\_name  
"object\_alias" : "Memory"  
}, {  
"object\_name" : "java.lang:type=Runtime",  
//Optional, set of attributes to retrieve. If not set retrieve  
//all metrics available on the configured object\_name.  
"attributes" : ["Uptime", "StartTime"],  
"object\_alias" : "Runtime"  
}, {  
//object\_name can be configured with \* to retrieve all matching Mbeans  
"object\_name" : "java.lang:type=GarbageCollector,name=_",  
"attributes" : ["CollectionCount", "CollectionTime"],  
//object\_alias can be based on specific value from the object\_name thanks to {\<varname\>}. //In this case {type} will be replaced by GarbageCollector...  
"object\_alias" : "{type}.{name}"  
}, {  
"object\_name" : "java.nio:type=BufferPool,name=_",  
"object\_alias" : "{type}.{name}"  
} ]  
}

for example:

host: ["x.x.x.x" , "y.y.y.y"]

---

<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:** [January 2, 2020, 3:09pm UTC](https://discuss.elastic.co/t/jmx-conf-multiple-hosts/210736/2 "2020-01-02T15:09:47Z")

</div>

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