Detect when failover occurs

You may need to know when a failover occurs so you can troubleshoot your system or your hosts.

  1. Edit ego.conf.

    You need to specify two parameters under the EGO event configuration section: EGO_EVENT_PLUGIN and EGO_EVENT_MASK. These parameters are already included in ego.conf with default values, but may be commented out.

  2. Set up an SNMP v1 (Simple Network Management Protocol version 1) trap for EGO events.
    1. Specify the name and configuration file location with your SNMP information. The plug in name should not include a suffix (.dll or .so): EGO_EVENT_PLUGIN=plugin_name[plugin_conf]…

      Example:

      EGO_EVENT_PLUGIN=eventplugin_snmp[SINK=host,MIBDIRS=EGO_TOP/mibs]

    (where host represents the name of the host where the SNMP trap daemon is running).

    SNMP traps enable an agent to notify the management station of significant events by way of an unsolicited SNMP message.

    Note the following:

    • The MIBDIRS directory may also equal $EGO_CONFDIR/kernel/conf/mibs.

    • In a Windows environment, use quotation marks around the event plug-in definition.

      For example, EGO_EVENT_PLUGIN="eventplugin_snmp[SINK=host,MIBDIRS=EGO_TOP\mibs]"

  3. Set EGO_EVENT_MASK=LOG_INFO.

    SYS_VEMKD_UP (an INFO level log entry) occurs when you reconfigure your cluster or when your master host has successfully failed over to a new host.

  4. Save ego.conf and restart your cluster.
  5. Using your SNMP Manager, specify what action you want to take when the trap returns a SYS_VEMKD_UP event.

    You can select what actions the SNMP Manager takes when it receives a specific trap. See your SNMP Manager help for more information.

You are notified of a SYS_VEMKD_UP event that occurs only during successful failover and a cluster reconfiguration.

Note:

To verify that the master host has failed over, run egosh resource list -m. Your master candidates display. Check the Current Master entry.