DEV Community

Cover image for Monitoring Cassandra Metrics using Grafana

Posted on • Updated on

Monitoring Cassandra Metrics using Grafana


  1. jmx_prometheus_javaagent. (
  2. Sample cassandra.yml configuration for jmx_prometheus_javaagent. (
  3. Prometheus server. (
  4. Grafana Server. (

Steps to follow

  1. Download jmx_prometheus_javaagent jar file.
  2. Download cassandra.yml configuration file for producing jvm and cassandra metrics.
  3. Add JVM_OPTS to file.
  4. JVM_OPTS="$JVM_OPTS javaagent:/etc/cassandra/jmx_prometheus_javaagent-0.10.jar=7070:/etc/cassandra/cassandra.yml"
  5. Restart cassandra server. http://localhost:7070/metrics, this URL provides JVM and cassandra Metrics.
  6. Download Prometheus server.
  7. Add below lines to prometheus.yml for Prometheus server configuration.job_name: ‘cassandra’static_configs:
    • targets: [‘ip:7070’]
  8. Download Grafana Server.
  9. Setup Prometheus data source to Grafana.
  10. Create Metrics dashboard using provided queries in Grafana.
  11. Grafana dashboard is exposed to localhost:3000.
  12. Prometheus server exposed to localhost:9090.


  1. jmx_prometheus_javaagent is to be added to each cassandra node.


Alt Text

How it works

Prometheus scrapes metrics from instrumented jobs, either directly or via an intermediary push gateway for short-lived jobs. It stores all scraped samples locally and runs rules over this data to either aggregate and record new time series from existing data or generate alerts. Grafana or other API consumers can be used to visualize the collected data.


  1. Steps for setting up Cassandra metrics through grafana. (

Sample Image

Alt Text

Top comments (1)

rahuljuspay profile image

Error opening zip file or JAR manifest missing : '/home/rahul/jmx_prometheus_javaagent-0.17.2.jar

How to fix this?