DX NetOps

Expand all | Collapse all

Event Disposition config question - Dynamic Severity

Jump to Best Answer
  • 1.  Event Disposition config question - Dynamic Severity

    Posted 05-24-2016 07:50 AM

    Hi All,


    I'm trying to set up an EventDisp configuration which has one of the OID's containing the severity and want to use this to set the Alarm Severity dynamically:

     

    e.g.:

     

    0x64700002 E 20 A {T cWNotificationSeverity 111}, 0x64700000, 76620

     

    Note: 111 has severity sent as text which is then placed in EventTable 'cWNotificationSeverity' (e.g. - 'major' is resolved to '2').

     

    This isn't working as I'd expect. It's not generating an alarm so I assume this is not possible?

     

    I was hoping not to have to create an event ID for each severity. Has anyone managed to do something like this?

     

    Thanks,

     

    Frank.



  • 2.  Re: Event Disposition config question - Dynamic Severity

    Posted 05-24-2016 09:44 AM
      |   view attached

    Yes, you can do that using the alarm severity set by “Conditional” and chose the variable key=value pair that will define

    The severity.



  • 3.  Re: Event Disposition config question - Dynamic Severity

    Posted 05-24-2016 04:57 PM

    Do you have some example EventDisp file / extract for that please?

     

    I've tried using the format above but it doesn't seem to work. I've had to create seperate EventID's for minor/major/critical.

     

    I'll look at using the gui to do this but tbh I've done most of this using a text editor and editing EventDisp directly



  • 4.  Re: Event Disposition config question - Dynamic Severity

    Posted 05-24-2016 08:14 PM
      |   view attached

    Hi Frank,

     

    I have compiled attached MIB file and map the ciscoWirelessMOStatusNotification trap using MIB Tools. And then I use Event Configuration tool, select the event that has been map to ciscoWirelessMOStatusNotification trap there and set the Alarm Severity to "Conditional", set the  Event Variable to 111 and click the Configure button to create the Severity Map file. The Severity Map file is created under $SPECROOT/custom/Events/<specified vendor dir>/SeverityMaps/ directory. In this example, I have put "Cisco_Router" as <specified vendor dir>.

    ConditionalAlarm.JPG

    $SPECROOT/Events/EventDisp file shows the following

    0xfff00003 E 20 A { v 111 Cisco_Router.cWNotificationServerity },0xfff00003



  • 5.  Re: Event Disposition config question - Dynamic Severity

    Posted 05-25-2016 05:34 PM

    Thanks for everyone's help. I've managed to play some more and got it working. It ended up being a Severity Map file I had and I only wanted 3 of the severities mapped (Critical, Major and Minor ofc!). But all of the suggestions led me to resolving this issue!

     

    Now I just need to find out how to manipulate the Alarm Title some more (e.g. convert all underscores to Spaces and convert all characters to upper case!).


    Thanks for both of your help!



  • 6.  Re: Event Disposition config question - Dynamic Severity

    Posted 05-26-2016 08:16 AM

    Hi Frank,

    Glad you've got your first stage done!

    For your conversion of your title string - assuming you already had it in the dynamic title variable - this event proc would create a new event with that in upper case. The replacement of the underscores is harder - might need  a while() loop as well as ReplaceRegexp() !

    0x7fff0001 E 0 P " \
    CreateEventWithVariables( \

      { C CURRENT_MODEL }, \

      { H 0x7fff0002 }, \

      SetEventVariable( \

        GetEventVariableList(), \

        { U 76620 }, \

        ToUpper( GetEventVariable( { U 76620 } ) ) \

      ) \

    )"

     

    Good Luck!

    Dan.



  • 7.  Re: Event Disposition config question - Dynamic Severity

    Posted 05-27-2016 02:48 AM

    Thanks Dan,


    I'll test this out today! Are the functions documented somewhere (I guess probably not) but thought I'd ask anyway. It seems there are a lot of hidden gems which are not documented.

    I've had a look at the documentation for Event config and they are helpful but seems a lot of advanced functionality isn't always documented.

     

    Regards,

     

    Frank



  • 8.  Re: Event Disposition config question - Dynamic Severity
    Best Answer

    Posted 05-27-2016 03:24 AM

    Hi Frank,

    CA has put a section for Event Procedures back into the documentation since v10 ( it was missing from the docs for the previous few years!)... How to Use Procedures in Event Processing - CA Spectrum - 10.1 and 10.1.1 - CA Technologies Documentation

    but the only place I know of where you can see detailed descriptions of the functions themselves are in strange little xml files in your Spectrum installation in $SPECROOT/SS/CsVendor/CA/Procedures.

    It's a  functional language where everything is a function call or a parameter to one - no assignment (or any other) statements or blocks.  Suggest you indent rigidly or it'll be unreadable to you or anyone (even though the SS will eventually remove all your line continuations). A long-standing ECE bug meant that if you open and save an event def that has an event proc - even to do something innocuous and unrelated to the rules tab (e.g. just  toggling the 'logged' checkbox) - it  truncated your event proc code, corrupting it. I'll bet this is not fixed.

    Enjoy!  Let us know how it goes...

    Cheers, Dan.



  • 9.  Re: Event Disposition config question - Dynamic Severity

    Posted 05-27-2016 05:39 AM

    Many Thanks Dan,

     

    Will check out that out!



  • 10.  Re: Event Disposition config question - Dynamic Severity

    Posted 09-16-2016 11:26 AM

    Hi Frank, can you mark this as answered when you have a chance?

    Thanks

    Jay