From laszlo at beres.me Fri Dec 11 11:52:33 2009 From: laszlo at beres.me (Laszlo Beres) Date: Fri, 11 Dec 2009 12:52:33 +0100 Subject: Pulse - e-mail notification and external script? Message-ID: <85e375aa0912110352u5ded737bo5f9a09af94fa866@mail.gmail.com> 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?szl? B?res Unix system engineer http://www.google.com/profiles/beres.laszlo From alever at libero.it Fri Dec 11 12:18:41 2009 From: alever at libero.it (Alessandro Vercelli) Date: Fri, 11 Dec 2009 13:18:41 +0100 Subject: Pulse - e-mail notification and external script? Message-ID: I could be wrong, but lvs doesn't implement failover notifications. Using self-made scripts, you can check ipvsadm output; on the primary, you see (for example): # ipvsadm IP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags -> RemoteAddress:Port Forward Weight ActiveConn InActConn TCP lbwww:http rr -> :http Route 1 0 0 -> :http Route 1 0 0 On the slave director, instead: # ipvsadm IP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags -> RemoteAddress:Port Forward Weight ActiveConn InActConn You can build a monitoring script which checks the output and sends a message. Good work, Alessandro >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?szl? B?res Unix system engineer >http://www.google.com/profiles/beres.laszlo > >_______________________________________________ >Piranha-list mailing list >Piranha-list at redhat.com >https://www.redhat.com/mailman/listinfo/piranha-list > From mike at ubxess.com Fri Dec 11 12:37:13 2009 From: mike at ubxess.com (Mike Kemelmakher) Date: Fri, 11 Dec 2009 14:37:13 +0200 Subject: Pulse - e-mail notification and external script? In-Reply-To: <85e375aa0912110352u5ded737bo5f9a09af94fa866@mail.gmail.com> References: <85e375aa0912110352u5ded737bo5f9a09af94fa866@mail.gmail.com> Message-ID: <9c387a370912110437h3eca7e58xf6ea50a00bfe8651@mail.gmail.com> 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 = path_to_your_script inactive_cmd = 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 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 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?szl? B?res Unix system engineer > http://www.google.com/profiles/beres.laszlo > > _______________________________________________ > Piranha-list mailing list > Piranha-list at redhat.com > https://www.redhat.com/mailman/listinfo/piranha-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: From laszlo at beres.me Fri Dec 11 12:59:53 2009 From: laszlo at beres.me (Laszlo Beres) Date: Fri, 11 Dec 2009 13:59:53 +0100 Subject: Pulse - e-mail notification and external script? In-Reply-To: <9c387a370912110437h3eca7e58xf6ea50a00bfe8651@mail.gmail.com> References: <85e375aa0912110352u5ded737bo5f9a09af94fa866@mail.gmail.com> <9c387a370912110437h3eca7e58xf6ea50a00bfe8651@mail.gmail.com> Message-ID: <85e375aa0912110459q479617fh15aa3f59667112e3@mail.gmail.com> On Fri, Dec 11, 2009 at 1:37 PM, Mike Kemelmakher wrote: > 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 = path_to_your_script > inactive_cmd = path_to_your_script Mike, thank you very much, it works like a charm :) -- L?szl? B?res Unix system engineer http://www.google.com/profiles/beres.laszlo From mike at ubxess.com Fri Dec 11 12:38:09 2009 From: mike at ubxess.com (Mike Kemelmakher) Date: Fri, 11 Dec 2009 14:38:09 +0200 Subject: Pulse - e-mail notification and external script? In-Reply-To: <85e375aa0912110352u5ded737bo5f9a09af94fa866@mail.gmail.com> References: <85e375aa0912110352u5ded737bo5f9a09af94fa866@mail.gmail.com> Message-ID: <9c387a370912110438k795c0d06l268bad26cd7393c0@mail.gmail.com> 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 = path_to_your_script inactive_cmd = 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 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 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?szl? B?res Unix system engineer > http://www.google.com/profiles/beres.laszlo > > _______________________________________________ > Piranha-list mailing list > Piranha-list at redhat.com > https://www.redhat.com/mailman/listinfo/piranha-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike at ubxess.com Fri Dec 11 13:13:54 2009 From: mike at ubxess.com (Mike Kemelmakher) Date: Fri, 11 Dec 2009 15:13:54 +0200 Subject: Pulse - e-mail notification and external script? In-Reply-To: <85e375aa0912110459q479617fh15aa3f59667112e3@mail.gmail.com> References: <85e375aa0912110352u5ded737bo5f9a09af94fa866@mail.gmail.com> <9c387a370912110437h3eca7e58xf6ea50a00bfe8651@mail.gmail.com> <85e375aa0912110459q479617fh15aa3f59667112e3@mail.gmail.com> Message-ID: <9c387a370912110513n5a9e8289s567ffc3547211c11@mail.gmail.com> No problem, man. Always happy to help :) cheers, -Mike On Fri, Dec 11, 2009 at 2:59 PM, Laszlo Beres wrote: > On Fri, Dec 11, 2009 at 1:37 PM, Mike Kemelmakher wrote: > > > 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 = path_to_your_script > > inactive_cmd = path_to_your_script > > Mike, > > thank you very much, it works like a charm :) > > -- > L?szl? B?res Unix system engineer > http://www.google.com/profiles/beres.laszlo > > _______________________________________________ > Piranha-list mailing list > Piranha-list at redhat.com > https://www.redhat.com/mailman/listinfo/piranha-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alever at libero.it Fri Dec 11 19:56:01 2009 From: alever at libero.it (Alessandro Vercelli) Date: Fri, 11 Dec 2009 20:56:01 +0100 Subject: Pulse - e-mail notification and external script? Message-ID: 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 = path_to_your_script >inactive_cmd = 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 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 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?szl? B?res Unix system engineer >> http://www.google.com/profiles/beres.laszlo >> >> _______________________________________________ >> Piranha-list mailing list >> Piranha-list at redhat.com >> https://www.redhat.com/mailman/listinfo/piranha-list >> > From mike at ubxess.com Sat Dec 12 16:32:13 2009 From: mike at ubxess.com (Mike Kemelmakher) Date: Sat, 12 Dec 2009 18:32:13 +0200 Subject: Pulse - e-mail notification and external script? In-Reply-To: References: Message-ID: <9c387a370912120832k76c84778le0cf13399b00add0@mail.gmail.com> 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 wrote: > 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 = path_to_your_script > >inactive_cmd = 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 > 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 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?szl? B?res Unix system engineer > >> http://www.google.com/profiles/beres.laszlo > >> > >> _______________________________________________ > >> Piranha-list mailing list > >> Piranha-list at redhat.com > >> https://www.redhat.com/mailman/listinfo/piranha-list > >> > > > > > _______________________________________________ > Piranha-list mailing list > Piranha-list at redhat.com > https://www.redhat.com/mailman/listinfo/piranha-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: