New to Kestra?
Use blueprints to kickstart your first workflows.
Audit server log archives for compression ratio collapse and corruption, verify Zstandard decompression round-trips, and dispatch alerts to Slack.
Enterprise observability stacks and compliance data lakes stage terabytes of web access logs, audit trails, and microservice traces daily before offloading into cold object storage (AWS S3 Glacier, Google Cloud Storage Archive, Azure Blob Archive). High-performance compression algorithms like Zstandard (ZSTD) and GZIP are essential to control cloud egress and storage expenditure.
However, unattended log compression pipelines frequently encounter two severe production failures: silent archive corruption (truncated streams or bad blocks that make disaster recovery impossible) and compression ratio collapse (caused by unannounced binary dumps, encrypted payloads, or runaway stack traces that fail to compress and trigger massive budget overruns).
This sentinel workflow automates the validation and FinOps auditing of cold log archives. Using Kestra native single-file compression tasks (FileCompress and FileDecompress), the flow compresses incoming log batches, validates bidirectional decompression round-trip parity to guarantee zero byte loss, calculates real-time compression ratios against FinOps thresholds, classifies archive health into tri-state operational tiers, isolates corrupted archives into dead-letter quarantine, and dispatches actionable Slack alerts to storage engineering teams.
Schedule trigger awakens the workflow hourly or upon the arrival of new staged log batches.io.kestra.plugin.core.storage.Write.io.kestra.plugin.compress.FileCompress compresses the file using high-performance algorithms such as Zstandard (ZSTD) or GZIP.io.kestra.plugin.compress.FileDecompress immediately expands the compressed artifact, validating that the stream can be decompressed without errors and asserting byte size parity against the raw source.Labels execution task assesses the compression ratio (raw_size / compressed_size) and round-trip size match, categorizing health status into COMPLIANT_ARCHIVE, WARNING_RATIO_COLLAPSE, or CRITICAL_CORRUPTION.Switch flow-control task directs execution: corrupted archives trigger immediate Slack incident alerts and payload quarantine, while compliant archives trigger confirmation of readiness for cold cloud storage tiering.Log task outputs structured audit telemetry detailing compression algorithms, byte metrics, compression ratios, and execution timestamps.FileCompress, FileDecompress) eliminate external CLI dependencies and container overhead.SLACK_WEBHOOK_URL: Incoming webhook URL for posting log archive integrity alerts to the storage operations channel (required).SLACK_WEBHOOK_URL secret in your Kestra namespace.simulate_corrupted_archive: false) to verify clean compression, round-trip decompression verification, and audit logging.simulate_corrupted_archive: true to verify that the sentinel catches corrupted archives, creates quarantine artifacts, and dispatches Slack incident alerts.io.kestra.plugin.aws.s3.Upload with GLACIER storage class or io.kestra.plugin.gcp.gcs.Upload) inside the COMPLIANT_ARCHIVE branch to tier verified archives automatically.CRITICAL_CORRUPTION branch for critical compliance log feeds.