Switching

 View Only
last person joined: 4 days ago 

Ask questions and share experiences about EX and QFX portfolios and all switching solutions across your data center, campus, and branch locations.
  • 1.  Send UP+DOWN to syslog

    Posted 12-31-2012 04:01

    Hi,

     

    I'm kind of new to Juniper while Cisco was my whole life 🙂

    I'm trying to do simple thing, i want to send to remote syslog interface up/down notification.

     

    Current config :

    host 1.1.1.1 {
    any warning;
    authorization info;
    facility-override local7;

    }

     

    I'm not getting down, which is marked as warning, but i dont get UP which is "info"

    i could achive this by setting "log info" but then i get alot of junk.

    Also i can use "match SNMP_TRAP_LINK" but now i lose other major issue's like VCCP issues

     

    I wonder, Does Jun-OS is so hard to achive this ?

     

    Thanks

    Chura


    #up
    #SNMP
    #interface
    #syslog
    #down


  • 2.  RE: Send UP+DOWN to syslog

    Posted 12-31-2012 08:30

    It might seem arduous, but you can exclude or match on many different log messages with regular expressions.  The benefit is that you  can take different approaches. You could match messages you want to look for and/or you can filter out noise by excluding messages that you want to ignore. If you invest some time with regular expression matching, you will find you have a lot of control over what gets sent to your syslog host.

     

    http://www.juniper.net/techpubs/en_US/junos11.4/information-products/topic-collections/syslog-messages/index.html?jd0e4740.html

     

     

     



  • 3.  RE: Send UP+DOWN to syslog

    Posted 12-31-2012 09:39

    Thanks for the info.

    However i didn't find the way to do so without losing crucial messeges in future.

    Any chance you have config example of what you talk about ?



  • 4.  RE: Send UP+DOWN to syslog
    Best Answer

    Posted 12-31-2012 11:55

    Hello,

    Have a look at "priority-override" knob

    http://www.juniper.net/techpubs/en_US/junos12.1/topics/topic-map/junos-script-automation-event-policy-event-syslog-priority.html

    You have to to use JUNOS 12.1 or newer

    HTH

    Rgds

    Alex



  • 5.  RE: Send UP+DOWN to syslog

    Posted 12-31-2012 12:42

    This is Exactly, EXACTLY what i was looking for 🙂

    Too bad google wasn't smarter lol

     

    Thanks!

     

    edit:

    Simple as that, working flawless 🙂

     

    event-option {

    policy SNMP_LINK_UP_TO_WARNING {

    event snmp_trap_link_up;

    then {

    priority-override {

    severity warning;

    }

    }

    }

    }

     



  • 6.  RE: Send UP+DOWN to syslog

    Posted 01-04-2013 19:22

    Handy!

     

    I had no idea about the priority override.  I would simply have created a log at event level info and filtered for "SNMP_TRAP_LINK_(UP|DOWN).


    Thank you for posting the event-option snippet.  I'm going to file that away for use after we upgrade to 12.1.

     

    Also, for what it is worth, this is what I set up to capture all snmp messages.  Works on any version

    syslog{
    file snmpd { daemon info; match "mib2d\["; }
    }

    You wind up with a log file that contains any message from the mib2b daemon and is one spot to look at for link up/down, peer up/down, etc.

     

    -Chad