10-24-2012 05:54 AM
Does anyone know if I can run EEM scripts on a Catalyst 3750G switch? If so, what version of IOS do I need to make it work?
Thanks!
10-24-2012 08:10 AM
Yes, you can. For all feature sets, you want 12.2(52)SE or higher to get EEM. For IPSERVICES, you can use 12.2(44)SE or higher.
10-24-2012 09:11 AM
Thanks! I'll get it downloaded and get it cofigured.
10-25-2012 01:24 PM
Joseph,
I want to create a simple EEM script on a Catalyst 3750G running ipservices IOS on it. All I want to do is monitor interfaces GigabitEthernet 1/0/3 and GigabitEthernet 1/0/4. If either of these interfaces go down, I wan the EEM script to shutdown interface GigabitEthernet 1/0/26. Here is what I put together so far. I haven't tried it yet, but do you think this will work?
Thanks!
event manager session cli username "root"
event manager applet Stop_Announcing_BGP
event syslog pattern "Interface GigabitEthernet1/0/3, changed state to down"
event syslog pattern "Interface GigabitEthernet1/0/4, changed state to down"
action 1.0 cli command "enable"
action 1.1 cli command "configure terminal"
action 1.2 cli command "interface gig1/0/26"
action 1.3 cli command "shut"
10-25-2012 01:37 PM
Martin,
In order to link the 2 events and act on either one of them you should change your event trigger to something like this:
event manager applet Stop_Announcing_BGP
event tag event1 syslog pattern "Interface GigabitEthernet1/0/3, changed state to down"
event tag event2 syslog pattern "Interface GigabitEthernet1/0/4, changed state to down"
trigger
correlate event event1 or event event2
I would also recommend to consider:
- Add another action to send a syslog msg so that whatever happened is documented.
- If you are shutting down a BGP session, maybe it would be better to shut the BGP session, and not the interface
- You can shut down the BGP session using "router bgp... neighbor x.x.x.x shutdown"
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