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">&lt;<a href=3D"mailt=
o:[email protected]">[email protected]</a>&gt;</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>
&gt;Hey Laszlo,<br>
<div class=3D"im">&gt;<br>
&gt;There is the way to implement easily the described requirement<br>
&gt;<br>
&gt;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>
&gt;<br>
&gt;active_cmd =3D path_to_your_script<br>
&gt;inactive_cmd =3D path_to_your_script<br>
&gt;<br>
</div><div><div></div><div class=3D"h5">&gt;where your_script maybe any pro=
gram executable which can be developed in<br>
&gt;bash, python, perl or C<br>
&gt;<br>
&gt;active_cmd - will be invoked when local pulse service will change its r=
ole<br>
&gt;to master<br>
&gt;inactive_cmd - will be invoked when local pulse service will change its=
 role<br>
&gt;to backup<br>
&gt;<br>
&gt;It is obvious that you can send email / snmp trap or whatever will be<b=
r>
&gt;required from the described scripts<br>
&gt;<br>
&gt;Probably the above API is unofficial - BUT =A0I use it in many system i=
 built<br>
&gt;for last four years without any problem.<br>
&gt;<br>
&gt;Hope this will help you<br>
&gt;<br>
&gt;Good luck and =A0Happy Holidays,<br>
&gt;<br>
&gt;With Kind Regards,<br>
&gt;Mike Kemelmakher<br>
&gt;UbXess LTD<br>
&gt;<br>
&gt;On Fri, Dec 11, 2009 at 1:52 PM, Laszlo Beres &lt;<a href=3D"mailto:las=
[email protected]">[email protected]</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; I have the beautiful duty to set up a 2-node loadbalancer.<br>
&gt;&gt; Unfortunately the client has some requests I can&#39;t implement f=
or the<br>
&gt;&gt; first sight:<br>
&gt;&gt;<br>
&gt;&gt; - having e-mail notification about master/backup failover<br>
&gt;&gt; - starting external scripts when failover happens<br>
&gt;&gt;<br>
&gt;&gt; Is there an easy way or unofficial, unsupported solution for the<b=
r>
&gt;&gt; requirements above?<br>
&gt;&gt;<br>
&gt;&gt; Best regards,<br>
&gt;&gt;<br>
&gt;&gt; --<br>
</div></div><div><div></div><div class=3D"h5">&gt;&gt; L=E1szl=F3 B=E9res =
=A0 =A0 =A0 =A0 =A0 =A0Unix system engineer<br>
&gt;&gt; <a href=3D"http://www.google.com/profiles/beres.laszlo" target=3D"=
_blank">http://www.google.com/profiles/beres.laszlo</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Piranha-list mailing list<br>
&gt;&gt; <a href=3D"mailto:[email protected]">[email protected]=
</a><br>
&gt;&gt; <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>
&gt;&gt;<br>
&gt;<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==--