Mail related

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,

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.

How tightly does the timing have to be? Scheduler on the PC might call the check script. It probably should report when state changes and periodically (8 hours?) if it is down. Still, this might be easier to set up in a looping script. Write a simple query to embed in the script, have it ask for password as it starts. If the query runs, the output will contain a special string, like "select 102030405+1020304050" and grep -c for 1122334455.

This is not how this forum is to be used
See last post of:

And you already opened a thread on the subject:

Thread closed