Sending a Custom Cluster-events Email

Sending a Custom Cluster-events Email

Novell Cluster Services for Linux has an option to send notifications out via email about cluster events. In Novell iManager you can configure it to send email to any given account notifying of Critical Events or Verbose Messages.

Notification messages are sent to administrative email accounts or groups containing pertinent information related to cluster events. The messages can't be modified.

IManager- >My Clusters- >(cluster name)- >Cluster options- >Properties- >Notification.

For those cases that require custom messages sent to a person or group to inform about loads or uploads of cluster resources, it is possible to use the Linux command "sendmail" that can be included in the load or unload scripts.


  1. Create the file /tmp/resourceofflinemessage.txt (or any file name) with the following structure:

    Subject: Cluster Resource <Name of Resource> is Offline.

    The cluster resource <Name of Resource> was placed offline, please check your cluster status.

  2. Edit the unload script and add the following line to the end:

    ignore_error sendmail email@email.com < /tmp/resourceofflinemessage.txt

    Example:

    #!/bin/bash
    . /opt/novell/ncs/lib/ncsfuncs
    ignore_error ncpcon unbind --ncpservername=NCPNAME --ipaddress=10.0.0.1
    ignore_error del_secondary_ipaddress 10.0.0.1
    ignore_error nss /pooldeact=POOLNAME
    ignore_error sendmail email@email.com < /tmp/resourceofflinemessage.txt
    exit 0


  3. Copy the file /tmp/resourceofflinemessage.txt in all nodes of the cluster.

    This option can also be used to report the resources loads or any other notification.



PS. For this to work, it is necessary that all the nodes in the cluster can resolve the email address, obviously.

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2014-09-05 21:40
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.