DX NetOps

 View Only
  • 1.  Procedure

    Posted Apr 12, 2021 05:09 AM
    Hello Broadcom,

    We created a procedure in Spectrum to extract a substring from a varbind, which we will be using in a new event. (Parse a single varbind into multiple)
    The procedure compiles without any errors, but when the procedure is triggered we receive following messages:
    Any idea what is wrong?

    Thx,
    Lieven Stubbe
    Belgian railways

    4/12/21, 10:53:04 AM[Current Event: 0xfff00266] [Current Model: 0x8740899] Error: Procedure CA.if: does not exists!
    Procedure CA.if invoked for event 0xfff00266 did not evaluate successfully (error reason: Unknown procedure)
    4/12/21, 10:53:04 AM[Current Event: 0xfff00266] [Current Model: 0x8740899] Error: Procedure CA.if: does not exists!
    Procedure CA.if invoked for event 0xfff00266 did not evaluate successfully (error reason: Unknown procedure)
    4/12/21, 10:53:04 AM[Current Event: 0xfff00266] [Current Model: 0x8740899] Error: Procedure CA.if: does not exists!


    EventMessage: Mon 12 Apr, 2021 - 10:53:04 - Unknown alert received from device f5brumz1-acc-infrabel.msnet.railb.be of type Pingable. Device Time 0+00:01:31. (Trap type 1.3.6.1.4.1.3375.2.4.6.301) (event [0x00010801])
    Trap var bind data:
    OID: 1.3.6.1.2.1.1.3.0 Value: 9172
    OID: 1.3.6.1.6.3.1.1.4.1.0 Value: 1.3.6.1.4.1.3375.2.4.0.301
    OID: 1.3.6.1.4.1.3375.2.4.1.1 Value: No members available for pool /infrabel/a1215-acc-proxyi1-monitor_pool (slot1)
    OID: 1.3.6.1.6.3.1.1.4.3.0 Value: 1.3.6.1.4.1.3375.2.4

    0xfff00266 P "if(regexp({U 2}, {S \"No members available for pool\"} ) ,CreateEventWithVariables({ C CURRENT_MODEL},{ H 0xfff002e9}, SetEventVariable( SetEventVariable( GetEventVariableList(), {U 111}, GetRegexp( GetEventVariable({U 2}),{S\"No members available for pool (.*) \"},{U 2}) ) )), CreateEventWithVariables({ C CURRENT_MODEL},{ H 0xfff002e9}        , SetEventVariable( GetEventVariableList(), {U 111}, {S \"Trap var bind parsing not possible\"} ) ) )"



  • 2.  RE: Procedure

    Posted Apr 12, 2021 05:22 AM
    The procedure names are case sensitive. So it should be If and not if.

    ------------------------------
    Senior Consultant
    SolvIT Networks
    ------------------------------



  • 3.  RE: Procedure

    Posted Apr 13, 2021 03:41 AM
    Hello Catalin, 

    Many thanks for the help, indeed, If & GetRegexp need capital in front, otherwise an error is thrown. (very confusing)

    One more question, how do we address event variable v2 from the trap in a procedure? In an event condition this is addressed by {v 2}

    if(regexp({V 2}, {S \"No members available for pool\"} )

    Kind regards,
    Lieven


  • 4.  RE: Procedure

    Posted Apr 13, 2021 12:11 PM
    You should be checking the definition for the Procedure, as it fully describes how it should be used. You can find it under $SPECROOT/SS/CsVendor/CA/Procedures.

    I would suggest also searching for an existing example in the Event Disposition files, as it would be easier to find the correct syntax that way. It's a bit cumbersome the syntax for the Event Procedures.

    ------------------------------
    Senior Consultant
    SolvIT Networks
    ------------------------------



  • 5.  RE: Procedure

    Posted Apr 15, 2021 02:48 AM
    Hello Catalin,

    After many blood, sweat an tears we succeeded to create a valid procedure. The fact that in Event Rules "regexp" starts with lower capital, and in Procedures "Regexp"  needs to be Upper capital, is very confusing. CA should really do something about that!!

    0xfff00267 P "If(Regexp(GetEventVariable({U 2}), {S \"now has available members\"} ) ,CreateEventWithVariables({ C CURRENT_MODEL},{ H 0xfff002ea},SetEventVariable( GetEventVariableList(), {U 111}, GetRegexp( GetEventVariable({U 2}),{S\"Pool (.*) now has available members\"},{U 1}))), CreateEventWithVariables({ C CURRENT_MODEL},{ H 0xfff002ea}, SetEventVariable( GetEventVariableList(), {U 111}, {S \"Trap var bind parsing not possible\"} ) ) )"