DX NetOps

 View Only
Expand all | Collapse all

Tuesday Tip: Configuring Alarm Notifier for the first time

Legacy User

Legacy UserSep 28, 2011 05:05 PM

Ollivier-Francois Dorso

Ollivier-Francois DorsoMar 21, 2013 06:58 AM

  • 1.  Tuesday Tip: Configuring Alarm Notifier for the first time

    Broadcom Employee
    Posted Sep 27, 2011 12:44 PM

    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.



  • 2.  RE: Tuesday Tip: Configuring Alarm Notifier for the first time

    Posted Sep 27, 2011 11:00 PM
    Thanks Bill for this great tip on configuring the alarm notifier.
    Mary


  • 3.  RE: Tuesday Tip: Configuring Alarm Notifier for the first time

    Posted Sep 28, 2011 05:05 PM
    Cool tip. I like it.


  • 4.  RE: Tuesday Tip: Configuring Alarm Notifier for the first time

    Posted Sep 29, 2011 07:41 AM
    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)









    from
    spectrum emssupport1@caprdspa.rapdrpgj.com
    to
    santra.samir@gmail.com,
    [Busy] rao.shajada@gmail.com
    date
    Mon, Sep 19, 2011 at 6:38 PM
    subject
    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 emssupport1@caprdspa.rapdrpgj.com" we want from filed as emssupprt1@rapdrpgj.com.

    Please let me know how can i change it.

    Regards,
    Shahzada Rao
    rao.shajada@gmail.com


  • 5.  RE: Tuesday Tip: Configuring Alarm Notifier for the first time

    Posted Sep 29, 2011 10:48 AM

    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)









    from
    spectrum emssupport1@caprdspa.rapdrpgj.com
    to
    santra.samir@gmail.com,
    [Busy] rao.shajada@gmail.com
    date
    Mon, Sep 19, 2011 at 6:38 PM
    subject
    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 emssupport1@caprdspa.rapdrpgj.com" we want from filed as emssupprt1@rapdrpgj.com.

    Please let me know how can i change it.

    Regards,
    Shahzada Rao
    rao.shajada@gmail.com
    Hi Shahzada, you have two options, re-run the mail command, or edit the Windows registry.

    Option 1- rerun mail command:
    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)

    option 2- Update registry:
    Change the username value to what you want here: HKEY_CURRENT_USER\Software\SMail


    Thanks,
    Rob


  • 6.  RE: Tuesday Tip: Configuring Alarm Notifier for the first time

    Posted Jan 12, 2012 08:02 PM
    Is there a way I can start AlarmNotifier without the need to be logged onto a Windows server. Is there a way I can start it as a Windows Service?


  • 7.  RE: Tuesday Tip: Configuring Alarm Notifier for the first time

    Broadcom Employee
    Posted Jan 12, 2012 09:33 PM
    Hi Jason,

    You can use processd to start AlarmNotifier in the background. You will need to edit the $SPECROOT/lib/SDPM/partslist/ALARMNOTIFIER.idb. This is documented in the AlarmNotifier User Guide. Let us know if you have any questions or need assistance with it.

    Regards,

    Roger


  • 8.  RE: Tuesday Tip: Configuring Alarm Notifier for the first time

    Posted Jan 12, 2012 10:33 PM
    I have this in the idb file:
    # Processd Install Ticket for AlarmNotifier
    PARTNAME;ALARMNOTIFIER;
    APPNAME;AlarmNotifier;
    WORKPATH;$SPECROOT/Notifier;
    LOGNAMEPATH;$WORKPATH/ALARMNOTIFIER.OUT;
    ADMINPRIVS;y;
    AUTORESTART;y;
    AUTOBOOTSTART;y;
    #STATEBASED;N;
    NUMPROCS;1; // one per host
    RETRYTIMEOUT;600; // 10 minutes
    #TICKETUSER;$USER;
    RETRYMAX;20; // 3 retries allowed
    STARTPRIORITY;30;
    SERVERPROCESS;Y;
    #ENV;<var>=<value>;
    ARGV;$SPECROOT/Notifier/AlarmNotifier<CSEXE>;

    If I restart spectroserver in the control panel should it then start alarmnotifier?


  • 9.  RE: Tuesday Tip: Configuring Alarm Notifier for the first time

    Broadcom Employee
    Posted Jan 12, 2012 11:48 PM
    No. You will need to restart processd. Processd will now be responsilble for starting, stopping and restarting AlarmNotifier.


  • 10.  RE: Tuesday Tip: Configuring Alarm Notifier for the first time

    Posted Jan 13, 2012 01:24 AM
    restarted the SPECTRUM Process Daemon but AlarmNotifier does not show up in the proces list.


  • 11.  RE: Tuesday Tip: Configuring Alarm Notifier for the first time

    Posted Jan 13, 2012 01:34 AM
    Sorry just had another look and it showed up I failed to sort by process name in taskmanager.


  • 12.  RE: Tuesday Tip: Configuring Alarm Notifier for the first time

    Posted Mar 21, 2013 05:54 AM
    Great tip! Good job!

    What I suggest to anyone trying to run Alarm Notifier on Windows is to take care about registry. When you run mail command for a first time, it fills registry hive HKEY_CURRENT_USER\SMail of the logged in user. If you Spectrum software starts in a context of any other user (that was in my case) it doesn't have registry filled and one will find "SMTP host not specified" in Alarm Notifier activity log file (typicaly \Notifier\NOTIFIER.OUT). In such case one should log in as a proper user, run mail command with parameters and Alarm Notifier will be able to find smtp host and send emails.

    Cheers,
    daniel


  • 13.  RE: Tuesday Tip: Configuring Alarm Notifier for the first time

    Broadcom Employee
    Posted Mar 21, 2013 06:58 AM
    Hi,

    Good Tips and discussions.

    Regards,
    Ollivier


  • 14.  Re: Tuesday Tip: Configuring Alarm Notifier for the first time

    Posted Jul 09, 2015 03:22 PM

    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



  • 15.  Re: Tuesday Tip: Configuring Alarm Notifier for the first time

    Posted Jan 19, 2016 04:26 AM

    Hi

    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

    user sagar@gmail.com

    Password: xxxx

    port :465

    recipient name: joydeep@gmail.com

     

    If you let me know the option for sending notification from spectrum server I will be thankful to you .

     

    Regards

    Sagar



  • 16.  Re: Tuesday Tip: Configuring Alarm Notifier for the first time

    Posted Jan 19, 2016 05:02 AM

    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.

     

     

    Regards,

    Rajashekar



  • 17.  Re: Tuesday Tip: Configuring Alarm Notifier for the first time

    Posted Jan 20, 2016 01:19 AM

    Hi ,

    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.

     

    Regards

    Sagar

     

    On Tue, Jan 19, 2016 at 3:33 PM, ARHR0503 <



  • 18.  Re: Tuesday Tip: Configuring Alarm Notifier for the first time

    Broadcom Employee
    Posted Nov 28, 2016 02:48 PM

    HI Sagar,

    It doesn't appear that the included SimpleMail will work for you. Here are the options provided:

     

    SimpleMail Version 1.1
    usage: 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.

     

    Best regards,

     

    Bill



  • 19.  Re: Tuesday Tip: Configuring Alarm Notifier for the first time

    Posted Nov 23, 2017 06:51 AM

    Useful for knowing how to configure alarmNotifier.