01-13-2016 12:05 PM
I'd like to know how I can match a syslog pattern of BGP neighbor down, without taking into account the actual IP address of the neighbor. The normal syslog message is as follows:
%BGP-5-ADJCHANGE: neighbor 1.1.1.1 vpn vrf outside Down
What I was hoping is I can use a regular expression character to match the syslog pattern as follows "%BGP-5-ADJCHANGE: neighbor & Down", but I have not read anywhere that this is possible. Not sure if this would require a separate syslog pattern, one for "%BGP-5-ADJCHANGE: neighbor" and one for "Down", or if there is a better way to go about this? Can someone assist?
Solved! Go to Solution.
01-14-2016 06:15 AM
This regexp will work if you want to match on any neighbor IP.
BGP-5-ADJCHANGE: neighbor [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\s+[A-Za-z\s]+ Down
01-14-2016 06:15 AM
This regexp will work if you want to match on any neighbor IP.
BGP-5-ADJCHANGE: neighbor [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\s+[A-Za-z\s]+ Down
01-14-2016 11:08 AM
Thank you!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide