Configuration
The configuration virtual tables provide CQL access to runtime settings, JVM system properties, and system logs without requiring shell access.
Overview
Section titled “Overview”These tables expose Cassandra's configuration state:
| Table | Purpose |
|---|---|
settings | Current cassandra.yaml settings (runtime values) |
system_properties | JVM system properties |
system_logs | Recent Cassandra log entries |
settings
Section titled “settings”Exposes current Cassandra configuration settings as key-value pairs. This reflects the active runtime configuration, which may differ from cassandra.yaml if settings were changed dynamically.
Schema
Section titled “Schema”VIRTUAL TABLE system_views.settings ( name text PRIMARY KEY, value text) WITH comment = 'current settings';| Column | Type | Description |
|---|---|---|
name | text | Configuration parameter name |
value | text | Current value (as string) |
Equivalent nodetool command: nodetool getconfig (Cassandra 5.0+)
Example Queries
Section titled “Example Queries”-- All settingsSELECT name, value FROM system_views.settings;Filter in application by name pattern (e.g., names containing 'compaction', 'timeout', 'heap').
Common Configuration Checks
Section titled “Common Configuration Checks”-- Cluster identificationSELECT name, value FROM system_views.settingsWHERE name IN ('cluster_name', 'num_tokens', 'partitioner');
-- Network configurationSELECT name, value FROM system_views.settingsWHERE name IN ('listen_address', 'rpc_address', 'broadcast_address', 'native_transport_port', 'storage_port');
-- Compaction settings (setting name varies by version - see table below)SELECT name, value FROM system_views.settingsWHERE name IN ('compaction_throughput', 'concurrent_compactors', 'compaction_large_partition_warning_threshold');
-- Read/write settingsSELECT name, value FROM system_views.settingsWHERE name IN ('read_request_timeout', 'write_request_timeout', 'range_request_timeout', 'counter_write_request_timeout');
-- Hinted handoff (setting name varies by version - see table below)SELECT name, value FROM system_views.settingsWHERE name IN ('hinted_handoff_enabled', 'max_hint_window', 'hinted_handoff_throttle', 'max_hints_delivery_threads');
-- Commit logSELECT name, value FROM system_views.settingsWHERE name IN ('commitlog_sync', 'commitlog_sync_period', 'commitlog_segment_size', 'commitlog_total_space');
-- Memtable configuration (setting name varies by version - see table below)SELECT name, value FROM system_views.settingsWHERE name IN ('memtable_heap_space', 'memtable_offheap_space', 'memtable_allocation_type', 'memtable_flush_writers');Setting Name Changes by Version
Section titled “Setting Name Changes by Version”Configuration setting names changed between Cassandra versions. Use the appropriate name for the target version:
| Setting | Pre-4.1 | 4.1+ |
|---|---|---|
| Compaction throughput | compaction_throughput_mb_per_sec | compaction_throughput |
| Stream throughput | stream_throughput_outbound_megabits_per_sec | stream_throughput_outbound |
| Inter-DC stream throughput | inter_dc_stream_throughput_outbound_megabits_per_sec | inter_dc_stream_throughput_outbound |
| Hinted handoff throttle | hinted_handoff_throttle_in_kb | hinted_handoff_throttle |
| Memtable heap space | memtable_heap_space_in_mb | memtable_heap_space |
| Memtable offheap space | memtable_offheap_space_in_mb | memtable_offheap_space |
Duration and Size Literals
In Cassandra 4.1+, settings support duration literals (3h, 200ms) and size/rate units (64MiB, 16MiB/s). The old _in_ms, _in_mb, and _in_kb suffixed names are deprecated but still functional as aliases.
Configuration Audit
Section titled “Configuration Audit”-- Check authentication/authorization settingsSELECT name, value FROM system_views.settingsWHERE name IN ('authenticator', 'authorizer', 'role_manager', 'server_encryption_options', 'client_encryption_options');Security check: Verify authenticator is not AllowAllAuthenticator and authorizer is not AllowAllAuthorizer in production.
system_properties
Section titled “system_properties”Exposes JVM system properties relevant to Cassandra. Useful for verifying JVM configuration without shell access.
Schema
Section titled “Schema”VIRTUAL TABLE system_views.system_properties ( name text PRIMARY KEY, value text) WITH comment = 'Cassandra relevant system properties';| Column | Type | Description |
|---|---|---|
name | text | System property name |
value | text | Property value |
Example Queries
Section titled “Example Queries”-- All system propertiesSELECT name, value FROM system_views.system_properties;Filter in application by name prefix (e.g., 'java.', 'cassandra.', 'os.').
Common Property Checks
Section titled “Common Property Checks”-- JVM versionSELECT name, value FROM system_views.system_propertiesWHERE name IN ('java.version', 'java.vendor', 'java.vm.name', 'java.vm.version');
-- Cassandra pathsSELECT name, value FROM system_views.system_propertiesWHERE name IN ('cassandra.config', 'cassandra.storagedir', 'cassandra.logdir');
-- Operating systemSELECT name, value FROM system_views.system_propertiesWHERE name IN ('os.name', 'os.version', 'os.arch');
-- User and file encodingSELECT name, value FROM system_views.system_propertiesWHERE name IN ('user.name', 'user.home', 'user.dir', 'file.encoding');For GC settings and heap configuration, query all properties and filter in application.
system_logs
Section titled “system_logs”Provides access to recent Cassandra log entries via CQL. Available in Cassandra 5.0+.
Schema
Section titled “Schema”VIRTUAL TABLE system_views.system_logs ( timestamp timestamp, order_in_millisecond int, level text, logger text, message text, PRIMARY KEY (timestamp, order_in_millisecond)) WITH CLUSTERING ORDER BY (order_in_millisecond ASC) AND comment = 'Cassandra logs';| Column | Type | Description |
|---|---|---|
timestamp | timestamp | Log entry timestamp |
order_in_millisecond | int | Ordering within same millisecond |
level | text | Log level (ERROR, WARN, INFO, DEBUG, TRACE) |
logger | text | Logger name (class/component) |
message | text | Log message content |
Example Queries
Section titled “Example Queries”-- All log entriesSELECT timestamp, level, logger, messageFROM system_views.system_logs;
-- Error messagesSELECT timestamp, logger, messageFROM system_views.system_logsWHERE level = 'ERROR';
-- Warnings and errorsSELECT timestamp, level, logger, messageFROM system_views.system_logsWHERE level IN ('ERROR', 'WARN');Troubleshooting Queries
Section titled “Troubleshooting Queries”-- All log entriesSELECT timestamp, level, logger, messageFROM system_views.system_logs;Filter in application by logger name or message content (e.g., 'Compaction', 'OutOfMemory').
Monitoring Use Cases
Section titled “Monitoring Use Cases”Configuration Drift Detection
Section titled “Configuration Drift Detection”-- Export current settings for comparison-- Run on each node and compare resultsSELECT name, value FROM system_views.settings;Exclude node-specific values (containing 'address') when comparing across nodes.
Security Audit
Section titled “Security Audit”-- Authentication configurationSELECT name, value FROM system_views.settingsWHERE name IN ('authenticator', 'authorizer', 'role_manager', 'permissions_validity', 'credentials_validity');
-- Encryption settingsSELECT name, value FROM system_views.settingsWHERE name IN ('server_encryption_options', 'client_encryption_options');
-- Audit settings (Cassandra 4.0+)SELECT name, value FROM system_views.settingsWHERE name IN ('audit_logging_options');Removed Settings
native_transport_port_ssl was deprecated in Cassandra 4.x and removed in 5.0. Use client_encryption_options for SSL/TLS configuration.
Performance Configuration Review
Section titled “Performance Configuration Review”-- Thread pool sizing (compare with thread_pools table)SELECT name, value FROM system_views.settingsWHERE name IN ('concurrent_reads', 'concurrent_writes', 'concurrent_counter_writes', 'concurrent_compactors');
-- Cache settings (compare with caches table)SELECT name, value FROM system_views.settingsWHERE name IN ('key_cache_size_in_mb', 'row_cache_size_in_mb', 'counter_cache_size_in_mb');
-- Throughput settings (use version-appropriate names)-- Pre-4.1: compaction_throughput_mb_per_sec, stream_throughput_outbound_megabits_per_sec-- 4.1+: compaction_throughput, stream_throughput_outboundSELECT name, value FROM system_views.settingsWHERE name IN ('compaction_throughput', 'stream_throughput_outbound', 'inter_dc_stream_throughput_outbound');Alerting Rules
Section titled “Alerting Rules”Configuration Warnings
Section titled “Configuration Warnings”-- Security concernsSELECT name, value FROM system_views.settingsWHERE (name = 'authenticator' AND value = 'AllowAllAuthenticator') OR (name = 'authorizer' AND value = 'AllowAllAuthorizer');Error Log Monitoring
Section titled “Error Log Monitoring”-- Recent errors (for alerting integration)SELECT timestamp, logger, messageFROM system_views.system_logsWHERE level = 'ERROR';Filter in application for entries within the last 5 minutes.
Comparison with nodetool
Section titled “Comparison with nodetool”| Information | nodetool Command | Virtual Table Query |
|---|---|---|
| View settings | nodetool getconfig | SELECT * FROM system_views.settings |
| Specific setting | nodetool getconfig <name> | SELECT value FROM system_views.settings WHERE name = '<name>' |
| System properties | N/A (check JVM) | SELECT * FROM system_views.system_properties |
| Logs | Filesystem access | SELECT * FROM system_views.system_logs |
Limitations
Section titled “Limitations”-
Settings table
- Read-only; use
nodetool setconfigfor runtime changes - Values are strings; type conversion may be needed
- Some settings require restart to change
- Read-only; use
-
System properties
- Reflects JVM startup properties
- Cannot be modified at runtime
-
System logs
- Limited retention (recent entries only)
- May not include all log levels depending on configuration
- For full log history, use filesystem access or log aggregation
Related Documentation
Section titled “Related Documentation”- Virtual Tables Overview - Introduction to virtual tables
- Thread Pools - Thread pool configuration and metrics
- Caches - Cache configuration and hit ratios
- Cassandra Configuration - Full configuration reference