New to Kestra?
Use blueprints to kickstart your first workflows.
Query ScyllaDB's system.large_partitions table on a schedule and alert Slack naming the real keyspace, table, and size of oversized partitions.
A partition that grows past ScyllaDB's own compaction-time size or row-count threshold
gets written to system.large_partitions, ScyllaDB's own standing record of exactly which
keyspace, table, and partition key crossed the line. Nothing in ScyllaDB itself alerts on
new entries in that table, so a large partition, a well known cause of hot spots, slow
compactions, and timeout cascades, can sit there for weeks before anyone notices. This
blueprint reads that table on a schedule, classifies the cluster from what is actually
recorded, and alerts Slack naming the real offender, never a guess.
probe_large_partitions (io.kestra.plugin.scylladb.Query) runs SELECT keyspace_name, table_name, sstable_name, partition_size, rows, compaction_time FROM system.large_partitions, with allowFailure: true so a bad contact point or
credential does not stop the flow before it can be classified as PROBE_FAILED below.classify_large_partition_status (io.kestra.plugin.core.debug.Return) returns
PROBE_FAILED when the probe did not return at all, HEALTHY when the table is empty,
CRITICAL when the largest recorded partition_size is at or above
critical_partition_size_mb (converted to bytes for the comparison), WARNING
otherwise.route_by_large_partition_status (io.kestra.plugin.core.flow.Switch) branches on
that status: HEALTHY logs it, the other three each alert Slack, the WARNING and
CRITICAL alerts name the real keyspace_name, table_name, and partition_size of
the single largest recorded partition, never an invented value. An unexpected value
falls through to a defaults branch that logs it rather than being silently dropped.log_audit_summary always runs last and logs the final classification.errors block posts to Slack if the flow itself fails outside the gate logic
above.system.large_partitions.io.kestra.plugin.scylladb.Query against a real system table, with native CQL
authentication.ScyllaDB records large partitions, it does not notify anyone about them, that gap usually gets filled by a cron job and a hand-rolled alerting script. Kestra replaces that script with a declarative flow: the schedule, the severity classification against your own second threshold, and the Slack alert naming the real offender are all one auditable execution history.
For local testing, the official ScyllaDB Docker image:
docker run --name scylla -d -p 9042:9042 scylladb/scylla:latest --smp 1
--smp 1 limits ScyllaDB to one shard, recommended for a laptop-sized container. Wait
for docker exec -it scylla nodetool status to report UN (up, normal) before
connecting, ScyllaDB takes a little while to finish starting.
Authentication is disabled by default on a fresh ScyllaDB container. To test with
username/password set, enable authenticator: PasswordAuthenticator in
scylla.yaml and restart the container, then connect as the default cassandra /
cassandra superuser account to create your own role.
To actually populate system.large_partitions for testing, lower
compaction_large_partition_warning_threshold_mb well below its 1000MB default in
scylla.yaml, then write and compact a partition past that lowered threshold.
A Slack incoming webhook for alerts.
SCYLLADB_USERNAME, SCYLLADB_PASSWORD: native CQL authentication credentials. Only
required when the cluster has PasswordAuthenticator enabled.
SLACK_WEBHOOK: Slack incoming webhook URL used by the alert tasks and the errors
block.
In Kestra OSS, set these as base64-encoded environment variables, for example
SECRET_SCYLLADB_USERNAME, SECRET_SLACK_WEBHOOK.
| Input | Type | Default | Allowed values |
|---|---|---|---|
contact_points |
STRING | localhost:9042 |
comma-separated host:port list |
local_datacenter |
STRING | datacenter1 |
any datacenter name known to the driver |
critical_partition_size_mb |
INT | 2048 |
any positive integer, in megabytes |
compaction_large_partition_warning_threshold_mb and write a partition past it,
per Prerequisites, so system.large_partitions has at least one row.SLACK_WEBHOOK secret, and the ScyllaDB credentials if authentication is
enabled.WARNING or CRITICAL
naming the real keyspace, table, and size you just created.every_30_minutes trigger.Query against system.large_rows or system.large_cells, ScyllaDB's
equivalent logs for an oversized row or cell within an otherwise normal-sized partition.io.kestra.plugin.core.flow.Loop across contact_points per
cluster if you operate more than one ScyllaDB cluster from one Kestra instance.system.large_partitions is ScyllaDB's own standing log, this blueprint does not clear
or TTL it. A repeated WARNING/CRITICAL across runs can mean the same historical
entry is still being read, not that a new one just appeared. Manage this table's
retention per ScyllaDB's own operational guidance if that distinction matters to you.compaction_large_partition_warning_threshold_mb
(1000MB by default) before it was ever written to this table, critical_partition_size_mb
is a second bar on top of that, not the only line of defense.AllowAllAuthenticator, username/password
are simply ignored until PasswordAuthenticator is explicitly enabled.