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

How to save the value of an Event Variable to 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.

I did this in the lab successfully.

I first created a new text attribute on the root model type using the Model Type Editor (MTE). The reason I create the attribute on the root model type is because all models will inherit this new attribute.

I set this attribute to be read/write and save the value in the database.

After creating and noting the new attribute id (0xffff0003 in my test), I created the following event procedure for a test trap:

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

In the AlertMap file for my test trap, I saved the value of the trap variable to Event Variable 100.

In the above Event Procedure, it takes the value of Event Variable 100 and saves it to the 0xfff0000 attribute.