This extension works only with the Java agent.
##Use Case
Apache Cassandra is an open source distributed database management system. The Cassandra monitoring extension captures statistics from the Cassandra server and displays them in the AppDynamics Metric Browser.
Metrics include:
- Cache size, capacity, hit count, hit rate, request count
- Total latency, statistics, timeout requests, unavailable requests
- Bloom filter disk space used, false positives, false ratio
- SSTables compression ratio, live tables, disk space, compacted row size
- Row size histogram
- Column count histogram
- Memtable columns, data size, switch count
- Pending tasks
- Read latency
- Write latency
- Pending and completed tasks
- Compaction tasks pending and completed
- Timeouts
- Dropped messages
- Streams
- Total disk space used
- Thread pool tasks: active, completed, blocked, pending
##Installation
- Run 'ant package' from the cassandra-monitoring-extension directory
- Deploy the file CassandraMonitor.zip found in the 'dist' directory into <machineagent install dir>/monitors/
- Unzip the deployed file
- Open <machineagent install dir>/monitors/CassandraMonitor/monitor.xml and configure the Cassandra credentials
- If there are additional Cassandra servers that need to be monitored, add the additional credentials to <machineagent install dir>/monitors/CassandraMonitor/properties.xml
- Restart the machineagent
- In the AppDynamics Metric Browser, look for: Application Infrastructure Performance | <Tier> | Custom Metrics | Cassandra | <DB name>
##Directory Structure
File/Folder | Description |
---|---|
conf | Contains the monitor.xml and properties.xml |
lib | Contains Third-party project references |
src | Contains source code to Cassandra Custom Monitor |
dist | Only obtained when using ant. Run 'ant build' to get binaries. Run 'ant package' to get the distributable .zip file |
build.xml | Ant build script to package the project (required only if changing Java code) |
Main Java File: src/main/java/com/appdynamics/monitors/cassandra/CassandraMonitor.java -> This file contains metric printing. src/main/java/com/appdynamics/monitors/cassandra/CassandraCommunicator.java -> This file contains metric parsing.
##Configuration
Parameter | Description | Optional |
---|---|---|
DBname | Custom name for database | Yes |
Host | Cassandra DB Host | No |
Port | Cassandra DB Port | No |
User | Username to access cassandra jmx server | Yes |
Pass | Password to access cassandra jmx server | Yes |
MBean | Statistics bean of cassandra jmx server | Yes |
Filter | Statistics which needs to be filtered | Yes |
###Example Monitor XML
<monitor>
<name>CassandraMonitor</name>
<type>managed</type>
<description>Cassandra monitor</description>
<monitor-configuration></monitor-configuration>
<monitor-run-task>
<execution-style>periodic</execution-style>
<execution-frequency-in-seconds>60</execution-frequency-in-seconds>
<name>Cassandra Monitor Run Task</name>
<display-name>Cassandra Monitor Task</display-name>
<description>Cassandra Monitor Task</description>
<type>java</type>
<execution-timeout-in-secs>60</execution-timeout-in-secs>
<task-arguments>
<!-- Database name (RECOMMENDED)(OPTIONAL)
Name of the database to be shown in Metric Browser.
If left blank, database will have name of 'DB #', where # is the database order number in
credentials list
-->
<argument name="dbname" is-required="false" default-value="" />
<argument name="host" is-required="true" default-value="localhost" />
<argument name="port" is-required="true" default-value="7199" />
<argument name="user" is-required="false" default-value="" />
<argument name="pass" is-required="false" default-value="" />
<argument name="mbean" is-required="false" default-value="org.apache.cassandra.metrics" />
<argument name="filter" is-required="false" default-value="" />
<!-- Additional Cassandra DB credentials (OPTIONAL)
Additional Cassandra DB credentials can be placed in properties.xml
-->
<argument name="properties-path" is-required="false" default-value="monitors/CassandraMonitor/properties.xml" />
</task-arguments>
<java-task>
<classpath>CassandraMonitor.jar;lib/dom4j/dom4j-1.6.1.jar</classpath>
<impl-class>com.appdynamics.monitors.cassandra.CassandraMonitor</impl-class>
</java-task>
</monitor-run-task>
</monitor>
##Metrics
###Cache
Metric Name | Description |
---|---|
Capacity In Bytes | Cache capacity in bytes |
Hits | Cache hit count |
Hit Rate | Cache hit rate |
Requests | Cache request count |
Size | Cache size in bytes |
###Client Request
Metric Name | Description |
---|---|
Latency | Latency statistics |
Total Latency | Total latency in micro seconds |
Timeouts | Total number of timeout requests. More precisely, total number of TimeoutException thrown |
Unavailables | Total number of unavailable requests. More precisely, total number of UnavailableException thrown |
###Column Family
Metric Name | Description |
---|---|
Bloom Filter Disk Space Used | Disk space used by bloom filter |
Bloom Filter False Positives | Number of false positives for bloom filter |
Bloom Filter False Ratio | False positive ratio of bloom filter |
Compression Ratio | Current compression ratio for all SSTables |
Estimated Row Size Histogram | Histogram of estimated row size (in bytes) |
Estimated Column Count Histogram | Histogram of estimated number of columns |
Live Disk Space Used | Disk space used by 'live' SSTables |
Live SS Table Count | Number of 'live' SSTables |
Max Row Size | Size of the largest compacted row |
Mean Row Size | Mean size of compacted rows |
Memtable Columns Count | Total number of columns present in memtable |
Memtable Data Size | Total amount of data stored in memtable, including column-related overhead |
Memtable Switch Count | Number of times flushing has resulted in memtable being switched out |
Min Row Size | Size of the smallest compacted row |
Pending Tasks | Estimated number of tasks pending |
Read Latency | Read latency statistics |
Read Total Latency | Total latency in micro seconds for reads |
Recent Bloom Filter False Positives | Number of false positives since last check |
Recent Bloom Filter False Ratio | False positive ratio since last check |
SSTables Per Read Histogram | Histogram of the number of SSTables accessed per read |
Total Disk Space Used | Total disk space used by SSTables, including obsolete ones waiting to be GC'd |
Write Latency | Write latency statistics |
Write Total Latency | Total latency for writes, in microseconds |
###Commit Log
Metric Name | Description |
---|---|
Completed Tasks | Approximate number of completed tasks |
Pending Tasks | Approximate number of pending tasks |
Total Commit Log Size | Current data size of all commit log segments |
###Compaction
Metric Name | Description |
---|---|
Completed Tasks | Estimated number of completed compaction tasks. |
Pending Tasks | Estimated number of pending compaction tasks. |
Bytes Compacted | Number of bytes compacted since node started. |
Total Compactions Completed | Estimated number of completed compaction tasks. |
###Connection
Metric Name | Description |
---|---|
Total Timeouts | Total number of timeouts occurred for this node. |
###Dropped Message
Metric Name | Description |
---|---|
Dropped | Total number of dropped message for this verb. |
###Streaming
Metric Name | Description |
---|---|
ActiveOutboundStreams | Currently active outbound streams. |
TotalIncomingBytes | Total incoming bytes received since node started. |
TotalOutgoingBytes | Total outgoing bytes sent since node started. |
###Storage
Metric Name | Description |
---|---|
Load | Total disk space used (in bytes) for this node. |
###Thread Pool
Metric Name | Description |
---|---|
Active Tasks | Approximate number of tasks thread pool is actively executing. |
Completed Tasks | Approximate total number of tasks thread pool has completed execution. |
Currently Blocked Tasks | Number of currently blocked tasks. |
Pending Tasks | Approximate number of pending tasks thread pool has. |
Total Blocked Tasks | Total number of blocked tasks since node start up. |
##Contributing
Always feel free to fork and contribute any changes directly via GitHub.
##Community
Find out more in the AppSphere community.
##Support
For any questions or feature request, please contact AppDynamics Center of Excellence.