Re: Pulse - e-mail notification and external script?
Mike Kemelmakher <[email protected]> Sat, 12 Dec 2009 18:32:13 +0200
| Newsgroups | gmane.linux.redhat.piranha |
|---|---|
| Message-ID | <[email protected]> |
--===============0870104991== Content-Type: multipart/alternative; boundary=00504502d8702627aa047a8a9510 --00504502d8702627aa047a8a9510 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable yeah :) it happens to all of us from time to time anyway - when available - it is always worth to review the source of the software you use - usually you can find lots of useful stuff there :) -M On Fri, Dec 11, 2009 at 9:56 PM, Alessandro Vercelli <[email protected]>wrot= e: > Hi MIke, > > before your reply I answered (a bit hastily) the notification was not > supported.... > > Today, I can claim not to have lived in vain...:)) > > Thanks for information, > > > Alessandro > > > > >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 ro= le > >to master > >inactive_cmd - will be invoked when local pulse service will change its > role > >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 > >> > > > > > _______________________________________________ > Piranha-list mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/piranha-list > --00504502d8702627aa047a8a9510 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>yeah :) it happens to all of us from time to time=A0<= /div><div><br></div><div>anyway - when available - it is always worth to re= view the source of the software you use - =A0usually you can find lots of u= seful stuff there =A0:) =A0</div> <div><br></div><div>-M</div><br><div class=3D"gmail_quote">On Fri, Dec 11, = 2009 at 9:56 PM, Alessandro Vercelli <span dir=3D"ltr"><<a href=3D"mailt= o:[email protected]">[email protected]</a>></span> wrote:<br><blockquote c= lass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;= padding-left:1ex;"> Hi MIke,<br> <br> before your reply I answered (a bit hastily) the notification was not suppo= rted....<br> <br> Today, I can claim not to have lived in vain...:))<br> <br> Thanks for information,<br> <br> <br> Alessandro<br> <br> <br> <br> >Hey Laszlo,<br> <div class=3D"im">><br> >There is the way to implement easily the described requirement<br> ><br> >you can add the following directives to the global section of the <a hr= ef=3D"http://lvs.cf" target=3D"_blank">lvs.cf</a><br> ><br> >active_cmd =3D path_to_your_script<br> >inactive_cmd =3D path_to_your_script<br> ><br> </div><div><div></div><div class=3D"h5">>where your_script maybe any pro= gram executable which can be developed in<br> >bash, python, perl or C<br> ><br> >active_cmd - will be invoked when local pulse service will change its r= ole<br> >to master<br> >inactive_cmd - will be invoked when local pulse service will change its= role<br> >to backup<br> ><br> >It is obvious that you can send email / snmp trap or whatever will be<b= r> >required from the described scripts<br> ><br> >Probably the above API is unofficial - BUT =A0I use it in many system i= built<br> >for last four years without any problem.<br> ><br> >Hope this will help you<br> ><br> >Good luck and =A0Happy Holidays,<br> ><br> >With Kind Regards,<br> >Mike Kemelmakher<br> >UbXess LTD<br> ><br> >On Fri, Dec 11, 2009 at 1:52 PM, Laszlo Beres <<a href=3D"mailto:las= [email protected]">[email protected]</a>> wrote:<br> ><br> >> 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 f= or 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<b= r> >> requirements above?<br> >><br> >> Best regards,<br> >><br> >> --<br> </div></div><div><div></div><div class=3D"h5">>> 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">http://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" t= arget=3D"_blank">https://www.redhat.com/mailman/listinfo/piranha-list</a><b= r> >><br> ><br> <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> </div></div></blockquote></div><br></div> --00504502d8702627aa047a8a9510-- --===============0870104991== 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 --===============0870104991==--