Commands icon
If icon
SlackIncomingWebhook icon
Schedule icon

Thanos Compact Compaction Halt and Overlapping Block Sentinel

Monitors Thanos Compact for halted compaction cycles and overlapping TSDB block errors to prevent query inconsistencies.

Categories
DataInfrastructure

How it works

This workflow monitors the Prometheus /metrics endpoint of the Thanos Compact component to audit the critical thanos_compact_halted metric. Thanos Compact is responsible for downsampling (5m and 1h resolutions) and merging 2-hour Prometheus TSDB blocks stored in cloud object storage (S3, GCS, Azure Blob). When it discovers overlapping blocks or corrupt meta files, it immediately halts processing to avoid corrupting global time-series data. This workflow detects halted states and raises critical alerts before historical queries fail.

What you get

  • Real-time detection of halted compaction cycles in Thanos storage.
  • Prevents historical time-series query slowdowns and failed downsampling.
  • Immediate awareness of corrupted or overlapping blocks in object storage.

Who it's for

  • SREs and Infrastructure Engineers maintaining multi-cluster Thanos architectures.
  • Cloud Storage Administrators overseeing long-term Prometheus metrics retention.

Why orchestrate this with Kestra

  • Automated Health Verification: Polls component health continuously without manual intervention.
  • Critical Incident Escalation: Immediately alerts the storage operations channel when compaction freezes.
  • Resilient Execution: Top-level error blocks guarantee notification delivery even if scraping encounters network timeouts.

Prerequisites

  • Thanos Compact running with /metrics port exposed.
  • Secret SLACK_WEBHOOK configured in Kestra.

Quick start

  1. Import the blueprint.
  2. Provide your Thanos Compact metrics endpoint.
  3. Run the workflow to inspect compaction state.

How to extend

  • Add an automated diagnostic step to run thanos tools bucket inspect to identify specific overlapping block ULIDs.
  • Notify PagerDuty for critical long-term storage halts.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.