Setting Up Automated Warning Mails/SMS/Sound
Automated warnings
The Zeus Load Balancer has the ability to contact you in case of severe problems with the clustering. If a frontend machine fails, or if a website becomes unavailable due to backend webserver failures, then the Balancer can be configured to:
- Send email to specific people
- Send a SMS message to a number
- Play a warning sound / message
By default, the Balancer will perform none of these actions. However, sample scripts are provided which let you configure the Balancer to enable any of these actions.
Setting up the warnings
On a machine with a frontend Load Balancer installed, go to the directory $ZEUSHOME/balancer/bin. In here are all the scripts required to enable the mail/sms/sound features. The default scripts are alert-by-mail, alert-by-sms and alert-by-sound respectively.The script 'notify' is the actual program invoked when an event occurs on the Zeus Load Balancer. By default, this program does nothing. However, if you copy one of the other scripts over in its place, then that function will get used instead.
Scripts provided
The scripts will either be run as root (in the case of messages about frontend machines failing), or as the user which the frontend runs under, in the case of backend machines failing. Ensure that your scripts will function correctly in both of these cases!
alert-by-mail
This should require little modification in order to work. The default mail address used is <root@localhost>. It is suggested that this be changed to something more appropriate.
The script tries to send a mail by invoking the 'mail' command. Ensure that this is available and functioning correctly.
alert-by-sound
Playing sounds is a very system-dependent action. You will need to set up the sound system on the appropriate computer, and possibly adjust the script to set the command used to play sound samples. You will also need to supply some appropriate sound effects!
alert-by-sms
This is also greatly system-dependent. You will need an external program that can send messages onto the appropriate SMS network. The script provides a few configurable items - 'phoneno' and the 'smssend' variables must be specified correctly!
Events
There are three events that trigger warning:
takeover
One of the frontends has taken over for the other, because it failed.
release
A frontend has stopped taking over for the other, because the other frontend is now functioning correctly.
sitedown
One of the websites run by the cluster is unavailable because all of the backends have failed.