The Script for Temperature Alert using email from the Linux Server (If it Cross 40 c)

#! /bin/bash
TEMP=$(sensors | grep "id 0" | cut -d + -f2 | cut -d . -f1)
if [ "$TEMP" -ge 40 ]; then
echo $TEMP
date > /tmp/temp
sensors >> /tmp/temp
Hello Helpdesk Team,
This is the Temperature Alert Message for ABC Server at DC Location,CITY:
$(cat /tmp/temp)
Datacenter TEAM
echo "Subject: ALERT High Temperature for Server at DC Location " "$TEMP_BODY" | /opt/postfix- -t

In this Script Replace the with Correct Email id and Sendmail path with correct Send-mail path. In this script we are monitoring the CPU Temperature. This Script will work on Linux Server (Red Hat/Centos ) 

Popular posts from this blog

Password Expiry notification for the users in zimbra 8.x within 7 Days for the email users

Zimbra backup open source for zimbra 8.x for 7 Days