Forum Discussion

Vitor_Santos's avatar
4 years ago

Script EventSource to grab Traps?? Is it possible?

Hello LM folks,

Due to the fact of LM not suppressing SNMP Traps, we've came up with an idea to do it ourselves (leveraging the API).

However, we need to somehow listen to those traps via Groovy scripting (if possible of course). This doesn't seem doable but, doesn't hurt to ask.

Did anyone accomplished/had this need in the past?

Thanks!

  • Exactly, that's one of the intentions that we've as well.
    It would be very handy. However, I'm not sure if this is doable.

    We would like to create a scripted Event Source for Traps to accomplish the message suppression as well (that's lacking on ES for Traps currently).

  • I too would like that ability.    While the traps is somewhat functional, I'd like to be able to take the trap and write some scripting to replace some of the OIDs in the message of the trap to what their names actually are within the MIB. 

     

    Something like this: 
    Enterprise OID: 1.3.6.1.4.1.231.7.2.1.21.2.3
    Message:  1.3.6.1.4.1.231.7.2.1.21.1.3.2: SYS1
    1.3.6.1.4.1.231.7.2.1.3.1.1.1: 1
    1.3.6.1.4.1.231.7.2.1.3.1.1.10: ADVISORY
    1.3.6.1.4.1.231.7.2.1.3.1.1.11: --
    1.3.6.1.4.1.231.7.2.1.3.1.1.12: --
    1.3.6.1.4.1.231.7.2.1.3.1.1.13: --
    1.3.6.1.4.1.231.7.2.1.3.1.1.14: 1615802432
    1.3.6.1.4.1.231.7.2.1.3.1.1.2: 0
    1.3.6.1.4.1.231.7.2.1.3.1.1.3: 0
    1.3.6.1.4.1.231.7.2.1.3.1.1.4: 2147481553
    1.3.6.1.4.1.231.7.2.1.3.1.1.5: F4066
    1.3.6.1.4.1.231.7.2.1.3.1.1.6: M4
    1.3.6.1.4.1.231.7.2.1.3.1.1.7: NO ACT
    1.3.6.1.4.1.231.7.2.1.3.1.1.8: BPA
    1.3.6.1.4.1.231.7.2.1.3.1.1.9: CP
    enterpriseOid: 1.3.6.1.4.1.231.7.2.1.21.2.3
     

     

    To this: 
    Enterprise OID: 1.3.6.1.4.1.231.7.2.1.21.2.3 
    Message:  hicomErrTrpMnemonic: SYS1
    hicomErrorPabxId: 1
    hicomErrorSubevent: ADVISORY
    hicomErrorCardRef: --
    hicomErrorBoardVersion: --
    hicomErrorFwType: --
    hicomErrorTimDat: 1615802432
    hicomErrorAlGroup: 0
    hicomErrorAlSubId: 0
    hicomErrorSerialNo: 2147481553
    hicomErrorMsgId: F4066
    hicomErrorPriority: M4
    hicomErrorAction: NO ACT
    hicomErrorAbsMod: BPA
    hicomErrorEvent: CP
    enterpriseOid: 1.3.6.1.4.1.231.7.2.1.21.2.3