Sending a Custom Cluster-events Email

0 Likes

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.

 

    1. 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

 

  1. 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.

Labels:

How To-Best Practice
Support Tip
Comment List
Anonymous
Related Discussions
Recommended