I have maintaining 16 client PCs.I want to get a mail from client PCs whenever any one of the services are not working.Services like postgres ,sms , jts and synch etc.,The Client PCs are remotely placed.I want to develop this through shell script ,But I don't have an idea to develop this script.Please give me a script code for this concept.
This is mail id information,
* My mail id -
abc@gmail.com
Client PCs are Client PC1 to Client PC16
I am expecting like as,
For eg:
If postgres service is stopped in client PC1 , then it automatically send the mail to my mail id . This is I want .
Mail information like ,
Please check here the postgres service is stopped please check and restart the service from this client PC1.