In this solution, we use Event Procedures to pass a new attribute named "ifalias" to the Description field of Service Desk Ticket.
In this example, you will use Event Procedures to pass the "Ifalias" attribute to the Service Desk ticket for a Bad link alarm
This solution talks about how to pass the "Ifalias" attribute to the event message and then populate the same in Service Desk ticket. As the Description field in the ticket already holds the event message , we are passing this new attribute to the event message in Spectrum to reflect the same in the ticket.
This is how we execute the solution
- Logon to Spectrum Oneclick. Access the Event configuration editor.
- Filter the event id for an interface alarm . Ex: Bad Link Alarm
- Make a note of the event message /severity and other configurations for this event. Configure the severity of this event to None.
- Create a new event with the same configuration as the old event (Event noted in step 3) and append the below field to the event message
Ifalias = {S 101} -------------> Any event variable number can be used as per your interest
Configure the severity as per the default severity of the old event.
- Save the changes.
- Logon to Spectroserver -> custom/events directory. Open the Event Disp file and add the below code at the end of the file
0x00010d11 P"\ --------------> 10d11 is the event code of Bad link alarm
CreateEventWithAttributes(\
{C CURRENT_MODEL },\
{H 0xfff00000},\ ------------------> New event code in this example. This varies according to your environment
SetEventAttribute(\
GetEventAttributeList(),\
{U 101},\ ------------------------> Passing Iflias attribute as event variable 101 in the new event.
ReadAttribute({C CURRENT_MODEL },\
{H 0x11f7e})))" -------------------------> Attribute id of Ifalias
- Save the file.
- Logon to Oneclick alarms console -> Update the events on the VNM icon and also reload event files from OC ->Administration -> Update event / alarm files -> Click on Reload.
- Generate a bad link alarm on the port and see if the ifalias value is included in the event message of the new event. Have a look at the Description field of Service Desk ticket and observe that it includes the ifalias attribute along with its value.
This way any new model attribute can be passed to the Description field of Service Desk ticket.