09-27-2011 08:11 AM
Hello All,
I have configured ipsla + EEM to run an actions list when a node is down or UP.Below the configuration.
-------------------------------------------------------------------------------------------
ip sla monitor 10
type echo protocol ipIcmpEcho 10.18.48.1
timeout 500
frequency 15
ip sla monitor schedule 10 life forever start-time now
event manager applet SLA-DOWN
event snmp oid 1.3.6.1.4.1.9.9.42.1.2.9.1.6.10 get-type exact entry-op eq entry-val 1 exit-op eq exit-val 2 poll-interval 10
action 1.1 cli command "enable"
action 1.2 cli command "conf t"
action 1.3 cli command "interface fa0/0"
action 1.4 cli command "ip access-group MYTRAFIC out"
action 1.5 cli command "end"
action 1.6 cli command "exi"
event manager applet SLA-UP
event snmp oid 1.3.6.1.4.1.9.9.42.1.2.9.1.6.10 get-type exact entry-op eq entry-val 2 exit-op eq exit-val 1 poll-interval 10
action 1.1 cli command "enable"
action 1.2 cli command "configure terminal"
action 1.3 cli command "interface fa0/0"
action 1.4 cli command "no ip access-group MYTRAFIC out"
action 1.5 cli command "end"
action 1.6 cli command "exit"
---------------------------------------------------------------------------------------
What I found is that the EEM actions is randomly execute. A few times, all actions will be execute well and everything works. Another times, just a few actions (1,2,3,4, or 1,2,3,4,5 or 1,2,3, ...) will run and cause the task does not work. The execution of different actions stop at any level
Please which can cause this behavior and how can I solve it? .
Thanks in advance.
Best Regards,
09-27-2011 10:58 PM
First, you do not need action 1.6. You do not need to "exit" the CLI session. Both policies can end with the action 1.5. Second, it could be that the policy is hitting the 20 second maximum runtime and terminating without completing all of the actions. This can happen if the device is using AAA and/or heavily loaded. What you can do to confirm this is to configure "debug event manager action cli" and see why the policies are not executing to completion. If the problem is the maximum runtime, you can extend this by adding "maxrun X" to the end of your event lines (where X is a number greater than 20).
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