Re: Pulse - e-mail notification and external script?
Mike Kemelmakher <[email protected]> Fri, 11 Dec 2009 14:37:13 +0200
| Newsgroups | gmane.linux.redhat.piranha |
|---|---|
| Message-ID | <[email protected]> |
--===============0258871014== Content-Type: multipart/alternative; boundary=0016e68ee215e78672047a732eb7 --0016e68ee215e78672047a732eb7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hey Laszlo, There is the way to implement easily the described requirement you can add the following directives to the global section of the lvs.cf active_cmd =3D path_to_your_script inactive_cmd =3D path_to_your_script where your_script maybe any program executable which can be developed in bash, python, perl or C active_cmd - will be invoked when local pulse service will change its role to master inactive_cmd - will be invoked when local pulse service will change its rol= e to backup It is obvious that you can send email / snmp trap or whatever will be required from the described scripts Probably the above API is unofficial - BUT I use it in many system i built for last four years without any problem. Hope this will help you Good luck and Happy Holidays, With Kind Regards, Mike Kemelmakher UbXess LTD On Fri, Dec 11, 2009 at 1:52 PM, Laszlo Beres <[email protected]> wrote: > Hi, > > I have the beautiful duty to set up a 2-node loadbalancer. > Unfortunately the client has some requests I can't implement for the > first sight: > > - having e-mail notification about master/backup failover > - starting external scripts when failover happens > > Is there an easy way or unofficial, unsupported solution for the > requirements above? > > Best regards, > > -- > L=E1szl=F3 B=E9res Unix system engineer > http://www.google.com/profiles/beres.laszlo > > _______________________________________________ > Piranha-list mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/piranha-list > --0016e68ee215e78672047a732eb7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hey Laszlo,=A0<div><br>There is the way to implement easil= y the described requirement=A0</div><div><br></div><div>you can add the fol= lowing directives to the global section of the <a href=3D"http://lvs.cf">lv= s.cf</a> =A0</div> <div><br></div><div><div>active_cmd =3D path_to_your_script=A0</div><div>in= active_cmd =3D path_to_your_script</div><div><br></div><div>where your_scri= pt maybe any program executable which can be developed in bash, python, per= l or C=A0</div> <div><br></div><div>active_cmd - will be invoked when local pulse service w= ill change its role to master=A0</div><div>inactive_cmd - will be invoked w= hen local pulse service will change its role to backup=A0</div><div><br></d= iv> <div>It is obvious that you can send email / snmp trap or whatever will be = required from the described scripts=A0</div><div><br></div><div>Probably th= e above API is unofficial - BUT =A0I use it in many system i built for last= four years without any problem.=A0</div> <div><br></div><div>Hope this will help you=A0</div><div><br></div><div>Goo= d luck and =A0Happy Holidays,=A0</div><div><br></div><div>With Kind Regards= ,</div><div>Mike Kemelmakher=A0</div><div>UbXess LTD=A0</div><div><br></div= ><div> <div class=3D"gmail_quote">On Fri, Dec 11, 2009 at 1:52 PM, Laszlo Beres <s= pan dir=3D"ltr"><<a href=3D"mailto:[email protected]">[email protected]</a>&= gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 = 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> Hi,<br> <br> I have the beautiful duty to set up a 2-node loadbalancer.<br> Unfortunately the client has some requests I can't implement for the<br= > first sight:<br> <br> - having e-mail notification about master/backup failover<br> - starting external scripts when failover happens<br> <br> Is there an easy way or unofficial, unsupported solution for the<br> requirements above?<br> <br> Best regards,<br> <font color=3D"#888888"><br> --<br> L=E1szl=F3 B=E9res =A0 =A0 =A0 =A0 =A0 =A0Unix system engineer<br> <a href=3D"http://www.google.com/profiles/beres.laszlo" target=3D"_blank">h= ttp://www.google.com/profiles/beres.laszlo</a><br> <br> _______________________________________________<br> Piranha-list mailing list<br> <a href=3D"mailto:[email protected]">[email protected]</a><br> <a href=3D"https://www.redhat.com/mailman/listinfo/piranha-list" target=3D"= _blank">https://www.redhat.com/mailman/listinfo/piranha-list</a><br> </font></blockquote></div><br></div></div></div> --0016e68ee215e78672047a732eb7-- --===============0258871014== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Piranha-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/piranha-list --===============0258871014==--