Tuesday Tip: Configuring Alarm Notifier for the first time CA Spectrum Tuesday Tip by Bill Wolforth, Support Engineer for September 27, 2011 How do you configure Spectrum to send emails when an alarm is received, updated or cleared? Description: AlarmNotifier is a Spectrum utility that can be configured to email users when an alarm is received, updated or cleared. Solution: To configure AlarmNotifier to send an email when an alarm is received. - Via Command Line or Windows Explorer go to the $SPECROOT/Notifier directory - Edit the SetScript File - Locate the following line: - SENDMAIL=False - Modify the entry as follows: - SENDMAIL=True The next line in the SetScript after SENDMAIL is VARFORMAIL. It can be configured to send an email to the email address(es) defined within the NotificationData setting of the associated SANM (Spectrum Alarm Notification Manager) policy. Since troubleshooter assignment is done on existing alarms the RepairPerson option is typically better suited for use in the UpdateScript and the ClearScript. - Continuing on with editing the SetScript - Locate the following line: - VARFORMAIL=RepairPerson - Modify the entry as follows: - VARFORMAIL=NotificationData - Save the changes made to this file. To configure AlarmNotifier to send an email when an alarm is updated (for instance when an alarm is acknowledged) modify the UpdateScript. Follow the steps above and make the same modifications to the SENDMAIL line made in the SetScript. In this case VARFORMAIL can be configured to send an email to a troubleshooter when they are assigned with the RepairPerson setting. The NotificationData option can also be used to send an email via SANM. The third option is Both which can be employed to allow email notifications to both NotificationData and RepairPerson. - To configure VARFORMAIL in the UpdateScript - Locate the following line: - VARFORMAIL=RepairPerson - Configure as required with RepairPerson, NotificationData or Both - Save the changes made to this file. To configure AlarmNotifier to email when an alarm is cleared modify the ClearScript. Follow the steps for modifying UpdateScript above and make the same modifications. At this point, AlarmNotifier can be run via the command line manually. More often than not users want AlarmNotifier to start and restart automatically as opposed to having to start the utility manually. This can be done via processd. Also, the advantage to having AlarmNotifier started via processd is a log will be kept of the notifications that are sent. And processd can be configured to automatically restart Notifier if it is stopped. To start AlarmNotifier automatically and have it restarted if stopped please follow these steps: - Via Command Line or Windows Explorer go to the $SPECROOT/lib/SDPM/partslist directory - Edit the ALARMNOTIFIER.idb - Locate the following lines: AUTORESTART;y; AUTOBOOTSTART;n; - 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; - Save the changes made to this file. The next time this server is rebooted AlarmNotifier will automatically start via processd. These steps will allow processd to start any services that are not already running. But will not impact the services that are running. If you wish to have AlarmNotifier started without a reboot please do the following: - Open a bash shell (on windows run bash –login) - Change directory to $SPECROOT/lib/SDPM - Run: ./processd –restart - 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: - Open a command prompt in Windows - mail -h SMTP Hostname -u Return Username -m Domain Name - 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.
Shahzada wrote:HI Bill,
Thanks for the Tips.
But could you please let me know How to change the sender's email address for Spectrum Alarms, means How to change the from email address. By defauls its sufix spectrum as a user name. for example:
i am getting alarms
""A CRITICAL alarm has occurred on caprdspa (Model Name=RAP-MG-BRDLAL-SW)(Model Type=SwCiscoIOS)
Mon, Sep 19, 2011 at 6:38 PM
A CRITICAL alarm has occurred on caprdspa (Model Name=RAP-MG-BRDLAL-SW)(Model Type=SwCiscoIOS)""
Here if you see, by defaults in form field its showing " spectrum ". Instead of "spectrum email@example.com" we want from filed as firstname.lastname@example.org.
Please let me know how can i change it.
This is a great entry,
But I'm have a question about this. We could configure a rule or something to send cleared notification to some elements?
I have been do that configurations but I have problem with OTRS service, because SPECTRUM sent email to OTRS for create a case in this tool, but with that change in Alarm Notifier in SPECTRUM, It sent 2 emails either when elements go down and when elements started to respond. The above is for all elements in the spectrum platform, As I make this notifications to be send to some elements and not for others?.
How might I segment this? for globall collections?
thanks for your help. @williamwolfforth
Thanks for your good information.
We don't have own mail server , we are using gmail for time being. How would I set gmail server address for spectrum.
we need to configure for sending notification via gmail server .
server name :smtp.gmail.com
recipient name: email@example.com
If you let me know the option for sending notification from spectrum server I will be thankful to you .
If the parameter is "AUTOBOOTSTART;n;" in IDB file and after SpectroSERVER/Processd start/restart, if the alarm notifier is not started automatically, we can use the below command to start the notifier in background without restarting processd for time being and you can change the value to ;y; during the planned down time.
Steps to follow:
Navigate to $SPECROOT/bin and execute the command as below.
./launchinstdbapp <hostname> <install partname> <autorestart> <logname>
Where <hostname> is SpectroSERVER name on which the notifier need to be run.
<install partname> is the processd install ticket name (i.e. IDB file name of the notifier "Example: ALARMNOTIFIER" without idb extension).
<autorestart> Set you y if you want to restart it automatically after the process is killed.
<logname> is the log file name defined in the install ticket (i.e. idb file)
Example: ./launchinstdbapp CASPECTRUM01 ALARMNOTIFIER y NOTIFIER.OUT
Hope this helps.
As per your suggestion I have already completed the above mentioned
task,but I want to know how to setup gmail server name like smtp.gamail.com
and port no :465 and also authentication user name and password.
Client dont have own mail server , they are using gmail mail server for
receiving alerts notification in their personal gmail mail account.
On Tue, Jan 19, 2016 at 3:33 PM, ARHR0503 <
It doesn't appear that the included SimpleMail will work for you. Here are the options provided:
SimpleMail Version 1.1usage: mail [-fhmsu] recipient,recipient... -f "Full Name" -h SMTP_Host (only needed once) -m Return_Hostname (only needed once) -s "Subject" -u Return_Username (only needed once)
But other mail clients can be used. As I recall, Blat would allow you more options such as port, username and password so maybe that would be a better alternative for you. Hope this helps.
Useful for knowing how to configure alarmNotifier.