> ## Documentation Index
> Fetch the complete documentation index at: https://mw-docs.middleware.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Cassandra

> Cassandra Integration - Setup & Installation Docs | Middleware

The Cassandra Database Integration provides seamless access to your database performance metrics and enables users to effortlessly visualize crucial insights in a single dashboard. This integration is useful for teams that want to visualize total compaction tasks over time, read/write latency, and storage resource availability.

This integration works by pulling metrics from the database through the Middleware Host Agent. Metrics are ingested by attaching a Java Management Extension (JMX) receiver to your Cassandra cluster and sending your telemetry data to Middleware.

<Note> This integration is only supported for users with the default `AllowAllAuthenticator` authentication permissions. </Note>

# Prerequisites

Middleware Host Agent (MW Agent) must be installed on your local machine. To install the MW Agent, see our [Installation Guide](https://docs.middleware.io/agent-installation/overview).

# Setup

### Step 1: Access Integrations

Login to your Middleware account, navigate to the Installations page in the bottom left corner, select All Integrations and click Cassandra:

<img src="https://mintcdn.com/middlewareio/FRByFw9jxvH788uu/images/integration/cassandra-integration-page.png?fit=max&auto=format&n=FRByFw9jxvH788uu&q=85&s=d28cc3bbbd68c03ce4df0ff554b6cb6a" width="1563" height="684" data-path="images/integration/cassandra-integration-page.png" />

### Step 2: Connect Cassandra Instance

To access Cassandra metrics, choose a host to connect to your Cassandra Cluster:

<Note>Hosts will only show up in this list if they have a running Host Agent</Note>

<img src="https://mintcdn.com/middlewareio/FRByFw9jxvH788uu/images/integration/cassandra-host.png?fit=max&auto=format&n=FRByFw9jxvH788uu&q=85&s=6029eed60d03fb926e0255363cecb643" width="358" height="287" data-path="images/integration/cassandra-host.png" />

### Step 3: Configure Your Host

Configure your host to connect to the IP address and JMX port of your Cassandra Cluster:

<img src="https://mintcdn.com/middlewareio/FRByFw9jxvH788uu/images/integration/cassandra-connectivity.png?fit=max&auto=format&n=FRByFw9jxvH788uu&q=85&s=72a0736c10d8d9241d15b2b39acd07a9" width="442" height="285" data-path="images/integration/cassandra-connectivity.png" />

<Note> The default port for your Cassandra instance is `7199` </Note>

# Visualize Your Data

### Default Cassandra Dashboard

Quickly access your Cassandra data with Middleware’s default Cassandra dashboard. Navigate to the Dashboard Builder and select the ***Cassandra - Metrics*** Dashboard

<img src="https://mintcdn.com/middlewareio/FRByFw9jxvH788uu/images/integration/cassandra-dashboard.png?fit=max&auto=format&n=FRByFw9jxvH788uu&q=85&s=28a1d1dd071c57843c7d949198eaf953" width="1849" height="780" data-path="images/integration/cassandra-dashboard.png" />

### Create Cassandra Widgets

Create your own widget from scratch. Navigate to the Dashboard Builder and select the dashboard you would like to create a widget in. Select Add New Widget and choose the ***cassandra*** data source.

<img src="https://mintcdn.com/middlewareio/FRByFw9jxvH788uu/images/integration/cassandra-widget.png?fit=max&auto=format&n=FRByFw9jxvH788uu&q=85&s=57a561e28bd55b6febf96add3c001269" width="294" height="526" data-path="images/integration/cassandra-widget.png" />

<Note> Learn more about creating your own widgets and dashboards in the [Dashboard Builder](https://docs.middleware.io/workflow/custom-dashboard/build-custom-dashboard) section. </Note>

# Metrics Collected

| **Metric**                                         | **Description**                                      |
| :------------------------------------------------- | :--------------------------------------------------- |
| `cassandra.client.request.count`                   | Total count of client requests                       |
| `cassandra.client.request.error.count`             | Count of errors that occurred during client requests |
| `cassandra.client.request.range_slice.latency.50p` | 50th percentile latency for range slice requests     |
| `cassandra.client.request.range_slice.latency.99p` | 99th percentile latency for range slice requests     |
| `cassandra.client.request.range_slice.latency.max` | Maximum latency for range slice requests             |
| `cassandra.client.request.read.latency.50p`        | 50th percentile latency for read requests            |
| `cassandra.client.request.read.latency.99p`        | 99th percentile latency for read requests            |
| `cassandra.client.request.read.latency.max`        | Maximum latency for read requests                    |
| `cassandra.client.request.write.latency.50p`       | 50th percentile latency for write requests           |
| `cassandra.client.request.write.latency.99p`       | 99th percentile latency for write requests           |
| `cassandra.client.request.write.latency.max`       | Maximum latency for write requests                   |
| `cassandra.compaction.tasks.completed`             | Count of completed compaction tasks                  |
| `cassandra.compaction.tasks`                       | Current count of compaction tasks                    |
| `cassandra.storage.load.count`                     | Count of storage loads                               |
| `cassandra.storage.total_hints.count`              | Total count of hints stored                          |
| `cassandra.storage.total_hints.in_progress.count`  | Count of hints currently in progress                 |

# Troubleshooting

<Accordion title="Missing Integrations Menu">
  If you do not see the Integrations Menu in Middleware, that means your account has not been granted `Installation` permissions. Contact your system administrator to add the `Installation` permission to your user role in Settings.
</Accordion>

# Next Steps

* [How to Create Alerts](https://docs.middleware.io/workflow/alerting/setup-alert)
* [Dashboard Basics & Customization](https://docs.middleware.io/workflow/custom-dashboard/dashboard-builder-overview)
* [Custom Telemetry Ingestion](https://docs.middleware.io/open-telemetry/otel-getting-started)
* [Getting Started With Real User Monitoring (RUM)](https://docs.middleware.io/rum/rum-overview)
* [Data Ingestion APIs](https://docs.middleware.io/data-ingestion-apis/opentelemetry-metrics)

<Note> Need assistance or want to learn more about Middleware? Contact us at support\[at]middleware.io. </Note>
