PVCWatch - Kubernetes stuck PersistentVolumeClaim watcher
Watches Kubernetes PVCs and alerts on Slack when one gets stuck in Pending.
Audit ScyllaDB materialized view build status with Kestra. Detect view synchronization failures and dispatch automated Slack incident alerts.
ScyllaDB Materialized Views allow developers to query base table data using alternative
partition keys without maintaining dual-write pipelines in application code. When base tables
receive writes, ScyllaDB asynchronously generates and streams view updates in the background.
During cluster node additions, heavy compaction loads, or network blips, view generation can
stall or enter a FAILED state in ScyllaDB's internal system.view_build_status metadata.
When a view build fails or falls behind, queries routed to the materialized view silently return
incomplete or stale results, violating application data consistency.
This blueprint implements an automated Day 2 Operations sentinel that queries ScyllaDB on a
recurring schedule. It reads the cluster-wide system.view_build_status table via native CQL,
evaluates whether all materialized views have achieved SUCCESS state, identifies lagging or
unsuccessful builds, and automatically dispatches Slack incident alerts with operational
guidance to database administrators before stale data affects end-user workloads.
periodic_view_audit (io.kestra.plugin.core.trigger.Schedule) triggers the audit pass every 6 hours (shipped disabled for safe initial onboarding).probe_view_build_status (io.kestra.plugin.scylladb.Query) executes a CQL query against the internal system.view_build_status table with fetchType: FETCH, retrieving the build state for every materialized view across the cluster.evaluate_view_status (io.kestra.plugin.core.flow.Switch) applies a Pebble condition to verify whether any materialized view has a status other than SUCCESS.HEALTHY), log_views_healthy records that all views report SUCCESS along with total view counts.VIEW_BUILD_DEGRADED), alert_view_degraded dispatches an urgent alert to Slack using io.kestra.plugin.slack.notifications.SlackIncomingWebhook, and log_remediation_guidance logs actionable recovery steps.log_audit_completion writes a final audit recap for execution tracking and compliance lineage.errors block alerts Slack immediately if CQL authentication or node connectivity fails.nodetool rebuild_view).Monitoring ScyllaDB internal system tables with standalone cron scripts requires managing CQL driver binaries, credential rotation, connection pool lifecycle, and alerting webhooks in brittle custom infrastructure. Kestra provides a declarative workflow engine with native ScyllaDB CQL support, centralized secret management, conditional branching, execution history, and native Slack integrations without maintaining separate monitoring daemons.
system keyspace.To run ScyllaDB locally for development and testing without host port conflicts:
docker run -d --name scylla-dev -p 9042:9042 scylladb/scylla:5.2 \
--smp 1 --memory 1G --overprovisioned 1
If Kestra is running inside a Docker network, connect the ScyllaDB container to Kestra's network:
docker network ls
docker network connect YOUR_KESTRA_NETWORK scylla-dev
SCYLLADB_USERNAME: Username for ScyllaDB cluster authentication (leave blank if authentication is disabled in dev).SCYLLADB_PASSWORD: Password for ScyllaDB cluster authentication.SLACK_WEBHOOK: Incoming Webhook URL for Slack alerting.Note for Kestra Open-Source (OSS): Secrets are configured as base64-encoded environment variables formatted as
SECRET_<NAME>(e.g.SECRET_SCYLLADB_PASSWORD).
| Name | Type | Default | Allowed Values | Description |
|---|---|---|---|---|
contact_points |
STRING | "localhost:9042" |
Comma-separated host:port | ScyllaDB node contact points |
local_datacenter |
STRING | "datacenter1" |
String identifier | Local datacenter for load balancing |
remediation_mode |
SELECT | "ALERT_ONLY" |
"ALERT_ONLY", "LOG_GUIDANCE" |
Action mode on view build degradation |
{{ outputs.probe_view_build_status.rows }}: List of rows from system.view_build_status containing keyspace_name, view_name, and status.{{ outputs.probe_view_build_status.size }}: Total number of materialized view records audited.SCYLLADB_USERNAME, SCYLLADB_PASSWORD, and SLACK_WEBHOOK in your Kestra namespace secrets.contact_points pointing to your cluster to verify connectivity and view status retrieval.periodic_view_audit schedule trigger to run automated recurring audits.io.kestra.plugin.scripts.shell.Commands to execute nodetool rebuild_view over SSH or JMX upon build failure.VIEW_BUILD_DEGRADED branch for critical consumer-facing views.io.kestra.plugin.core.flow.Subflow to pause upstream batch loading jobs until materialized views finish synchronization.connection.localDatacenter (e.g., datacenter1 or us-east-1). Providing an invalid datacenter name will cause initial connection failure.system.view_build_status returns zero rows. The Pebble condition safely defaults to HEALTHY.