# Apache Cassandra Monitoring ## Overview Applications Manager provides out-of-the-box performance metrics and helps you visualize the health and availability of your Apache Cassandra NoSQL database. ## Creating a new Cassandra DB monitor **Supported Versions:** Apache Cassandra 2.0 and above. **Prerequisite:** [Click here](https://www.manageengine.com/products/applications_manager/help/prerequisites-for-applications-manager.html#cassandra) to know about the necessary prerequisites to monitor Apache Cassandra database. **Using the REST API to add a new Cassandra monitor:** [Click here](https://www.manageengine.com/products/applications_manager/help/database-servers.html#cass) To create a Cassandra database server monitor, follow the steps given below: 1. Click on **New Monitor** link. 2. Select **Cassandra**. 3. Specify the **Display Name** of the Cassandra monitor. 4. Enter the **HostName** or **IP Address** of the host where Cassandra server runs. 5. Enter the **JMX Port** where the server is running. By default, it will be 7199 or else check in **cassandra-env.sh** file for the *JMX_PORT*. 6. If you want to discover only this node, disable the option **Discover all nodes in the Cluster**. By default, it is enabled which means all the nodes in the cluster are discovered by default. 7. Check the **Is Authentication Required** field to give the JMX credentials to be used to connect to the Cassandra server. Now enter the **UserName** and **Password** of the credential. 8. Specify the **Polling Interval** in minutes. 9. If you are adding a new monitor from the Central Server, [select a Probe Server](https://www.manageengine.com/products/applications_manager/help/enterprise-admin-server.html#monitor). 10. Choose the **Monitor Group** with which you want to associate the Cassandra server from the combo box (optional). You can choose multiple groups to associate your monitor. 11. Click **Add Monitor(s)**. This discovers the Cassandra server from the network and starts monitoring it. **Note:** In case you are unable to add the monitor even after enabling JMX, try providing the below argument: * -Djava.rmi.server.hostname=[YOUR_IP]* ## Monitored Parameters Click on the individual monitors listed to view the following information in the below tabs: - [Monitor Information](#monitor-information) - [Performance](#performance) - [Pending Tasks](#pending-tasks) - [Cluster Stats](#cluster-stats) - [Messages](#messages) - [Configurations](#configurations) ### Monitor Information This tab displays the basic information like the name of the server, host name, and the JMX port where the server is running. Additional parameters like Token, Gossip Active, Load, Generation No, Uptime, DataCenter, and Rack Name are also displayed. These are the equivalent of the Nodetool result obtained using the command: ``` nodetool.bat/sh -h -p info ``` ### Performance | Parameters | Description | |---|---| | Availability and Performance History | Displays the availability and performance history for the last six hours. | | CPU Usage | Specifies the usage of CPU in percentage. | | Memory Utilization | Specifies the used, free, and total memory of the server in megabytes. | | Exceptions | Count of various exceptions such as not found, invalid, unavailable, timed out, etc. | | Storage Stats | Specifies the storage load in GB. | | Operation Stats | Number of range, read, and write operations per second since executor start. | | Operation Latency | The latency of range, read, and write operations since the last time the attribute was read. | | Bloom Filter False Positives | Number of false positives (occurs when the bloom filter says a non-existent row exists). | | Bloom Filter False Positive Ratio | Fraction of all bloom filter checks resulting in a false positive. | | Bloom Filter Disk Space Used | The size of the bloom filter files on disk. | | Memtable Columns Count | Total number of columns present in memtable. | | Memtable Data Size | Amount of data stored in memtable, including column-related overhead. | | Memtable Switch Count | Number of times flushing results in the memtable being switched out. | | Connected Native Clients | Number of Native Clients currently connected to the server instance. | | Connected Thrift Clients | Number of Thrift Clients currently connected to the server instance. | | Average Range Latency | The average latency per range operation since the last poll. | | Average Read Latency | The average latency per read operation since the last poll. | | Average Write Latency | The average latency per write operation since the last poll. | | Recent Timeouts | Number of read, write, and range slice operation timeouts since the last poll. | ### Pending Tasks | Parameters | Description | |---|---| | Commitlog - Pending Tasks | Number of Commitlog tasks waiting in the queue to be executed. | | Compaction - Pending Tasks | Number of Compaction tasks waiting in the queue to be executed. | | Commands - Pending Tasks | Number of Command tasks waiting in the queue to be executed. | | Responses - Pending Tasks | Number of Response tasks waiting in the queue to be executed. | | Task Statistics of Thread Pools | Status of various stages of thread pools like active and pending tasks, completed and blocked tasks. Equivalent to the Nodetool result using `nodetool.bat/sh -h -p tpstats`. | ### Cluster Stats | Parameters | Description | |---|---| | Cluster Details | Specifies details on live, leaving, moving, joining, and unreachable nodes. | | Cluster Node Details | Health status and storage load (in GB) of the nodes in the cluster. | ### Messages This tab contains the **Dropped Message** and **Message Timeout** statistics. | Parameters | Description | |---|---| | Recent Total Timeouts | Number of timeouts since last poll. | ### Configurations This tab contains the configuration values of files that are part of the **cassandra.yaml** config file. The following metrics and descriptions are grouped by section and include version-based availability. #### Configuration details | Parameters | Description | |---|---| | Load | Total size of the node's data on disk (including all keyspaces). | | Generation No | Timestamp or generation number used for identifying commit logs. | | DataCenter Name | Name of the datacenter this Cassandra node belongs to. | | Rack Name | Name of the rack in which the node resides, used for network topology awareness. | | Compaction Throughput MB Per Second | Maximum throughput allowed for compaction operations. | | Stream Throughput MB Per Second | Maximum throughput for streaming data during operations like bootstrap or repair. | | RPC Timeout in millisecond | Timeout for Remote Procedure Call (RPC) requests in milliseconds. | | Max Hint Window in millisecond | Time window during which hints are stored for unavailable replicas. | | MaxHints In Progress | Maximum number of hint delivery processes allowed to run simultaneously. | | Minimum Compaction Threshold | Minimum number of SSTables that must be eligible to trigger compaction. | | Maximum Compaction Threshold | Maximum number of SSTables allowed to be compacted together. | | Key Cache Save Period In Seconds | Time interval in seconds for saving the key cache to disk. | | Row Cache Save Period In Seconds | Time interval in seconds for saving the row cache to disk. | | Row Cache Keys To Save | Number of keys to retain when saving the row cache. | | Storage Initialized | Indicates if storage services have been initialized on the node. | | RPC Server Running | Indicates whether the RPC server is currently running. | | All Data File Locations | Directories where Cassandra stores data files. | | Commit Log Location | Directory where commit logs are stored. | | Saved Caches Locations | Directory where saved caches are written. | | Joined in cluster | Indicates if the node has joined the Cassandra cluster. | | Release Version | The version of Cassandra running on the node. | | Operation Mode | Current operational mode of the node (e.g., NORMAL, JOINING, LEAVING). | | Removal Status | Status of node removal from the cluster, if applicable. | | Drain Progress | Progress of the drain operation (flushing memtables before shutdown). | | Hinted Handoff Enabled | Indicates whether hinted handoff is enabled for the node. | | Compaction Strategy Class | The class defining the strategy used for SSTable compaction. | | EndpointSnitch - ClassName | The Java class name of the endpoint snitch in use. | #### Database details Includes cache details, dynamic endpoint snitch details, storage proxy details, compaction manager details, index summaries details, and other database-level statistics such as: - Key Cache metrics (hits, requests, size, capacity, save period). - Row Cache metrics (hits, requests, size, capacity, save period). - Storage Proxy operations (read, write, range, latency, timeouts). - Compaction Manager statistics (completed tasks, pending tasks, bytes compacted). - Index summary memory and interval metrics. #### Internal Details Includes stage-wise thread pool statistics such as: - Anti Entropy Stage - Commit Log Archiver - Gossip Stage - Internal Response Stage - Memtable Post Flush - Migration Stage - Pending Range Calculator - Validation Executor - Cache Cleanup Executor - Compaction Executor - Hinted Handoff - Memtable Flush Writer - Memtable Reclaim Memory - Misc Stage - Sampler Each stage provides: - Active Count - Pending Tasks - Blocked Tasks - Currently Blocked Tasks #### Request Details Includes: - Counter Mutation Stage - Read Repair Stage - Request Response Stage - Mutation Stage - Read Stage Each stage includes Active Count, Pending Tasks, Blocked Tasks, and Currently Blocked Tasks. #### General details Includes: - CQL Prepared Statement statistics. - CAS Write and CAS Read metrics (failures, latency, timeouts, unavailables). - Read and Write performance metrics (latency, timeouts, unavailables). - Commit Log metrics (size, completed tasks, wait times). - Dropped Message statistics. - Compaction details. #### KeySpace Details Includes: - Keyspace latency metrics (read/write latency, 99th percentile, total latency). - Memtable details (heap/off-heap data size, columns count, switch count). #### KeySpace Storage Details Includes: - Live Disk Space Used. - Live Scanned Histogram. - SSTables per Read Histogram. - Tombstone Scanned Histogram. - Bloom Filter disk and memory usage. - Index Summary off-heap memory usage.