Configure one or more hook scripts according to your environment:

  1. Copy the sample customer script failover_post-AMPM-sample.pl from the FAILOVER_BASEDIR/smarts/local/actions/samples directory to the FAILOVER_BASEDIR/smarts/local/actions directory.

  2. Rename the failover_post-AMPM-sample.pl script.

    This script works only with Domain Managers. It does not work with Service Assurance Manager, Business Impact Manager, Adapter Platform, Trap Exploder, or Trap Adapter, because the VMware M&R smarts-collector does not collect data from these components.

    Use one of the following file naming conventions:

Table 1. File naming conventions for the hook script used for collectors

Rename the sample script as one of the following:

Description

failover_post_<ServerType>.pl

Where <ServerType> is one of the following: AM, AMPM, PM, ESM, MPLS, NPM, or VoIP.

A hook script with this naming convention will run after the Failover Manager performs a failover for any Domain Manager of the specified type.

For example: failover_post_AMPM.pl

failover_post_<ServerName>.pl

Where <ServerName> is the specific Domain Manager name. “Values for the Name parameter” on page 57 for a complete list of default names.

A hook script with this naming convention will run after the Failover Manager performs a failover for the specified Domain Manager.

For example: failover_post_INCHARGE-AM.pl

  1. Modify the settings in the Configuration Section of the script according to your environment.

    In addition to the settings described in the script, review the following:

  2. Set both web-service URLs to the same value if one web-service gateway manages the collector in Location-A and the collector in Location-B.

  3. For a failover_post_<ServerType>.pl script, set the serverNames parameter to an empty list in order to run the script for all Domain Managers of the specified type. To limit the script to a few Domain Managers of the same type, list the Domain Managers in the serverNames parameter.

    For a failover_post_<ServerName>.pl script, setting the serverNames parameter is not necessary, because the name of the script identifies the Domain Manager.

  4. Set the stopNeeded parameter to True according to your deployment.

    When the parameter is set to True, the script attempts to stop the collector only if the peer collector has started successfully.

    By default (False), the hook script will not stop an VMware M&R collector for the failed Domain Manager, but the script will only start the collector near the new Active site.

    • Set the stopNeeded parameter to True if you have only one Domain Manager that communicates with the collector and you want to stop the collector when the Active Domain Manager is failing over.

      • Set the stopNeeded parameter to False if you have a single collector communicating with multiple Domain Managers like IP Availability Manager, NPM, and MPLS Manager. The hook script should not stop the collector when a single Domain Manager in the group fails over.

        • Set the stopNeeded parameter to False if you have two collectors associated with two sites communicating with multiple Domain Managers like IP Availability Manager, NPM, and MPLS Manager. The hook script should not stop the collector when a single Domain Manager in the group fails over. The collector associated with Site- A should continue running and communicating with the rest of the Domain Managers running on Site-A and the collector associated with Site-B should be started.

          Note:

          The stopNeeded parameter should be set to False when the primary smarts-collector is collecting data from multiple Domain Managers. In this case where both primary and secondary smarts-collectors are running, both collectors will collect data from Domain Managers and duplicate data entries can appear in the VMware M&R database. The duplicate entries should not impact any VMware M&R reports, but the size of the database will increase due to duplicate database entries. In this case, if you stop the smarts-collector by setting the parameter to True, the VMware M&R reports will not display data from the other running Domain Managers that did not failover.

          If you have multiple Domain Managers communicating with the collector, the script may run multiple times if multiple Domain Managers are failing over.

          It is safe for the hook script to request the starting of an already running collector. The request just returns the status of the collector.

  5. Save the script.