Follow

So, just for fun I wrote a one-liner bash command to alert by email in case of more than 79% disk usage on '/':

df -h | grep "/$" | awk '{ print $5 }' | grep "^[0-7][0-9]%" > /dev/null || echo "Issue with disk space above treshold" | mail -s "Alert: disk space" email@example.com

I may start with this in a cron instead of installing and configuring a bunch of software.

Sign in to participate in the conversation
Qowala's Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!