cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1827
Views
0
Helpful
1
Replies

"end" action found outside of conditional block EEM

Wan_Whisperer
Beginner
Beginner

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

1 Accepted Solution

Accepted Solutions

Seb Rupik
VIP Advisor VIP Advisor
VIP Advisor

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.

View solution in original post

1 Reply 1

Seb Rupik
VIP Advisor VIP Advisor
VIP Advisor

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.

Getting Started

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:

Recognize Your Peers