How to configure Spectrum Alarm Notifier to send email notifications

book

Article ID: 21373

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

How to configure Spectrum AlarmNotifier to send email notifications.

NOTE: These instructions assume you are using the default AlarmNotifier process and scripts.



Environment

Release:
Component:

Resolution

To configure AlarmNotifier to send an email when an alarm is received.

1. Edit the $SPECROOT/Notifier/SetScript file 

2. Locate the following line:

SENDMAIL=False

3. Modify the entry as follows:

SENDMAIL=True

4. Locate the following line

VARFORMAIL=RepairPerson

5. Modify the entry as follows:

VARFORMAIL=Both

6. Save the changes made to this file

Modify the ClearScript and UpdateScript files using these same instructions.

NOTE: When using editors to modify these files, be sure to save the files in ascii text format only. Ensure the files are not saved with extensions like .txt, .rtf etc.

NOTE2:  During an upgrade the default AlarmNotifier script files will be overwritten and set back to the defaults.   Custom named script files remain untouched.    If you are using the default scripts it is recommended to take a backup of the Notifier and lib/SDPM/partslist folders before upgrading.

 
Additional Information:
For more information on Alarm Notifier please reference:


https://docops.ca.com/ca-spectrum/10-1/en/managing-client-applications/alarmnotifier

Additional Information

To ensure AlarmNotifier is always running, you can configure processd to automatically start AlarmNotifier at processd startup and to restart AlarmNotifier should processd see the AlarmNotifier process has stopped.

To configure processd to do this:

1. $SPECROOT/lib/SDPM/partslist/ALARMNOTIFIER.idb file

2. Locate the following lines:

AUTORESTART;y;
AUTOBOOTSTART;n;


3. Out of the box you can see AUTORESTART is already set to yes. Change the AUTOBOOTSTART to yes also. The entries should now appear as:

AUTORESTART;y;
AUTOBOOTSTART;y;


4. Save the changes made to this file

5. On Windows, start a bash shell by running "bash -login". On Linux or Solaris, su to the root user

6. cd to the $SPECROOT/lib/SDPM directory

7. Enter the following command to restart processd and pick up the changes made to the ALARMNOTIFIER.idb file:

./processd.pl restart

8. Verify AlarmNotifier is now a running process

WINDOWS ONLY

CA includes Simple mail for use in sending emails. This will also need to configured for AlarmNotifier to successfully send an email. To configure Simple mail please do the following:

1. Open a command prompt in Windows and enter the following command where <HOSTNAME> is the hostname of the smtp mail server, <USERNAME> is the return e-mail address, and <DOMAIN> is the domain name

mail -h SMTP <HOSTNAME> -u <USERNAME> -m <DOMAIN> 

As an example mail -h smtp.ca.com -u spectrum -m ca.com

Once this command is run you can run regedit and search for smail. In the smail folder these are the entries from the example. You should see the settings you used.

Default REG_SZ (value not set)
hostname REG_SZ ca.com
smtphost REG_SZ smtp.ca.com
username REG_SZ spectrum


SOLARIS/LINUX ONLY

AlarmNotifier utilizes the email utility configured for the Operating System, typically this is sendmail. If emails fail to send please see your system admin to ensure sendmail is set up correctly for your environment.

Please reference the "AlarmNotifier" section of the documentation for more information.


If you would like to have a different subject in the email sent to different recipients:

This is configured in the SetScript for the Notifier process ($SPECROOT/Notifier/SetScript) via this line:

$MAIL -s "A $SEV alarm has occurred on $SERVER (Model Name=$MNAME)(Model Type=$MTYPE)" $RCVRS < /tmp/set_alarm.$PID

There's an if/then statement tied around this, that you could modify to use a different $MAIL -s entry:

if [ "$RCVRS" -a "$RCVRS" != " " ]
   then
      echo " "
      echo "*******************************************************************"
      echo "Sending mail to $RECIPIENTS:" 
      echo ""
      echo "($RCVRS)"
      echo "*******************************************************************"
      echo_info | tee -i /tmp/set_alarm.$PID
      $MAIL -s "A $SEV alarm has occurred on $SERVER (Model Name=$MNAME)(Model Type=$MTYPE)" $RCVRS < /tmp/set_alarm.$PID
      rm -f /tmp/set_alarm.$PID
   else
      echo " "
      echo "*****************************************************"
      echo "NO $RECIPIENTS assigned - no mail sent"
      echo "*****************************************************"
      echo_info
   fi


You could add in another if/then statement so that if it met other criteria use a different $MAIL -s entry.