# Logstash JMX input plugin cannot load Cassandra configuration

**URL:** https://discuss.elastic.co/t/logstash-jmx-input-plugin-cannot-load-cassandra-configuration/289273
**Category:** Logstash
**Created:** [November 16, 2021, 7:36am UTC](https://discuss.elastic.co/t/logstash-jmx-input-plugin-cannot-load-cassandra-configuration/289273 "2021-11-16T07:36:41Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Erkan\_SIRIN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/erkan_sirin/32/96635_2.png) [@Erkan\_SIRIN](https://discuss.elastic.co/u/Erkan_SIRIN)
#### Post date: [November 16, 2021, 7:36am UTC](https://discuss.elastic.co/t/logstash-jmx-input-plugin-cannot-load-cassandra-configuration/289273/1 "2021-11-16T07:36:41Z")

</div>

I am trying to get Cassandra metrics through logstash jmx input. My logstash pipeline conf:

```auto
/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 :

```auto
{
      "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:

```auto
[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"}

```

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [November 16, 2021, 5:57pm UTC](https://discuss.elastic.co/t/logstash-jmx-input-plugin-cannot-load-cassandra-configuration/289273/2 "2021-11-16T17:57:40Z")

</div>

What is your question?

---

<div class="post-metadata">

### Author: ![Erkan\_SIRIN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/erkan_sirin/32/96635_2.png) [@Erkan\_SIRIN](https://discuss.elastic.co/u/Erkan_SIRIN)
#### Post date: [November 22, 2021, 7:02am UTC](https://discuss.elastic.co/t/logstash-jmx-input-plugin-cannot-load-cassandra-configuration/289273/3 "2021-11-22T07:02:33Z")

</div>

The question is why this info logs continue indefinitely?

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [November 22, 2021, 5:04pm UTC](https://discuss.elastic.co/t/logstash-jmx-input-plugin-cannot-load-cassandra-configuration/289273/4 "2021-11-22T17:04:10Z")

</div>

> [@Erkan\_SIRIN](#):
>
> The question is why this info logs continue indefinitely?

The main run function sits in a loop loading the configuration, logging this message, and calling thread\_jmx. The thread\_jmx [function](https://github.com/logstash-plugins/logstash-input-jmx/blob/10b465fce60726958e2fb4fa3e59722d222ded39/lib/logstash/inputs/jmx.rb#L201) also loops. If you enable log.level debug it should be a lot easier to determine what path the code is taking.

---

<div class="post-metadata">

### Author: ![almteref](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/almteref/32/97409_2.png) [@almteref](https://discuss.elastic.co/u/almteref)
#### Post date: [November 22, 2021, 7:24pm UTC](https://discuss.elastic.co/t/logstash-jmx-input-plugin-cannot-load-cassandra-configuration/289273/5 "2021-11-22T19:24:20Z")

</div>

I think you can use Jolokia to extract the metrics of Cassandra to the Rest API and run the metricbeat agent with enable jolokia module.

---

<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 20, 2021, 7:25pm UTC](https://discuss.elastic.co/t/logstash-jmx-input-plugin-cannot-load-cassandra-configuration/289273/6 "2021-12-20T19:25:03Z")

</div>

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