New to Kestra?
Use blueprints to kickstart your first workflows.
Audits Apache Cassandra pending compaction tasks, alerting DBREs on Slack before SSTable backlog accumulation triggers disk write stalls or read latency.
This blueprint monitors SSTable compaction queues across Apache Cassandra database clusters. Scheduled every 10 minutes, it evaluates pending and active compaction task counts, alerting database reliability engineers on Slack when compaction backlogs surpass critical operating thresholds before disk write stalls degrade client query latency.
periodic_compaction_audit schedule trigger (io.kestra.plugin.core.trigger.Schedule) fires every 10 minutes.audit_compaction_stats task (io.kestra.plugin.scripts.python.Script) inspects cluster compaction health, retrieving pending, active, and completed compaction task metrics.check_compaction_backlog flowable task (io.kestra.plugin.core.flow.If) compares pending compaction task counts against configured warning ceilings.notify_slack_compaction_pressure (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) dispatches an urgent incident alert with actionable tuning recommendations.log_compaction_healthy records confirmed status.export_compaction_manifest task tags the execution with searchable status labels.flowchart TD
A[Schedule: Every 10 Minutes] --> B[audit_compaction_stats: Inspect Compaction Queue]
B --> C{Pending Tasks > Threshold?}
C -- Yes --> D[notify_slack_compaction_pressure: Slack Webhook]
C -- No --> E[log_compaction_healthy: Log Healthy State]
D --> F[export_compaction_manifest: Execution Labels]
E --> F
| Name | Type | Default | Description |
|---|---|---|---|
cassandra_host |
STRING | cassandra-node1.internal |
Hostname or IP address of the target Apache Cassandra cluster node. |
cassandra_jmx_port |
INT | 7199 |
JMX remote monitoring port configured on the Cassandra node. |
max_pending_compaction_tasks_warning |
INT | 50 |
Threshold of pending compaction tasks above which a backlog warning alert is triggered. |
slack_channel |
STRING | #cassandra-dbre-alerts |
Slack channel destination for Cassandra cluster compaction and storage alerts. |
{{ outputs.audit_compaction_stats.vars.cluster_name }}: Identified Cassandra cluster name.{{ outputs.audit_compaction_stats.vars.pending_compaction_tasks }}: Number of pending compaction tasks queued on the node.{{ outputs.audit_compaction_stats.vars.active_compaction_tasks }}: Count of currently executing compaction tasks.{{ outputs.audit_compaction_stats.vars.has_backlog_incident }}: Boolean flag indicating if backlog exceeded threshold.{{ outputs.audit_compaction_stats.outputFiles['cassandra_compaction_report.json'] }}: Structured JSON report containing compaction queue metrics.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_host.compaction_throughput_mb_per_sec to 64 or 128 MB/s; if backlog grows continuously on fast NVMe drives, increase this parameter dynamically using nodetool setcompactionthroughput.nodetool setconcurrentcompactors tuning tasks when pending backlogs exceed critical thresholds.