Cool Solutions

Sending a Custom Cluster-events Email



By:

September 5, 2014 1:40 pm

Reads:2,322

Comments:0

Score:Unrated

Print/PDF

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.

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading...

Tags: , , ,
Categories: Business Continuity, Cluster Services, File Services and Management, High Availability & Disaster Recovery, IT Operations Management, Open Enterprise Server, Technical

0

Disclaimer: This content is not supported by Micro Focus. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

Comment

RSS