How to configure Spectrum Alarm Notifier to send email notifications
search cancel

How to configure Spectrum Alarm Notifier to send email notifications

book

Article ID: 21373

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

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: 20.2, 21.2

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:

Managing Client Applications
https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/spectrum/21-2/managing-client-applications.html

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

NOTE: Starting from 10.4.2.1 / 20.2.3, the processd.pl restart will now also stop the SpectroSERVER and Archive Manager. As an alternative, use the processd executable to restart the service and this will not stop the SS and ArchMgr. Below is an example:

./processd --restart


Starting in Spectrum 10.4.2.1, processd.pl script will now also stop the SpectroSERVER and Archive Manager
https://knowledge.broadcom.com/external/article?articleId=201598

8. Verify AlarmNotifier is now a running process

WINDOWS ONLY

CA includes Simple mail for use in sending emails. This will also need to be 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 <SMTP HOSTNAME> is the hostname of the smtp mail server, <USERNAME> is the return e-mail address, and <DOMAIN> is the domain name in the $SPECROOT/NT-Tools/SRE/bin directory:

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

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

./mail.exe -h snmtp.ca.com -u spectrum -m ca.com

Once this command is run you can run regedit and search for SMail. In the HKEY_CURRENT_USER/Software/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.