How to save the value of an Event Variable to an attribute in the SpectroSERVER Database
search cancel

How to save the value of an Event Variable to an attribute in the SpectroSERVER Database

book

Article ID: 231030

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

I have an EMS that is sending alarms to Spectrum via a southbound gateway. One of the varbinds sent is the alarm ID in the EMS. I need to save this varbind so that I can use it to clear the alarm in the EMS when the Spectrum alarm is cleared by an agent.

Environment

Release : Any

Component : AlarmNotifier

Resolution

What you will need to do is use an Event Procedure to save the value of the alarmID trap variable to an attribute in the Spectrum database.

Then, modify the .alarmrc file to pass that value to the AlarmNotifier scripts.

 

1.  Create a new text attribute on the type you want the attribute on using the Model Type Editor (MTE).   For example, on GnSNMPDev

2.  Set this attribute to be read/write and save the value in the database.

3.  After creating and noting the new attribute id (0xffff0003 in this example), use the following event procedure:

0xfff00001 E 0 A 3,0xfff00001 P "WriteAttribute( { C CURRENT_MODEL }, { H 0xffff0003 },GetEventVariable( { U 100 } ))"

4.  Map the varbind of the trap to a variable number in the AlertMap - in this example it is 100

 

The event procedure will generate event 0xfff00001 and alarm 0xfff00001 and will take the value of Event Variable 100 and saves it to the 0xfff0000 attribute.