Script to genrate the system high load alert
#!/bin/bash
ServerName=Dummy.com
The script will collect the system uptime value and send e-mail/sms if usage is above 50.
value=\`snmpget -v1 -c public 192.168.1.1 .1.3.6.1.4.1.2021.10.1.3.2 | cut -d ' ' -f4 |cut -d '.' -f1\`
echo $value
if \[ "$value" -le "50" \]; then
echo System Load is normal
else
echo "Mail send" | mail -c critical@dummy.com -s "Load average of serverx -s $value%" asim
fi