Operating System - HP-UX
1834696 Members
2393 Online
110069 Solutions
New Discussion

sendmail activation when mcsg nodes fail over

 
SOLVED
Go to solution
Joyce Suganthy
Advisor

sendmail activation when mcsg nodes fail over

Hi All,

Need a big favour, I have two machines here now with service guard configured. How do i configure the sendmail to send a mail to a particular person through exchange server. eg a email sent to my account joyce@hp.com when the nodes fail over.

How do i write the script as well as activate/configure the sendmail for this.

Thanks

Joyce
2 REPLIES 2
Robin Wakefield
Honored Contributor
Solution

Re: sendmail activation when mcsg nodes fail over

Hi Joyce,

How about:

configure your sendmail config files (sendmail.cf, etc) to be on a shared LV, say /var/opt/sendmail. Then create a symlink:

/etc/mail -> /var/opt/sendmail

That way your sendmail config is independent of the node that the cluster is running on.

Then in the control.sh, add a line in the start section to mail you:

echo "Node $(hostname) starting cluster at $(date)" | mailx -s "Cluster Start" joyce@hp.com

rgds, Robin
Balaji N
Honored Contributor

Re: sendmail activation when mcsg nodes fail over

hi
1. if you have an exchange server, point the DS (smarthost) entry in your sendmail.cf to the exchange server. restart sendmail and see that you are able to send mails with the command
cat /etc/hosts | mailx -s "Test" joyce@hp.com

2. write a cron job to run cmviewcl and and if the node is down, send a mail to the user. also write it as flag somewhere so that it doesn't keep on sending mails as long as the node is down. and once the node comes up, delete the flag. dont know an easier way of identifying a node switch over.

3. if you want to be indicated whenever there is a package switch over, add it on to the package control script, in the customer defined run and halt functions.

hth
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.