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

Need help for EEM applet to get working

SanjayRaut19786
Level 1
Level 1

event manager applet SHOW_INT_LINK
event cli pattern "(sh|sho|show)\s+(int|inte|inter|interf|interfa|interfac|interface)\s+(link)" enter
action 001.1 cli command "enable"
action 001.2 puts "\n\nShow Interface Link (List shows ONLY notconnect ports)\n------------------------------------------------------"
action 001.3 cli command "show int status | i notconnect"
action 002.1 foreach _line "$_cli_result" "\n"
action 002.2 regexp "^([A-Z][a-z][0-9][^[:space:]]+)" "$_line" match _intf
action 002.3 if $_regexp_result eq "1"
action 003.1 cli command "show interface $_intf"
action 004.1 foreach _iline "$_cli_result" "\n"
action 004.2 regexp "^(.*Last input.*)\r$" "$_iline" match _lastup
action 004.3 if $_regexp_result eq "1"
action 004.4 puts "$_intf -$_lastup"
action 004.5 end
action 099.1 end
action 099.2 end
action 099.3 end

-----------------------------------------------------------------------------------------------------------------

Above script is working well and listing the ports which are 'not connect' and Last Input never. However how it get it disabled via a script by adding CLI commands in the applet.

 

Can anyone suggest please how to get the ports disabled ?

 

 

Regards

Sanjay

0 Replies 0