|
Simple Failover can be extended through scripting. Any scripting language that works with the WSH (Windows Scripting Host) can be used.
Figure 1: The scripting tab. Script File Specify the Script file that contains the script procedures you will be using. Please note that in addition to the procedures enabled below, this script file must also contain the SFOUpdateDNS procedure if any Server Set uses scripting to update DNS (see Update DNS via Scripting). Script Language Enter the ID of the scripting language that you will be using (as recognized by the WSH). You can select one of the default languages VBScript or JScript using the drop-down box, or type in any other language ID. Enable scripting for log events Each line that appears in the Activity Log tab will also be sent to the SFOLog script procedure with a single parameter containing the line of text which was logged. A very simple use of this would be to write the log entries to the hard disk. A sample script doing this is provided in the sfo-log-script.vbs file in the Script Samples directory. Please note that the sample script is kept very simple for demonstration purposes. For production use, proper error handling should be added. Enable scripting for server status events Whenever Simple Failover has polled a server, it will execute the SFOServerStatus script procedure with the following 6 parameters: One possible use of this would be to record server status events in a database, making it possible to create long term statistics on server availability etc. A sample script doing this is provided in the sfo-status-script.vbs file in the Script Samples directory. The sql-layout.gif image file in the same location shows the SQL database layout used with the sample. Please note that the sample script is kept very simple for demonstration purposes. For production use, proper error handling should be added. Enable scripting for problem events Whenever Simple Failover detects a problem, it will execute the SFOProblem script procedure with the following 6 parameters: A possible use of this would be to provide customized problem notification - such as pager, SMS, AOL Messenger, etc. |