Update nodemgmt-scripts.sh
This commit is contained in:
@@ -53,6 +53,17 @@ STATUS() {
|
||||
lip=$(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1)
|
||||
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME} (${lip})${idsST[Reset]}${idsCL[LightCyan]} - localhost${idsCL[Default]}"
|
||||
DIVIDER false green
|
||||
ping -c 3 $SERVERIP > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
# Use your favorite mailer here:
|
||||
mailx -s "Server $SERVERIP is down" -t "$NOTIFYEMAIL" < /dev/null
|
||||
fiping -c 3 $SERVERIP > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
# Use your favorite mailer here:
|
||||
mailx -s "Server $SERVERIP is down" -t "$NOTIFYEMAIL" < /dev/null
|
||||
fi
|
||||
for srvc in "${LOCAL_SERVICES[@]}"
|
||||
do
|
||||
c=0; cw=22; spc=''
|
||||
|
||||
Reference in New Issue
Block a user