Hello,
Thanks Joe,
Robert, accutually i need to show three or 4 variables.. so i used this code :
0xfff01f72 E 0 P "CreateEventWithVariables({ C CURRENT_MODEL },{ H 0xfff01f61 },SetEventVariable (GetEventVariableList(),{ H 0x00012b4c },Append({ S \"\" },Append(Append({ S \"\" },GetEventVariable ( { U 5 } )),Append({ S \" - \" },Append (Append ({ S \"\" },GetEventVariable ( { U 7 } )),Append ({ S \" - \" },GetEventVariable ( { U 12 } ))))))))"
0xfff01f78 E 0 P "CreateEventWithVariables({ C CURRENT_MODEL },{ H 0xfff01f79 },SetEventVariable (GetEventVariableList(),{ H 0x00012b4c },Append({ S \"\" },Ap
0xfff01ef3 R CA.EventCondition, "({v 6} == {S \"warning\"} && {v 4} != {S \"QUALITY\"})" , "0xfff01f74 -:-" R CA.EventCondition, "({v 6} == {S \"critical\"} && {v 8} == {S \"Input\"})" , "0xfff01f73 -:-" R CA.EventCondition, "({v 6} == {S \"minor\"} && {v 4} != {S \"QUALITY\"})" , "0xfff01f74 -:-" R CA.EventCondition, "({v 6} == {S \"major\"} && {v 5} != {S \"FACEPLATEMISS\"})" , "0xfff01f75 -:-" R CA.EventCondition, "({v 6} == {S \"critical\"} && {v 8} == {S \"failure\"})" , "0xfff01f77 -:-" R CA.EventCondition, "({v 6} == {S \"critical\"} && {v 8} == {S \"LAN\"})" , "0xfff01f72 -:-" R CA.EventCondition, "({v 6} == {S \"critical\"} && {v 8} != {S \"LAN\"} && {v 8} != {S \"failure\"} && {v 8} != {S \"Input\"})" , "0xfff01f76 -:-"
0xfff01f61 E 0 A 3,0xfff01f61,U
And i need to know please if there is a way to edit it and do a condition to show variables even if one or more variables are empty.
Thanks for your help.
KInds regards
Sara
Original Message:
Sent: 10-14-2020 04:43 PM
From: ROBERT KETTLES
Subject: Create a dynamic alarm
I've got one:
0x3dc0004 P "If ( Regexp( GetEventVariable({U 17}), {S \"\\\\[sdwan\\\\]\"}),\
CreateEventWithVariables( { C CURRENT_MODEL }, {H 0x066e2000},\
SetEventVariable( GetEventVariableList(), {H 0x12b4c},\
GetRegexp( GetEventVariable( {U 17} ), {S \"\\\\[sdwanDatapathSlaNotMet\\\\] \\\\[.*\\\\] (.*)\"}, {U 1}))),\
CreateEventWithVariables( { C CURRENT_MODEL }, { H 0x06a50006 }, SetEventVariable(GetEventVariableList(), {H 0x12b4c}, GetRegexp( GetEventVariable( { U 17 } ), {S \" (%[A-Za-z0-9_-]*:.*)\"}, {U 1} ) )))"
Original Message:
Sent: 10-14-2020 03:19 PM
From: Joseph Ackley
Subject: Create a dynamic alarm
Sara,
The only thing I can think of is to add an "if" statement to the event procedure checking of the trap varbind has a value or not.
Unfortunately, I am not sure how to accomplish this.
Does anyone have any experience using the "if" statement in an event procedure?
Joe
Original Message:
Sent: 10-14-2020 11:26 AM
From: Assistance GAR
Subject: Create a dynamic alarm
Hello,
The technical solution is working properly, but i noticed a strange behavior.
The alarm title is empty when one of the variable trap is empty, is there any solution for this please ?
Thanks and regards
Sara
Original Message:
Sent: 09-21-2020 04:11 AM
From: Assistance GAR
Subject: Create a dynamic alarm
Hello Joe,
thank you.
That really help me to get all the values.
Have a nice day !
Sara
Original Message:
Sent: 08-21-2020 02:07 PM
From: Joseph Ackley
Subject: Create a dynamic alarm
Sara,
I did this up in the lab:
0xfff00004 E 0 A 3,0xfff00004
0xfff00003 E 0 P "CreateEventWithVariables({ C CURRENT_MODEL },{ H 0xfff00004 },SetEventVariable (GetEventVariableList(),{ H 0x00012b4c },Append({ S \"\" },Append(Append({ S \"\" },GetEventVariable ( { U 1 } )),Append({ S \" - \" },Append (Append ({ S \"\" },GetEventVariable ( { U 2 } )),Append ({ S \" - \" },GetEventVariable ( { U 3 } ))))))))"
The value of event variable 1 from my trap is "Test", 2 is "Event" and 3 is "Procedure".
I used TrapGen to send the trap to Spectrum and I see the following alarm title:
Original Message:
Sent: 08-21-2020 11:04 AM
From: Assistance GAR
Subject: Create a dynamic alarm
Hello Joseph,
I need to show the values from the traps not getting the values from the attributes.
I followed the first KB you sent to me but it's not really showing me the title alarm. this is my code :
The 0xfff01ef3 is the code of the trap where i have all the variables, it still with none status and the some conditions in event condition to generate the critical alarm with the code 0xfff01f62
The code 0x00012b4c, i puted it by default in the event disp. should i create it in the event configuration ?
Then { I 1 } and { S2 } are the variables that i need to show in the title alarm.
This is the format of the trap :
A "alarm" event has occurred, from {t} device, named {m}.
Notification that an alarm is currently active
currentAlarmId = {I 1}
friendlyName = {S 2}
eventTime = {S 3}
----
With this details, do you think that i need to add other configurations so that i get the title alarm ?
Thank you.
Sara
Original Message:
Sent: 08-21-2020 08:43 AM
From: Joseph Ackley
Subject: Create a dynamic alarm
Sara,
It does not matter if the event is from a trap or not, the functionality is still the same.
If I am correct, you want to include attribute values in your dynamic alarm title, correct?
If so, you will need to use the GetEventAttributeList to save the value of the attribute to an event variable. not the GeteEventVariableList.
The following knowledge article has an example of how to do this.
https://knowledge.broadcom.com/external/article?articleId=51929
So what you will need to do is configure multiple Append parameters in your event procedure to add these attribute values to the dynamic alarm title event variable 0x12b4c.
Joe
Original Message:
Sent: 08-21-2020 08:29 AM
From: Assistance GAR
Subject: Create a dynamic alarm
Hello Josheph,
I tried the Kb you sent to me, but i still dont have the title alarm
I found this kb:
https://community.broadcom.com/communities/community-home/digestviewer/viewthread?MID=800803
First, to show only two variables, i used this code :
0xfff01f6a E 0 P " CreateEventWithVariables( {C CURRENT_MODEL}, {H 0x5e100017}, SetEventVariable( SetEventVariable( GetEventVariableList(), {H 0xfff01f6b}, Append({S \"device - \"}, GetRegexp( GetEventVariable({ I 0 }), { S \"with normal (.*)\" }, { I 2 } ))
0xfff01f6c E 0
the 0xfff01f6a is the code of the event procedure.
the 0x5e100017 is the code of the trap
0xfff01f6c and 0xfff01f6b are new codes for the two variables.
But i still have an empty alarm. Can you tell me please if i need to add something else ?
Thank you
Sara
Original Message:
Sent: 08-20-2020 11:32 AM
From: Joseph Ackley
Subject: Create a dynamic alarm
Sara,
You will need to use multiple Append parameters in your procedure.
The following knowledge article has a good example:
https://knowledge.broadcom.com/external/article?articleId=48841
Joe
Original Message:
Sent: 08-20-2020 10:50 AM
From: Assistance GAR
Subject: Create a dynamic alarm
Hello Everyone,
I'm trying to create a dynamic alarm , the purpose is to show in the alarm three value of three variables from the trap.
I created a new code 0xfff00027 for the event procedure
0xfff01f69 is the critical alarm
Normally i can use this format to show only one variable :
0xfff00027 P " CreateEventWithVariables( { C CURRENT_MODEL }, { H 0xfff01f69 },SetEventVariable(GetEventVariableList(),{ H 0x00012b4c },Append( { S \"Critical alarm: \" },GetEventVariable( { S 1 } ) ) ) )"
0xfff01f69 E 20 A 3,0xfff00027
Can you tell me please how i edit this code to have three variable in the alarm please ?
The variable are all with string types.
Thank you
Sara
------------------------------
Sara
------------------------------