I am looking for an example EEM script/applet that would cause my router to change a path selection, based on a triggered event. I usually employ Policy Based Routing on my networks which makes next hop decisions based on the source IP. I want to do something similar with EEM, but rather than a simple source address based decision, I want a next hop selection to be based on an event. (for the example, it could be anything...bandwidth threshold, or at a certain time of day, or whatever). First I want to know if this can be done, and second I would appreciate it if someone could share an example configuration with me. -it's the best way I learn it.
Also, in the example, how is the applet or script applied to the router?
First, there are so many things that you can do with EEM. This goes for the standard EEM engine on the router to running TCL scripts directly on the router. You can run them when you see an event hit the log or you can schedule scripts to run at certain time intervals/days, etc. From the descriptions that you give for wanting to use it, I have to say that there are probably better ways to address certain issues rather than depending on an EEM script to do it. Here's a community dedicated to just EEM scripts. You can take a look at this and the EEM configuration guide to get a really good start:
“Catalyst 8500 Series - Deep Dive”
This event will have place on Tuesday 17th, November 2020 at 10hrs PDT
The Catalyst 8500 Series Edge Platforms are built with the highly programmable, third-generation Cisco Quantum Flow Processor and designed for ...
“Catalyst 8000 Edge Platforms Family Overview”
This event will have place on Wednesday 4th, November 2020 at 10hrs PDT
Designed for an intent-based networks, the Cisco Catalyst 8000 Edge Platforms family offers best-in-class networking and security ...
I'm currently redistributing OSPF to BGP and setting a local pref on the routes. Currently this works fine and having no issues. ip prefix-list ospf-routes seq 10 permit 172.16.100.0/24
route-map ospf-bgp permit 10
match ip address prefix-list ...
Cisco SD-WAN Cloud OnRamp allows you to simplify and secure connectivity to cloud applications and public clouds. Interested in testing out the latest Cisco Cloud OnRamp solutions?
Sign up to try out various use cases with the Cisco SD-WAN Cloud ...
“Use Serviceability Features to Troubleshoot your Cat9K as a Cisco TAC Engineer”
This special event is open only to Cisco Customers and Partners.
Many pages in the Cisco Community are accessible only to Cisco customers, partners, or logged in ...