search cancel

Alarm Notifier - Passing the Notes attribute for Specific Alarms

book

Article ID: 253374

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction


We would like to add the contents of the Notes/0x11564 attribute with certain alarms being sent by the Alarm Notifier.

Environment


Release: 21.2, 22.2

Resolution


Configure the AlarmNotifier to pass the Notes/0x11564 attribute as an environment variable with the alarms.

   - Modify the Notifier's .alarmrc configuration file
         cd $SPECROOT/Notifier/
         edit: .alarmrc

         set: EXTRA_ATTRS_AS_ENVVARS=0x11564

     

       Note 1: If you have more than 1 attribute make sure they are comma separated example (EXTRA_ATTRS_AS_ENVVARS=0x11564,0x100c5)
       Note 2: If on Windows, the attribute handle value needs to be in all upper case example (EXTRA_ATTRS_AS_ENVVARS=0X11564,0X100C5)

 

   - The notifier will need to be restarted for the .alarmrc change to be picked up

 

Configure the SetScript to use the Notes attribute



 Here I added a new script variable 'Notes' setting it equal to SANM_  + the attribute handle so SANM_0x11564
     Notes=${SANM_0x11564}

 

In the false branch of (if [ "$SENDMAIL" = "True" ]) I decided to check to see if the PCAUSE is 1040a (Bad Link Detected) and if so
modify the event message pre-fixing the notes attribute value. If not, leave the message alone.

 

 


This is just an example, of how to pass an additional attribute to the Notifier and use it conditionally. The script can be customized and
   the attribute can be used in other areas or checks.


Attachments