Skip to content

Commit

Permalink
added out of buisness hours threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
cyclingzealot committed Sep 5, 2016
1 parent 97b1dd9 commit f6c6bf8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lowDiskSpace.bash
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ chmod 600 $log

#Check that the config file exists
#if [[ ! -f "$configFile" ]] ; then
# echo "I need a file at $configFile with an email address to warn"
# echo "I need a file at $configFile with an email address to warn"
# exit 1
#fi

Expand All @@ -90,6 +90,9 @@ IFS=$'\n'; for mount in `df`; do
mountPoint=$(echo $mount | awk '{ print $6}' | sed 's/%//g')
filesystem=$(echo $mount | awk '{ print $1}' | sed 's/%//g')
THRESHOLD=90
if [[ $(date +%u) -gt 5 ]] || [[ $(date +%_H) -lt 10 ]] || [[ $(date +%_H) -gt 18 ]] ; then
THRESHOLD=95
fi

if [ "$CURRENT" -gt "$THRESHOLD" ] ; then
sendAlert=1
Expand Down

0 comments on commit f6c6bf8

Please sign in to comment.