Cluster State
The cluster state virtual tables provide visibility into gossip protocol state, pending hints, and internode communication metrics.
gossip_info
Section titled “gossip_info”Exposes gossip state for all known nodes in the cluster. Provides the same information as nodetool gossipinfo via CQL.
Schema
Section titled “Schema”VIRTUAL TABLE system_views.gossip_info ( address inet, port int, dc text, rack text, hostname text, status text, load text, host_id text, release_version text, "schema" text, generation int, heartbeat int, -- Additional columns for each ApplicationState (lowercase) -- e.g., tokens, severity, net_version, etc. -- Plus <state>_version columns for each state PRIMARY KEY (address, port)) WITH CLUSTERING ORDER BY (port ASC)| Column | Type | Description |
|---|---|---|
address | inet | Node IP address |
port | int | Storage port |
hostname | text | Node hostname |
dc | text | Datacenter name |
rack | text | Rack name |
status | text | Node status (NORMAL, LEAVING, JOINING, MOVING) |
load | text | Data load on node (bytes) |
host_id | text | Unique node identifier (UUID) |
release_version | text | Cassandra version |
schema | text | Schema version UUID |
generation | int | Gossip generation number |
heartbeat | int | Current heartbeat version |
Dynamic Columns
The gossip_info table includes a column for each ApplicationState (lowercase names), plus a <state>_version column for each state tracking the gossip version of that state.
Equivalent nodetool command: nodetool gossipinfo
Basic Queries
Section titled “Basic Queries”-- Cluster overviewSELECT address, dc, rack, status, release_version, loadFROM system_views.gossip_info;Count nodes per datacenter in application.
Health Monitoring
Section titled “Health Monitoring”-- Find nodes not in NORMAL stateSELECT address, dc, rack, statusFROM system_views.gossip_infoWHERE status != 'NORMAL';
-- Schema versions (check for agreement)SELECT address, "schema"FROM system_views.gossip_info;
-- Cassandra versionsSELECT address, release_versionFROM system_views.gossip_info;Group by schema version or release_version in application. Multiple schema versions indicate disagreement.
Topology Information
Section titled “Topology Information”-- Datacenter and rack layoutSELECT dc, rack, address, statusFROM system_views.gossip_info;
-- Node load distributionSELECT address, dc, loadFROM system_views.gossip_info;Sort by dc/rack or by load in application as needed.
pending_hints
Section titled “pending_hints”Shows pending hints this node holds for other nodes. Hints accumulate when target nodes are unreachable.
Schema
Section titled “Schema”VIRTUAL TABLE system_views.pending_hints ( host_id uuid PRIMARY KEY, address inet, dc text, rack text, files int, oldest timestamp, newest timestamp, port int, status text, total_size bigint, corrupted_files int, total_corrupted_files_size bigint)| Column | Type | Description |
|---|---|---|
host_id | uuid | Target node's host ID |
address | inet | Target node's address |
dc | text | Target datacenter |
rack | text | Target rack |
files | int | Number of hint files pending |
total_size | bigint | Total size of pending hints (bytes) |
oldest | timestamp | Timestamp of oldest pending hint |
newest | timestamp | Timestamp of newest pending hint |
status | text | Hint delivery status |
corrupted_files | int | Number of corrupted hint files |
total_corrupted_files_size | bigint | Total size of corrupted hint files (bytes) |
Equivalent nodetool command: nodetool listpendinghints
Basic Queries
Section titled “Basic Queries”-- All pending hintsSELECT host_id, address, dc, files, oldest, newest, statusFROM system_views.pending_hints;
-- Hints accumulating (nodes potentially down)SELECT address, dc, files, oldestFROM system_views.pending_hintsWHERE files > 0;Age Analysis
Section titled “Age Analysis”-- Hints older than 1 hour (potential problem)SELECT address, dc, files, oldestFROM system_views.pending_hintsWHERE oldest < toTimestamp(now()) - 3600s;Hint Window
Hints are only stored for max_hint_window (default: 3 hours). If a node is down longer:
- Hints stop accumulating after the window
- The node will need repair when it returns
- Check
oldesttimestamp to understand hint coverage
internode_inbound
Section titled “internode_inbound”Statistics for incoming connections from other nodes.
Schema
Section titled “Schema”VIRTUAL TABLE system_views.internode_inbound ( address inet, port int, dc text, rack text, received_count bigint, received_bytes bigint, processed_count bigint, processed_bytes bigint, error_count bigint, error_bytes bigint, expired_count bigint, expired_bytes bigint, throttled_count bigint, throttled_nanos bigint, corrupt_frames_recovered bigint, corrupt_frames_unrecovered bigint, scheduled_count bigint, scheduled_bytes bigint, using_bytes bigint, using_reserve_bytes bigint, PRIMARY KEY ((address, port), dc, rack))| Column | Type | Description |
|---|---|---|
address | inet | Remote node address |
received_count | bigint | Messages received |
received_bytes | bigint | Bytes received |
processed_count | bigint | Messages successfully processed |
error_count | bigint | Receive errors |
expired_count | bigint | Messages expired before processing |
throttled_count | bigint | Times throttled due to backpressure |
corrupt_frames_recovered | bigint | Corrupted frames that were recovered |
corrupt_frames_unrecovered | bigint | Unrecoverable corruptions |
Monitoring Queries
Section titled “Monitoring Queries”-- Inbound traffic summarySELECT address, dc, received_count, received_bytes / 1048576 AS received_mb, error_count, throttled_countFROM system_views.internode_inbound;
-- Nodes with errorsSELECT address, error_count, corrupt_frames_unrecoveredFROM system_views.internode_inboundWHERE error_count > 0;internode_outbound
Section titled “internode_outbound”Statistics for outgoing connections to other nodes.
Schema
Section titled “Schema”VIRTUAL TABLE system_views.internode_outbound ( address inet, port int, dc text, rack text, sent_count bigint, sent_bytes bigint, pending_count bigint, pending_bytes bigint, error_count bigint, error_bytes bigint, expired_count bigint, expired_bytes bigint, overload_count bigint, overload_bytes bigint, active_connections bigint, connection_attempts bigint, successful_connection_attempts bigint, using_bytes bigint, using_reserve_bytes bigint, PRIMARY KEY ((address, port), dc, rack))| Column | Type | Description |
|---|---|---|
address | inet | Remote node address |
sent_count | bigint | Messages sent |
sent_bytes | bigint | Bytes sent |
pending_count | bigint | Messages waiting to send |
error_count | bigint | Send errors |
expired_count | bigint | Messages expired before sending |
overload_count | bigint | Messages dropped due to overload |
active_connections | bigint | Current active connections |
connection_attempts | bigint | Total connection attempts |
successful_connection_attempts | bigint | Successful connections |
Monitoring Queries
Section titled “Monitoring Queries”-- Outbound traffic summarySELECT address, dc, sent_count, sent_bytes / 1048576 AS sent_mb, pending_count, error_countFROM system_views.internode_outbound;
-- Connection attemptsSELECT address, connection_attempts, successful_connection_attemptsFROM system_views.internode_outbound;
-- Backpressure indicatorsSELECT address, pending_count, overload_count, expired_countFROM system_views.internode_outboundWHERE pending_count > 100;Calculate failed attempts in application: connection_attempts - successful_connection_attempts.
Alerting Rules
Section titled “Alerting Rules”Node Not Normal
Section titled “Node Not Normal”-- Alert: Nodes in transitional statesSELECT address, dc, statusFROM system_views.gossip_infoWHERE status != 'NORMAL';Schema Disagreement
Section titled “Schema Disagreement”-- Check schema versionsSELECT address, "schema"FROM system_views.gossip_info;Count distinct schema values in application. Alert if more than one unique value.
Hints Accumulating
Section titled “Hints Accumulating”-- Alert: Significant hints pendingSELECT address, dc, files, oldestFROM system_views.pending_hintsWHERE files > 50;Internode Communication Issues
Section titled “Internode Communication Issues”-- Alert: Communication errorsSELECT address, error_count, expired_count, overload_countFROM system_views.internode_outboundWHERE error_count > 0 OR expired_count > 0 OR overload_count > 0;Troubleshooting
Section titled “Troubleshooting”Schema Disagreement
Section titled “Schema Disagreement”Symptoms:
- Multiple schema versions in
gossip_info - DDL operations failing
Resolution:
-- Identify schema versions per nodeSELECT address, "schema"FROM system_views.gossip_info;Group by schema in application to find disagreeing nodes. Then on the affected node(s):
nodetool resetlocalschema # Last resortHints Not Draining
Section titled “Hints Not Draining”Symptoms:
- Pending hints for online node
statusshows issues
Resolution:
- Verify target node is healthy
- Check internode connectivity
- Review
internode_outboundfor that target
High Internode Latency
Section titled “High Internode Latency”Symptoms:
- High
pending_countininternode_outbound - Messages expiring
Resolution:
- Check network between datacenters
- Review
internode_inbound.throttled_counton remote nodes - Consider
internode_compressionsettings
Related Documentation
Section titled “Related Documentation”- Virtual Tables Overview - Introduction to virtual tables
- Repair - Repair tracking tables
- nodetool gossipinfo - Command-line equivalent
- nodetool listpendinghints - Hints command