- Top ↑
Cassandra is an open source distributed database management system. We use the Jolokia agent to monitor Cassandra's performance as Cassandra exposes its metrics via JMX. Jolokia connects to a given mbean server and then exposes the server via a REST-like interface, acting as a bridge between JMX and HTTP/JSON.
- Download the Jolokia JVM JAR file.
- Move the downloaded file to the /opt/netuitive-agent/ directory.
- Add the following line to the very end of the cassandra-env.sh file (typically located in /etc/cassandra/conf or /opt/cassandra/conf):
JVM_OPTS="$JVM_OPTS -javaagent:/opt/netuitive-agent/jolokia-jvm-1.3.4-agent.jar"Important When adding this line to your cassandra-env.sh file, ensure that the quotes are not automatically formatted to be smart quotes. Smart quotes will prevent Cassandra from starting.Note If you're running Cassandra in a container, you'll need to add -javaagent:/opt/agent.jar=port=8778,host=0.0.0.0 to the end of the line above.
- Restart Cassandra, and confirm Jolokia is running by accessing http://localhost:8778/jolokia/
- After installing Jolokia, navigate to the collectors folder. The default location is /opt/netuitive-agent/conf/collectors.
- Open the CassandraJolokiaCollector.conf file.
- Change the enabled setting to True, save the file, and restart the Linux agent.
Additional Configuration Options
Due to the sheer volume of Cassandra metrics, the individual metrics won't be documented here. Instead, here are some general properties of the groups of metrics:
- All metrics share the following properties:
- Type: GAUGE
- Statistic: average
- Min: 0
- Sparse Data Strategy: None
- For metrics that end with Latency.OneMinuteRate:
- Unit = ms (milliseconds)
- For OneMinuteRate metrics that are not Latency:
- Unit = ops (operations per second)
- For metrics that contain HeapSize, DataSize, DiskSpace, Memory, or RowSize:
- Unit = bytes
- For metrics ending with HitRate or Ratio:
- Unit = percentunit (i.e. percentage represented as a value between 0 and 1)
- Max = 1