Junos
Reply
Trusted Contributor
Luca
Posts: 324
Registered: ‎06-11-2009
0
Accepted Solution

Interface Up/Down logging

Hey,

 

I'm new to JunOS and trying to see how i can see, or configure logs for intrface status changes.  I'd like the logs to just be local to the device at the moment (not sent to a syslog server or SNMP trap)

 

So whats the best way to do that type of logging to the console?

Trusted Contributor
rfrederick
Posts: 213
Registered: ‎07-14-2008

Re: Interface Up/Down logging

I would first set updown messages to go to a specific file on the box like this:

 

[edit system syslog]

file interface-logs {
    any any;
    match UpDown;
}

Then if you want to see them on the console, you could type "monitor start interface-logs" to start seeing the messages in that file as they occur on the console.  The command "monitor stop interface-logs" would turn off the console logging for that file.  I think that would take care of it.

 

Ron

Contributor
onemorepash
Posts: 23
Registered: ‎03-25-2008
0

Re: Interface Up/Down logging

I'd propose to use

 

match "<UpDown>"

 

This will strip off some unnecessary stuff.

--
Kind regards,
Pavel
Trusted Contributor
Luca
Posts: 324
Registered: ‎06-11-2009
0

Re: Interface Up/Down logging

Thanks guys.

 

After some mucking around i found matching on ifOperStatus gives the best resutls.

Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.