10-14-2019 07:02 AM
I have configured EEM script on our routers for sending email when a BGP neighbor goes down on the router.
I would like to check/test if the router is able to send email or not when a BGP neighbor goes down, how can we test that the router I configured EEM script can send/reach email server
10-14-2019 07:23 AM
here is sample EEM
you can modify as per teh requirement
%BGP-5-ADJCHANGE: neighbor x.x.x.x Down BGP Notification sent
%BGP-5-ADJCHANGE: neighbor x.x.x.x Up
Configure terminal
event manager applet BGP
event syslog pattern “.*%BGP-5-ADJCHANGE:.*”
action 1.0 cli command “enable”
action 2.0 cli command “sh ip bgp nei | in BGP nei|BGP state|Desc”
action 3.0 mail server “mail.google.com” from “bgpfail@google.com.com” to “you@yourcompany.com” subject “Router BGP peer status down” body “$_cli_result”
10-14-2019 07:29 AM
Thank you Balaji.
I configured the script. The problem is when BGP neighbor goes down we are not receiving the email from router but when BGP neighbor comes up we are receiving the email from Router. When i checked in the log i see following log for smtp at the time of neighbor down.
%HA_EM-3-FMPD_SMTP: Error occurred when sending mail to SMTP server: 10.3.8.24 : timeout error
10.3.8.24 is our smtp server. I can ping 10.3.8.24 from the Router.
10-14-2019 09:06 AM
%HA_EM-3-FMPD_SMTP: Error occurred when sending mail to SMTP server: 10.3.8.24 : timeout error
This could be reason, when the BGP down, you do not have routefor this IP ? in routing table ?
is this external IP ? check when BGP down, do you have reachability to your SMTP Server ?
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