I need to write a shell script to see if the ADM Process is down we need to get an alert via email. I have done that using the script below. It is working fine if we have installed one ADM server on one machine. My issue is that I have installed 3 ADM servers on one machine and I am not sure how I can write the shell script to trigger an alert in this situation.
script:-
export ADM =`ps -ef | grep Adm | grep -v grep | wc -l`
if [ $ADM == 0 ];
then
echo "AdmServer is down on Dev $hostname" | mail -s xxxx.gmail.com
fi
Whenever Adm1 or Adm2 or Adm3 is down we need to get an alert.
Adm
processes running? Something else? A combination of events?