[Linux-cluster] [rgmanager] sending email on relocate

Ralph.Grothe at itdz-berlin.de Ralph.Grothe at itdz-berlin.de
Wed Jan 16 09:19:19 UTC 2013


I have implemented this on our RHCS clusters where such a
feature, as e.g. sending out a notification SMS text message when
a service does relocate, was requested by the users/admins of
this service, by simply adding a script function to the RHCS
resource agent (RA) code (i.e. mostly a custom script of RHCS RA
type "script", very similar to a SysV init script) and placing an
invocation statement to this function in the RA script's start
and stop blocks with applicable subject line and body text.
I found the SWAKS client (
http://www.jetmore.org/john/code/swaks/ ) nifty to this end
because it's easy  to use and offers (almost?) complete control
over SMTP communication.
If I feel the urge to dig deeper I usually use the CPAN module
Mail::Sender (
http://search.cpan.org/~jenda/Mail-Sender-0.8.22/Sender.pm ) with
a few helper modules should they be required.
On the other hand I have Nagios service checks for most of our
cluster services (not only Linux clusters) that would trigger a
notification or other event handler on critical state changes and
let Nagios do a centralized notifying.
Often that's the only way to get out messages anyway (e.g. where
clusters operate in shielded LANs)


> -----Original Message-----
> From: linux-cluster-bounces at redhat.com 
> [mailto:linux-cluster-bounces at redhat.com] On Behalf Of 
> GouNiNi Geekarea
> Sent: Friday, January 11, 2013 13:02
> To: linux clustering
> Subject: [Linux-cluster] [rgmanager] sending email on relocate
> 
> Hello everyone,
> 
> I didn't find any simple solution to send emails to alerte 
> when rgmanager decides to relocate services.
> Do you know simple solution other than create a script
ressource?
> 
> Regards,
> 
> 
> -- 
> Linux-cluster mailing list
> Linux-cluster at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-cluster
> 




More information about the Linux-cluster mailing list