Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add cassandra munin plugins and dependencies

  • Loading branch information...
commit 61e95ef8fc03d12abbfd1dd51ae8c7774e8791ab 0 parents
James Golick authored
19 README.md
@@ -0,0 +1,19 @@
+Cassandra Munin Plugins
+=======================
+
+These plugins are just configurations for something called jmxquery that I found somewhere. Unfortunately, though, I forget where.
+
+## Installation
+
+Make sure all the files from this repo are in the same directory and that jmx_ is executable. Then in /etc/munin/plugins, create a symlink named after each of the plugin configurations to the jmx_ executable. That's it.
+
+If you take a look at the .conf files, it should be fairly straightforward to figure out how to create your own.
+
+If you have JMX running on a non-standard port (something other than 8080), you can set it in your munin config like this:
+
+ [cassandra_]
+ env.jmxurl service:jmx:rmi:///jndi/rmi://localhost:YOURPORTHERE/jmxrmi
+
+## Credits
+
+Configs by James Golick. I wish I knew who wrote jmxquery so I could credit them here.
10 cassandra_cache_hit_rate_example.conf
@@ -0,0 +1,10 @@
+graph_title Cassandra MyKeyspace.MyCF Row Cache Hit Rate
+graph_vlabel hit rate
+graph_category Cassandra
+
+hits.label hit rate
+hits.jmxObjectName org.apache.cassandra.db:type=Caches,keyspace=MyKeyspace,cache=MyCFRowCache
+hits.jmxAttributeName RecentHitRate
+hits.min 0
+hits.max 1
+hits.graph yes
22 cassandra_cpu.conf
@@ -0,0 +1,22 @@
+graph_args --upper-limit 100 -l 0
+graph_scale no
+graph_title Cassandra CPU Usage
+graph_vlabel 1000* CPU time %
+graph_category Cassandra
+graph_order java_cpu_time java_cpu_user_time
+
+java_cpu_time.label cpu
+java_cpu_time.jmxObjectName java.lang:type=Threading
+java_cpu_time.jmxAttributeName CurrentThreadCpuTime
+java_cpu_time.type DERIVE
+java_cpu_time.min 0
+java_cpu_time.graph yes
+java_cpu_time.cdef java_cpu_time,3000000,/
+
+java_cpu_user_time.label user
+java_cpu_user_time.jmxObjectName java.lang:type=Threading
+java_cpu_user_time.jmxAttributeName CurrentThreadUserTime
+java_cpu_user_time.type DERIVE
+java_cpu_user_time.min 0
+java_cpu_user_time.graph yes
+java_cpu_user_time.cdef java_cpu_user_time,3000000,/
18 cassandra_latency.conf
@@ -0,0 +1,18 @@
+graph_title Cassandra Latency
+graph_vlabel usecs
+graph_category Cassandra
+graph_order read_latency write_latency
+
+read_latency.label read latency
+read_latency.jmxObjectName org.apache.cassandra.service:type=StorageProxy
+read_latency.jmxAttributeName TotalReadLatencyMicros
+read_latency.graph yes
+read_latency.type DERIVE
+read_latency.cdef read_latency,3000000,/
+
+write_latency.label write latency
+write_latency.jmxObjectName org.apache.cassandra.service:type=StorageProxy
+write_latency.jmxAttributeName TotalWriteLatencyMicros
+write_latency.graph yes
+write_latency.type DERIVE
+write_latency.cdef write_latency,3000000,/
44 cassandra_memory.conf
@@ -0,0 +1,44 @@
+graph_title Cassandra Process Memory
+graph_vlabel Bytes
+graph_category Cassandra
+graph_order java_memory_nonheap_committed java_memory_nonheap_max java_memory_nonheap_used java_memory_heap_committed java_memory_heap_max java_memory_heap_used os_memory_physical os_memory_vm
+
+java_memory_nonheap_committed.label non-heap committed
+java_memory_nonheap_committed.jmxObjectName java.lang:type=Memory
+java_memory_nonheap_committed.jmxAttributeName NonHeapMemoryUsage
+java_memory_nonheap_committed.jmxAttributeKey committed
+
+java_memory_nonheap_max.label non-heap max
+java_memory_nonheap_max.jmxObjectName java.lang:type=Memory
+java_memory_nonheap_max.jmxAttributeName NonHeapMemoryUsage
+java_memory_nonheap_max.jmxAttributeKey max
+
+java_memory_nonheap_used.label non-heap used
+java_memory_nonheap_used.jmxObjectName java.lang:type=Memory
+java_memory_nonheap_used.jmxAttributeName NonHeapMemoryUsage
+java_memory_nonheap_used.jmxAttributeKey used
+
+java_memory_heap_committed.label heap committed
+java_memory_heap_committed.jmxObjectName java.lang:type=Memory
+java_memory_heap_committed.jmxAttributeName HeapMemoryUsage
+java_memory_heap_committed.jmxAttributeKey committed
+
+java_memory_heap_max.label heap max
+java_memory_heap_max.jmxObjectName java.lang:type=Memory
+java_memory_heap_max.jmxAttributeName HeapMemoryUsage
+java_memory_heap_max.jmxAttributeKey max
+
+java_memory_heap_used.label heap used
+java_memory_heap_used.jmxObjectName java.lang:type=Memory
+java_memory_heap_used.jmxAttributeName HeapMemoryUsage
+java_memory_heap_used.jmxAttributeKey used
+
+os_memory_physical.label os free mem
+os_memory_physical.jmxObjectName java.lang:type=OperatingSystem
+os_memory_physical.jmxAttributeName FreePhysicalMemorySize
+os_memory_physical.graph no
+
+os_memory_vm.label os vmem committed
+os_memory_vm.jmxObjectName java.lang:type=OperatingSystem
+os_memory_vm.jmxAttributeName CommittedVirtualMemorySize
+os_memory_vm.graph no
10 cassandra_reads.conf
@@ -0,0 +1,10 @@
+graph_title Cassandra Reads
+graph_vlabel reads / ${graph_period}
+graph_category Cassandra
+
+reads.label reads
+reads.jmxObjectName org.apache.cassandra.service:type=StorageProxy
+reads.jmxAttributeName ReadOperations
+reads.type DERIVE
+reads.min 0
+reads.graph yes
10 cassandra_writes.conf
@@ -0,0 +1,10 @@
+graph_title Cassandra Writes
+graph_vlabel writes / ${graph_period}
+graph_category Cassandra
+
+writes.label writes
+writes.jmxObjectName org.apache.cassandra.service:type=StorageProxy
+writes.jmxAttributeName WriteOperations
+writes.type DERIVE
+writes.min 0
+writes.graph yes
56 jmx_
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+# Wildcard-plugin to monitor Java JMX (http://java.sun.com/jmx)attributes.
+# To monitor a # specific set of JMX attributes,
+# link <config_name> to this file. E.g.
+#
+# ln -s /usr/share/plugins/jmx_ /etc/munin/plugins/jmx_java_threads
+#
+
+# ...will monitor Java thread count, assuming java_threads.conf file is located in
+# /etc/munin/plugins folder.
+#
+# For Java process to be monitored, it must expose JMX remote interface.
+# With Java 1.5 it can be done by adding parameters as:
+#
+# -Dcom.sun.management.jmxremote.port=<PORT> -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
+#
+# For Tomcat to be monitored, add the following line in catalina.bat script:
+# set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=<PORT> -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
+#
+# By default, the plugin monitors localhost on <PORT> = 1616 using URL
+# service:jmx:rmi:///jndi/rmi://localhost:1616/jmxrmi
+# with no authentication credentials
+# It can be changed by specifying parameters in /etc/munin/plugin-conf.d/munin-node
+#
+# [jmx_*]
+# env.jmxurl service:jmx:rmi:///jndi/rmi://localhost:1616/jmxrmi
+# env.jmxuser monitorRole
+# env.jmxpass QED
+#
+# Read more on JMX configuring at http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html
+# $Log$
+#
+LINK=`readlink $0`
+CONFIGNAME=`basename $0 | sed 's/^jmx_//g'`.conf
+RDIR=`dirname $LINK`
+
+if [ "$jmxurl" = "" ]; then
+SERVICE=service:jmx:rmi:///jndi/rmi://localhost:8080/jmxrmi
+else
+SERVICE="$jmxurl"
+fi
+
+if [ "$jmxuser" != "" ]; then
+CREDS="--user=$jmxuser --pass=$jmxpass"
+fi
+
+# checks
+test -z $CONFIGNAME || test -z "$RDIR" && exit 1
+
+JMXQUERY="java -jar $RDIR/jmxquery.jar --url=$SERVICE $CREDS --conf=$RDIR/$CONFIGNAME"
+
+case $1 in
+ (config) $JMXQUERY config;;
+ (*) $JMXQUERY ;;
+esac
BIN  jmxquery.jar
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.