DevOps / Scripts bash Beginner

Disk Usage Alert

Send an alert when any mounted filesystem exceeds a usage threshold.

bash
#!/bin/bash
THRESHOLD=85
df -h | awk -v t=$THRESHOLD 'NR>1 && int($5) > t { print "ALERT:", $6, "is", $5, "full" }'

Prerequisites

  • df
  • awk

Pro Tips

  • → Pipe output to a Slack webhook or email.

Was this module useful?

Share your experience — it helps the team improve.

Leave Feedback

Commercial Licensing

Acquire a production access token or template license for enterprise deployment.

Module Info

Language
bash
Level
Beginner
Read time
1 min
Published
Sep 2026
License
Commercial License

Newsletter

New modules every week, directly to your inbox.