Update install-dsmon.sh
This commit is contained in:
@@ -23,15 +23,23 @@ if [ ! -d "/opt/idssys/settings" ]; then
|
|||||||
do_with_root mkdir /opt/idssys/settings
|
do_with_root mkdir /opt/idssys/settings
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e -n "${idsCL[LightCyan]}What threshold should we set? (Default=90(%)): ${idsCL[Default]}"
|
TOTALSPACE=$(df / | grep / | awk '{ print $2}')
|
||||||
|
TOTALSPACE=$(bc <<< "scale=2; $TOTALSPACE/1024/1024")
|
||||||
|
THRESHOLDSPACE=$(bc <<< "scale=2; $TOTALSPACE*.8")
|
||||||
|
|
||||||
|
echo -e "${idsCL[LightCyan]}Root drive size: ${idsCL[LightGreen]}"$TOTALSPACE"GB${idsCL[Default]}"
|
||||||
|
echo -e "${idsCL[LightCyan]}Default thresholf of 80%: ${idsCL[LightGreen]}"$THRESHOLDSPACE"GB${idsCL[Default]}"
|
||||||
|
|
||||||
|
echo -e -n "${idsCL[LightCyan]}What threshold should we set? Default=80: ${idsCL[Default]}"
|
||||||
read SET_THRESHOLD
|
read SET_THRESHOLD
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo -e -n "${idsCL[LightCyan]}Email address to receive alerts: ${idsCL[Default]}"
|
echo -e -n "${idsCL[LightCyan]}Email address to receive alerts: ${idsCL[Default]}"
|
||||||
read SET_ALERTEMAIL
|
read SET_ALERTEMAIL
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [ "${SET_THRESHOLD}" = "" ]; then
|
if [ "${SET_THRESHOLD}" = "" ]; then
|
||||||
SET_THRESHOLD=90
|
SET_THRESHOLD=80
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${idsCL[Yellow]}Sending test Alert... ${idsCL[Default]}"
|
echo -e "${idsCL[Yellow]}Sending test Alert... ${idsCL[Default]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user