Configure Failover Notification

Describes when and how to set up an email sent out when a SMW HA failover occurs.

Failover notification requires email to be configured on both SMWs. For information about configuring email, see http://www.postfix.org/BASIC_CONFIGURATION_README.html.

The SMW HA software includes a Notification resource that automatically sends email when a failover occurs.

The failover notification can be configured either during initial installation or after the HA system is installed and running.

  1. Execute the crm resource command.
    smw1# crm resource param Notification set email address@thedomain.com 

    Only one email address is allowed. To send notifications to multiple addresses, create a group email alias that includes these email addresses.

  2. Verify the setting.
    smw1# crm resource param Notification show email
    address@thedomain.com

    If a failover occurs, the Notification resource sends several messages that are similar to the following examples.

    From: root [mailto:root@smw.none] 
    Sent: Thursday, June 06, 2013 9:20 PM
    To: Cray Cluster Administrator
    Subject: ***Alert*** A Failover may have occurred. Please investigate! Migrating resource 
    away at Thu Jun 6 21:20:25 CDT 2013 from smw1
    
            ***Alert*** A Failover may have occurred. Please investigate! Migrating resource away 
                        at Thu Jun  6 21:20:25 CDT 2013 from smw1
     
            Command line was:
            /usr/lib/ocf/resource.d//heartbeat/MailTo stop
    From: root [mailto:root@smw.none] 
    Sent: Thursday, June 06, 2013 9:20 PM
    To: Cray Cluster Administrator
    Subject: ***Alert*** A Failover may have occurred. Please investigate! Takeover in progress 
    at Thu Jun 6 21:20:25 CDT 2013 on smw2
    
            ***Alert*** A Failover may have occurred. Please investigate! Takeover in progress 
                        at Thu Jun  6 21:20:25 CDT 2013 on smw2
     
            Command line was:
            /usr/lib/ocf/resource.d//heartbeat/MailTo start