Schedule icon
Commands icon
Docker icon
If icon
SlackIncomingWebhook icon
Log icon

Alert on Worker Disk Usage Thresholds

Monitor worker disk usage on a schedule and alert Slack before the filesystem fills.

Categories
Infrastructure

A full disk turns "everything is fine" into failed executions within one deploy. This blueprint reads df for your path hourly, alerts Slack past your threshold, and logs below it so the execution history is your usage trend.

How it works

  1. check_disk (io.kestra.plugin.scripts.shell.Commands on Alpine) parses df -P and emits the usage percent via the ::{"outputs": ...}:: protocol. Parse failure reports 100%.
  2. over_threshold (io.kestra.plugin.core.flow.If) branches: breach -> alert_disk; passing -> log_ok.
  3. The errors block alerts when the check itself fails.
  4. Trigger: an hourly Schedule.

What you get

  • Hours of warning before the disk fills.
  • Usage percent in the execution history.
  • A failure alert so a dead probe never reads as healthy.

Who it's for

  • Teams running self-hosted Kestra workers with local volumes.
  • Anyone whose workers silently died from full disks once.

Why orchestrate this with Kestra

df prints a number; the flow gives it state, a branch, an alert, and history. The next step (prune Docker images, rotate logs, page on-call) is one task away.

Prerequisites

  • Docker available on the Kestra Worker.
  • A Slack webhook.

Secrets

  • SLACK_WEBHOOK_URL: webhook for usage and failure alerts.

Quick start

  1. Add the Slack webhook secret.
  2. Set path and threshold_percent.
  3. Run once and read disk_usage.

How to extend

  • Check multiple mounts with a ForEach.
  • Auto-prune old Docker images on breach.
  • Store readings in KV and graph week-over-week.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.