Junos OS

last person joined: 7 days ago 

Ask questions and share experiences about Junos OS.
  • 1.  SNMP traps for syslog messages

    Posted 03-26-2015 13:12

    Hello,

    Is it possible to make a Juniper router generate an SNMP trap when there is any log message above certain severity, let's say warning for example? I want the router to send the particular message over SNMP to a NMS station.

     

     

     



  • 2.  RE: SNMP traps for syslog messages

    Posted 03-26-2015 13:36

    Hello,

    Yes it is possible to convert syslog into SNMP trap, we have Syslog MIB specifically for this purpose.

    http://www.juniper.net/techpubs/en_US/junos14.2/topics/reference/mibs/mib-jnx-syslog.txt

    You will need an event-policy to do that with "raise-trap" action

    http://www.juniper.net/techpubs/en_US/junos14.2/topics/reference/configuration-statement/raise-trap-edit-event-options.html

    HTH

    Thanks

    Alex

     



  • 3.  RE: SNMP traps for syslog messages

    Posted 03-26-2015 14:49

    Hi Alex,

    Thanks for the reply. I tried to do it with event policy, but when I configure the policy with "set event-options policy TEST events  " after events I can specify only some particular log messages, I couldn't figure out how to put there "everything from warning and above". Is there a way to do this?

     

    Cheers

     



  • 4.  RE: SNMP traps for syslog messages
    Best Answer

    Posted 03-27-2015 04:53

    Hello,

    AFAIK, there is no way to do "indiscriminant severity match" in JUNOS event-policies as wildcards are not supported in [event-options policy <> events] stanza.

    You have to do some research first, indentify events with your chosen severity threshold or above, and specify all of them in 1 or more event policies.

    There could be only 20 policy instances being executed at any given time/concurrently, default is 15.

    http://www.juniper.net/techpubs/en_US/junos14.2/topics/reference/configuration-statement/max-policies-edit-event-options.html

    https://www.juniper.net/techpubs/en_US/junos13.3/topics/topic-map/junos-script-automation-script-memory.html 

    Chose Your events carefully or You could get no trap sent when there is a flurry of syslog messages.

    HTH

    Thanks

    Alex