Search code examples
cassandrajmx

Cassandra driver not exposing metrics


I created a cassandra cluster and session.

  val newSession = Cluster.builder().addContactPoint("localhost")
            .build().newSession()
    newSession.execute("SELECT * from workout.competitorsentity")
    return newSession

However when I go to the jconsole for this jvm I don't see the cassandra jvm metrics. What am I doing wrong?

enter image description here


Solution

  • You can't see Cassandra metrics in driver - driver exposes only its own metrics, and they are under the cluster1-metrics part of the tree (see driver documentation about metrics for more details).

    If you need to see Cassandra metrics, you need to connect JConsole to Cassandra process(-es) itself (by default they are available only on localhost interface, so you may need to expose them outside if you're connecting from another machine).