Thanks, looks interesting. I wasn't aware that you could send mail like that
I came up with my own script, it isn't very elegant but it does the job. I added it to my cron.daily/ so it gets sent to me in the email for that:
#!/bin/bash
# Find those lines which contains the word "dev" (i.e. everything, but
# the table header)
df | grep dev > out.tmp
# Create results.tmp/wipe it if it already exists.
echo "WARNING FILESYSTEM IS LOW!!!" > results.tmp
# Try to match all the conditions that you want to flag
cat out.tmp | grep '100%' >> results.tmp
cat out.tmp | grep '99%' >> results.tmp
cat out.tmp | grep '98%' >> results.tmp
cat out.tmp | grep '97%' >> results.tmp
cat out.tmp | grep '96%' >> results.tmp
cat out.tmp | grep '95%' >> results.tmp
cat out.tmp | grep '94%' >> results.tmp
cat out.tmp | grep '93%' >> results.tmp
cat out.tmp | grep '92%' >> results.tmp
cat out.tmp | grep '91%' >> results.tmp
cat out.tmp | grep '90%' >> results.tmp
cat out.tmp | grep '89%' >> results.tmp
cat out.tmp | grep '88%' >> results.tmp
cat out.tmp | grep '87%' >> results.tmp
cat out.tmp | grep '86%' >> results.tmp
cat out.tmp | grep '85%' >> results.tmp
cat results.tmp
rm -f out.tmp
rm -f results.tmp
I know, I know I could improve it with some iteration but right now I really need to get on with some other stuff
Thanks,
James