Single pipeline to monitor multiple java applications (jmx)

hello,

i am trying to use logstash with jmx input plugin, and considering below use case.

if "A" host runs 3 java applications. how can i get jmx metrics from each java application?

as far as i know, i need to run 3 pipelines individually and each logstash pipeline gets from each application, but would make it with only single logstash to get from multiple java applications.

is it possible to set multiple "host", "port" in one jmx input(or jmx configuration file)?

thank you!

below is current my logstash pipeline and jmx.conf

#logstash pipeline
input {
jmx {
path => "/app/logstash/jmx_conf"
polling_frequency => 15
type => "jmx"
nb_thread => 4
}
}
output {
kafka {
bootstrap_servers => "kfk-01:9092"
topic_id => "jmx_mon"
codec => json
}
}

vi ~/jmx_conf/jmx.conf
{
"host" : "java-01",
"port" : 3000,
"queries" : [
{
"object_name" : "java.lang:type=Threading",
"attributes" : [ "ThreadCount" ],
"object_alias" : "ThreadCount"
},
{
"object_name" : "java.lang:type=Memory",
"object_alias" : "Memory"
},
{
"object_name" : "java.lang:type=Runtime",
"attributes" : [ "Uptime", "StartTime" ],
"object_alias" : "Runtime"
},
{
"object_name" : "java.lang:type=GarbageCollector,name=*",
"attributes" : [ "CollectionCount", "CollectionTime" ],
"object_alias" : "{type}.{name}"
}
]
}

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