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

Welcome to Qowala's Mastodon instance!
Here, we love open source and we study and work on social networks so naturally we also host a Mastodon instance.
Friendly people are welcome, but as this is a small server, there are limited available slots. So, choose wisely to join or not.