I am trying to get Cassandra metrics through logstash jmx input. My logstash pipeline conf:
/etc/logstash/conf.d/cassandra_jmx.conf
input {
jmx {
path => "/etc/logstash/jmxconf"
polling_frequency => 15
type => "jmx"
nb_thread => 4
}
}
output {
elasticsearch {
hosts => ["<elastic_ip>:9200"]
user => "myuser"
password => "mypass"
}
}
/etc/logstash/jmxconf/jmx_config.json :
{
"host" : "my-cassandra-node",
"port" : 7199,
"username" : "my_jmx_user",
"password": "my_jmx_pass",
"alias" : "test.homeserver.elasticsearch",
"queries" : [{
"object_name" : "org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=RequestResponseStage,name=*",
"object_alias" : "${type}.${path}.${scope}.${name}"
}, {
"object_name" : "java.lang:type=Threading",
"object_alias" : "Threading"
}, {
"object_name" : "java.lang:type=Runtime",
"attributes" : [ "Uptime", "StartTime" ],
"object_alias" : "Runtime"
}]
}
Logstash logs:
[2021-11-16T10:21:44,964][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:21:59,974][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:22:14,984][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:22:30,000][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:22:45,012][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:23:00,026][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:23:15,037][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:23:30,077][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:23:45,087][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:24:00,099][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:24:15,109][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:24:30,119][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:24:45,135][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:25:00,149][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:25:15,160][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:25:30,172][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:25:45,184][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:26:00,196][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}
[2021-11-16T10:26:15,205][INFO ][logstash.inputs.jmx ][main][70c0319670d071bebf194cd4cefe30e2af3a41403e29630d54efa022132d965f] Loading configuration files in path {:path=>"/etc/logstash/jmxconf"}