#!/bin/bash
EMAIL="italerts@skymetweather.com" "rajish.nair@skymetweather.com" "abhay.pandey@skymetweather.com" "saurabh.chauhan@skymetweather.com"
CRITICAL_SPACE=90
USED_SPACE=`df -kh | head -2 | tail -1 | awk '{print $5}' | sed 's/\%//'`
if [ $USED_SPACE -ge $CRITICAL_SPACE ]
then
/root/it/skymet_mail_sender.sh "Monitoring Alert: Disk Space Critical: $USED_SPACE in `hostname`" $EMAIL < /dev/null
else
echo "Space has still not reached $CRITICAL_SPACE in `hostname`"
fi
USED_INODE=`df -ih | head -2 | tail -1 | awk '{print $5}' | sed 's/\%//'`
if [ $USED_INODE -ge $CRITICAL_SPACE ]
then
/root/it/skymet_mail_sender.sh "Monitoring Alert: INODE Critical: $USED_INODE in `hostname`" $EMAIL < /dev/null
else
echo "Inode has still not reached $CRITICAL_INODE in `hostname`"
fi
~
~
Wednesday, August 11, 2021
Subscribe to:
Post Comments (Atom)
Powered by Blogger.
No comments:
Post a Comment