Update install-dsmon.sh
This commit is contained in:
@@ -98,23 +98,6 @@ echo "Test Alert" | mail -r DSMon_$(hostname -s)@scity.us -s "Test" $SET_ALERTEM
|
||||
# (crontab -l ; echo "$(($RANDOM % 15)) */1 * * * /usr/local/bin/dsmon hdd >/dev/null 2>&1")| crontab -
|
||||
# (crontab -l ; echo "*/5 * * * * /usr/local/bin/dsmon sys >/dev/null 2>&1")| crontab -
|
||||
|
||||
echo -e "
|
||||
ALERT_EMAIL=${SET_ALERTEMAIL}
|
||||
SERVERMON_ID=${SET_SERVERMONID//id
|
||||
/}
|
||||
" >> /opt/idssys/dsmon/config.settings.inc
|
||||
|
||||
echo -e "
|
||||
mail -r DSMon-\$(hostname -s)@scity.us -s 'Disk Space Alert' \$ALERT_EMAIL << EOF
|
||||
Your root partition remaining free space is running low. Used: \$CURRENT%
|
||||
EOF
|
||||
|
||||
echo \"** Low Disk Space Alert Sent **\" >> /opt/idssys/dsmon/diskspace.log
|
||||
|
||||
#Add any additionl system specific actions that should occur when a low disk space alert has been triggered
|
||||
|
||||
" > /opt/idssys/dsmon/config.actions.inc
|
||||
|
||||
|
||||
if [ "${SET_SERVERMONID}" = "new" ]; then
|
||||
hostname=`hostname`
|
||||
@@ -158,7 +141,22 @@ if [ "${SET_SERVERMONID}" = "new" ]; then
|
||||
|
||||
fi
|
||||
|
||||
echo -e "
|
||||
ALERT_EMAIL=${SET_ALERTEMAIL}
|
||||
SERVERMON_ID=${SET_SERVERMONID//id
|
||||
/}
|
||||
" >> /opt/idssys/dsmon/config.settings.inc
|
||||
|
||||
echo -e "
|
||||
mail -r DSMon-\$(hostname -s)@scity.us -s 'Disk Space Alert' \$ALERT_EMAIL << EOF
|
||||
Your root partition remaining free space is running low. Used: \$CURRENT%
|
||||
EOF
|
||||
|
||||
echo \"** Low Disk Space Alert Sent **\" >> /opt/idssys/dsmon/diskspace.log
|
||||
|
||||
#Add any additionl system specific actions that should occur when a low disk space alert has been triggered
|
||||
|
||||
" > /opt/idssys/dsmon/config.actions.inc
|
||||
|
||||
/usr/local/bin/dsmon hdd
|
||||
/usr/local/bin/dsmon sys
|
||||
|
||||
Reference in New Issue
Block a user