Camunda Process Outcome Compliance Gate
Start a critical Camunda 8 process, classify its completion HEALTHY, AT_RISK, or UNREACHABLE by its own outcome variable, alert Slack, and optionally retry.
Monitor Cassandra 4.0+ thread pools for blocked and pending tasks to detect cluster saturation and trigger real-time Slack alerts before nodes drop queries.
Apache Cassandra relies on staged event-driven architecture (SEDA) thread pools (such as MutationStage, ReadStage, CompactionExecutor, and Native-Transport-Requests) to handle concurrency, read/write I/O, and background maintenance. Under sudden write bursts, slow storage, or JVM garbage collection pauses, task queues fill up and tasks become blocked, leading to client request drops, elevated P99 latency, and cluster degradation. Cassandra 4.0 introduces the system_views.thread_pools virtual table, exposing in-memory thread pool metrics directly over native CQL without requiring external JMX exporters. This blueprint audits Cassandra thread pools on a schedule, detects backlog accumulation or blocked tasks, logs diagnostic telemetry, and dispatches real-time incident notifications to Slack.
periodic_thread_pool_audit (io.kestra.plugin.core.trigger.Schedule) initiates scheduled monitoring every 5 minutes (shipped disabled for safe onboarding).probe_thread_pools (io.kestra.plugin.cassandra.standard.Query) queries the native CQL virtual table system_views.thread_pools to extract name, active_tasks, pending_tasks, and blocked_tasks with fetchType: FETCH and allowFailure: true.classify_thread_pools (io.kestra.plugin.core.debug.Return) evaluates virtual table outputs using Pebble expressions and jq filters, categorizing the node state as HEALTHY (zero blocked tasks and pending queues within limit), EXHAUSTED (any stage with blocked tasks > 0 or pending tasks > max_pending_threshold), or UNREACHABLE (connection failure or empty output).route_by_saturation (io.kestra.plugin.core.flow.Switch) routes downstream actions based on the evaluated state:HEALTHY: logs cluster stability and pool counts via log_healthy_pools.EXHAUSTED: sends an incident alert to Slack with the offending stage details via alert_thread_pool_exhaustion and emits remediation runbook instructions through log_exhaustion_telemetry.UNREACHABLE: dispatches a node connectivity alert via alert_unreachable_node and records a warning log.audit_sentinel_run (io.kestra.plugin.core.log.Log) produces a structured execution recap tracking the inspected host, datacenter, pool count, and classification verdict.handle_execution_failure in the flow-level errors handler catches unhandled workflow execution errors and notifies Slack.system_views.thread_pools).Operating Cassandra at scale requires continuous visibility into internal stage queues, but traditional monitoring often depends on fragile JMX exporters, Jolokia sidecars, or complex external scraping stacks that require daemon maintenance. Orchestrating thread pool health checks directly through Kestra provides:
jq transformations to classify multi-stage metrics into actionable operational states without maintaining glue code.cassandra:4.1).SLACK_WEBHOOK_URL: Slack Incoming Webhook URL used by SlackIncomingWebhook to send incident and probe failure notifications.CASSANDRA_USERNAME: (Optional) Administrative CQL username if authentication is enabled on the cluster.CASSANDRA_PASSWORD: (Optional) Administrative CQL password corresponding to CASSANDRA_USERNAME.SLACK_WEBHOOK_URL (or provide it via the slack_webhook flow input).PasswordAuthenticator), configure CASSANDRA_USERNAME and CASSANDRA_PASSWORD in Kestra Secrets and add credentials to session.periodic_thread_pool_audit trigger to start continuous 5-minute automated sentinel monitoring.nodetool setconcurrency or adjusts dynamic compaction throughput when specific thread pools spike.ForEach loop iterating over all coordinator and replica node IPs in the cluster.io.kestra.plugin.pagerduty.Incident for critical EXHAUSTED alerts occurring during peak business hours.