New to Kestra?
Use blueprints to kickstart your first workflows.
Audits Apache Cassandra keyspaces for tables with high tombstone accumulation risks, alerting database administrators on Slack before read timeouts occur.
This blueprint acts as an automated reliability guardian for Apache Cassandra clusters. Scheduled weekly, it queries system schema metadata across target keyspaces, analyzes garbage collection grace periods (gc_grace_seconds), audits compaction strategies, and warns database administrators via Slack before tombstone accumulation triggers query failures or TombstoneOverwhelmingException crashes.
weekly_cassandra_audit trigger (io.kestra.plugin.core.trigger.Schedule) initiates the audit every Sunday at 05:00 UTC.audit_tombstone_density task (io.kestra.plugin.scripts.python.Script) connects to Cassandra nodes using the official Python driver, queries system_schema.tables, and extracts GC and compaction configurations.check_tombstone_risk flowable task (io.kestra.plugin.core.flow.If) branches based on whether any tables flag improper GC grace or delete density risks.notify_slack_dba (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) delivers an incident warning with affected table names and maintenance instructions.log_tables_healthy records confirmed status.export_audit_manifest task tags the execution with searchable status labels.flowchart TD
A[Schedule: Sunday 05:00 UTC] --> B[audit_tombstone_density: Cassandra CQL Driver]
B --> C{Tombstone Risk Detected?}
C -- Yes --> D[notify_slack_dba: Slack Webhook]
C -- No --> E[log_tables_healthy: Log]
D --> F[export_audit_manifest: Execution Labels]
E --> F
TimeWindowCompactionStrategy (TWCS) or LeveledCompactionStrategy (LCS).gc_grace_seconds = 0 are not running in multi-node clusters where zombie data resurfacing could occur.| Name | Type | Default | Description |
|---|---|---|---|
cassandra_contact_points |
STRING | cassandra-node1.internal |
Comma-separated Cassandra node IP addresses or hostnames. |
cassandra_port |
INT | 9042 |
Native CQL protocol communication port. |
keyspace_name |
STRING | production_data |
Target Cassandra keyspace to inspect for tombstone density. |
max_tombstones_per_query_warning |
INT | 1000 |
Tombstone warning limit per table read operation before dispatching an alert. |
slack_channel |
STRING | #cassandra-alerts |
Slack channel destination for database health notifications. |
{{ outputs.audit_tombstone_density.vars.total_tables_audited }}: Number of tables analyzed within keyspace.{{ outputs.audit_tombstone_density.vars.flagged_tables_count }}: Count of tables flagged for tombstone risks.{{ outputs.audit_tombstone_density.vars.has_tombstone_risk }}: Boolean flag indicating cluster health degradation.{{ outputs.audit_tombstone_density.vars.flagged_table_names }}: List of flagged table identifiers.{{ outputs.audit_tombstone_density.outputFiles['cassandra_tombstone_report.json'] }}: Full JSON schema analysis report.system_schema tables.CASSANDRA_USER: Cassandra database authentication username.CASSANDRA_PASSWORD: Cassandra database authentication password.SLACK_WEBHOOK_URL: Slack Incoming Webhook endpoint URL.CASSANDRA_USER, CASSANDRA_PASSWORD, and SLACK_WEBHOOK_URL in your Kestra namespace secrets.cassandra_contact_points and target keyspace in keyspace_name.gc_grace_seconds to 0 on multi-node clusters can cause deleted records to resurface if a node was offline during the delete operation.nodetool garbagecollect across cluster nodes via SSH or remote orchestration tasks.TombstoneScannedHistogram) to observe live read operation tombstone percentiles.