New to Kestra?
Use blueprints to kickstart your first workflows.
Audit enterprise SMB network shares for pipeline stalls, isolate zero-byte files to quarantine folders, and dispatch Slack alerts before downstream ETL fails.
Enterprise batch processing across banking, healthcare, and retail frequently depends on shared Windows and CIFS network storage (SMB) to exchange scheduled transactions, billing data, and partner data drops. When upstream partners fail to deliver expected files or drop incomplete zero-byte payloads, downstream ELT and analytical workloads either fail abruptly or execute against partial data.
This sentinel workflow automates the health verification of SMB network shares. It periodically scans target directories using the Kestra SMB plugin, assesses file counts and payloads against expected delivery windows, classifies pipeline health into tri-state operating tiers (CRITICAL_STALL, WARNING_CORRUPT, or HEALTHY), dispatches actionable Slack incident notifications with root-cause context, isolates problematic files into designated quarantine folders, and records an immutable audit ledger entry.
Schedule trigger wakes the workflow every 15 minutes to inspect the designated SMB incoming directory.io.kestra.plugin.fs.smb.List to retrieve all files matching the configured regular expression pattern, sorting entries chronologically.Labels task evaluates discovered files against expected arrival thresholds and file integrity metrics, assigning an operational status tier.Switch flow-control task routes execution based on the evaluated health tier.io.kestra.plugin.slack.notifications.SlackIncomingWebhook.Move task transfers the offending file out of the active ingestion path into a quarantine directory to prevent downstream pipeline crashes.Log task outputs structured audit telemetry summarizing inspected file counts, execution timestamps, and remediation actions.List, Move, Download, Upload) eliminate external driver installations and complex SMB mounting.SMB_PASSWORD: Service account password for authenticating to the SMB network share (required).SLACK_WEBHOOK_URL: Incoming webhook URL for posting incident notifications to the storage operations channel (required).SMB_PASSWORD and SLACK_WEBHOOK_URL secrets in your Kestra namespace.simulate_local_mode: true) to verify the workflow logic, triage routing, and logging outputs without connecting to an external share.simulate_local_mode: false, update smb_host and smb_share_path to point to your production SMB server, and activate the scheduled trigger.CRITICAL_STALL branch for off-hours escalation.io.kestra.plugin.core.flow.SubflowExecution to automatically launch data warehouse ingestion once the SMB health check confirms a healthy batch.