Database Reference
In-Depth Information
For Nagios plugin projects on GitHub, visit
https://github.com/
Nagios plugins for Cassandra
There are a few Cassandra-specific plugins in the Nagios plugins directory. There is a
promising project on GitHub, namely Nagios Cassandra Monitor (
https://github.com/dm-
cnelis/NagiosCassandraMonitor
)
. It seems a little immature but worth evaluating. In this
section, we will use a JMX-based plugin that is not Cassandra-specific. We will use this
plugin to connect to Cassandra nodes and query heap usage. This will tell us about two
things: whether or not it can connect to Cassandra (which can be treated as an indication
of whether or not the Cassandra process is up) and what the heap usage is.
The following are the steps to get the JMX plugin installed (all these operations take place
on the Nagios machine and not on Cassandra nodes):
1. Download the plugins from
http://exchange.nagios.org/directory/Plugins/Java-
2. Untar the downloaded plugin and navigate to the
libexec
directory:
$ tar xvzf check_jmx.tgz
$ cd check_jmx/nagios/plugin/
$ sudo cp check_jmx jmxquery.jar /usr/local/nagios/
libexec/
3. Assign proper ownership and run a test:
$ cd /usr/local/nagios/libexec/
$ sudo chown nagios:nagios check_jmx jmxquery.jar
4. Replace
10.99.9.67
with your Cassandra node:
$ ./check_jmx -U
service:jmx:rmi:///jndi/rmi://10.99.9.67:7199/jmxrmi
-O java.lang:type=Memory -A HeapMemoryUsage -K used
-I HeapMemoryUsage -J used -vvvv -w 4248302272 -c
5498760192
JMX OK
HeapMemoryUsage.used=1217368912{committed=1932525568;init=1953497088;max=1933574144;used=1217368912}