10-29-2019 08:19 AM
Guys,
I keep getting the error
"end" action found outside of conditional block
Here is my commands.
event manager applet BPS_UNDER
event tag 1 interface name GigabitEthernet0/0/0 parameter receive_rate_bps entry-op lt entry-val 999999 entry-type value poll-interval 60
action 5.0 syslog msg "EEM Test Complete"
action 6.0 end
Solved! Go to Solution.
10-29-2019 08:26 AM - edited 10-29-2019 08:28 AM
Hi there,
you don't need to terminate your EEM applet with an 'end' action. The 'end' actions are used to mark the end of a conditional block, ie:
action 001 if <condition01> action 002 if <condition02> action 003 if <condition03> action 004 puts "Hello" action 005 end action 006 end action 007 end
...you need these end actions as EEM has no concept of curly braces for grouping of statements, or indentation.
...I should add that I have included indentation in the above example for the benefit of human readers :)
cheers,
Seb.
10-29-2019 08:26 AM - edited 10-29-2019 08:28 AM
Hi there,
you don't need to terminate your EEM applet with an 'end' action. The 'end' actions are used to mark the end of a conditional block, ie:
action 001 if <condition01> action 002 if <condition02> action 003 if <condition03> action 004 puts "Hello" action 005 end action 006 end action 007 end
...you need these end actions as EEM has no concept of curly braces for grouping of statements, or indentation.
...I should add that I have included indentation in the above example for the benefit of human readers :)
cheers,
Seb.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: