Created
October 11, 2017 15:40
-
-
Save arturoherrero/72914fe9651b4a3849b2acfa0ee27f46 to your computer and use it in GitHub Desktop.
Revisions
-
arturoherrero created this gist
Oct 11, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ #!/bin/bash CURRENT=$(df /dev/sda | grep / | awk '{ print $5}' | sed 's/%//') THRESHOLD=95 if [ "$CURRENT" -ge "$THRESHOLD" ]; then echo "Subject: Disk space critical: $THRESHOLD% used" | /usr/sbin/sendmail -v [email protected] fi