In addition to the tasks that Failover Manager performs automatically during a failover, you can use hook scripts to specify additional actions to occur at the beginning or the end of the failover process. For example, you can create a hook script to start or stop a smarts-collector associated with the Active Domain Manager.
Failover Manager supports customer-defined hook scripts written in Perl. The hook scripts run from the smarts/local/actions directory in the installation where Failover Manager resides. The hook scripts can connect to Active and Standby Service Assurance Managers and Domain Managers that are registered with the Broker.
Use Perl to create the scripts to run in the beginning or in the end of a failover. Save them in the FAILOVER_BASEDIR/smarts/local/actions directory. You can also associate the script with a server type or with a server name. The naming conventions are as follows:
-
failover_pre.pl—Runs at the beginning of a failover of any component.
-
failover_post.pl —Runs at the end of a failover of any component.
-
failover_pre_<SERVER_TYPE>.pl —Runs at the beginning of a failover of any component with the specified type described in “ServerType” on page 57.
-
failover_post_<SERVER_TYPE>.pl —Runs at the end of a failover of any component with the specified type.
-
failover_pre_<SERVER_NAME>.pl —Runs at the beginning of a failover of the component with the specified name. “Values for the Name parameter” on page 57 provides a list of default names.
-
failover_post_<SERVER_NAME>.pl —Runs at the end of a failover of any component with the specified name.
Examples:
-
failover_post_<SERVER_TYPE>.pl is failover_post_SAM.pl which will run at the end of any Service Assurance Manager failover.
-
failover_post_<SERVER_NAME>.pl is failover_post_INCHARGE-SA-PRES.pl which will run at the end of a failover for the Service Assurance Manager named INCHARGE-SA-PRES.