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

EEM Shutting down interface not

michael.taylor
Level 1
Level 1

I'm trying to shutdown an ethernet interface on a router running c3845-spservicesk9-mz.124-3g.bin and the only action completed successfully is the syslog entry.

Your assistance to point me in the right direction would be gratefully received.

event manager applet IPSLA101Failure

event snmp oid 1.3.6.1.4.1.9.9.42.1.2.9.1.6.101 get-type exact entry-op eq entry-val 1 exit-op eq exit-val 2 poll-interval 10

action 1.0 syslog priority informational msg " Indirect Ethernet Failure "

action 1.1 cli command "enable"

action 1.2 cli command "configure term"

action 1.3 cli command "interface GigabitEthernet0/1"

action 1.4 cli command "shut"

action 1.5 cli command "exit"

Thanks again

3 Replies 3

mlund
Level 7
Level 7

Hi Michael

Try this.

remove

action 1.3 cli command "interface GigabitEthernet0/1"

add these instead

event manager environment _disable_ifname GigabitEthernet0/1

action 1.3 cli command "interface $_disable_ifname"

/Mikael

ranjit123
Level 3
Level 3

HI!,

Please add the event manager session cli username

# event manager session cli username " < > " <--------- It Should be level 15

also please run the below 3 commands  run the script and capture the logs

# term mon

# debug event manager all

# show event manager policy registered

please update the logs for us to check.....

Regards,

Ranjit

michael.taylor
Level 1
Level 1

Guys,

Thank you for your input.  Having recreated the symptoms on a Cisco 2811 I upgraded to 12.4.22 (EEM 2.4) in order to achieve the correct results.  Indeed, the simple configuration is ignorant of AAA and does not need an environment parameter.  The log files were recorded whilst logged off from the router.  The harvested config and results follow:

Cisco2811#sho ver
Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(22)YB5, RELEASE SOFTWARE (fc2)

System image file is "flash:c2800nm-advipservicesk9-mz.124-22.YB5.bin"
!
Cisco2811#sho run
Building configuration...

Current configuration : 2606 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Cisco2811
!
boot-start-marker
boot-end-marker
!
logging message-counter syslog
logging buffered 4096
enable secret 5 $1$d6Mk$YeSwEvsoGKLBt5UGfzgc00
!
aaa new-model
!
!
aaa authentication login default local
aaa authentication enable default enable
aaa authorization config-commands
!
!
aaa session-id common
!
dot11 syslog
ip source-route
!
!
ip cef
!
!
no ip domain lookup
no ipv6 cef
!
multilink bundle-name authenticated
!
!        
username EEMUser privilege 15 password 0 cisco
archive
log config
  hidekeys
!
!
interface FastEthernet0/0
ip address 10.0.0.1 255.255.255.0
duplex full
speed 100
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
!
ip sla 101
icmp-echo 10.0.0.2
frequency 10
ip sla schedule 101 life forever start-time now
ip sla reaction-configuration 101 react timeout threshold-type immediate action-type trapOnly
snmp-server enable traps tty
snmp-server enable traps config
!
line con 0
line aux 0
line vty 0 4
privilege level 15
password cisco
!
scheduler allocate 20000 1000
event manager applet IPSLA101Recovery
event snmp oid 1.3.6.1.4.1.9.9.42.1.2.9.1.6.101 get-type exact entry-op eq entry-val "2" exit-op eq exit-val "1" poll-interval 10
action 1.0 syslog priority informational msg "Ethernet Open"
action 1.1 cli command "enable"
action 1.3 cli command "conf t"
action 1.4 cli command "interface fa0/1"
action 1.5 cli command "no shut"
action 1.6 cli command "exit"
event manager applet IPSLA101Failure
event snmp oid 1.3.6.1.4.1.9.9.42.1.2.9.1.6.101 get-type exact entry-op eq entry-val "1" exit-op eq exit-val "2" poll-interval 10
action 1.0 syslog priority informational msg "Ethernet Closed"
action 1.1 cli command "enable"
action 1.3 cli command "conf t"
action 1.4 cli command "interface fa0/1"
action 1.5 cli command "shut"
action 1.6 cli command "exit"
!
end

Cisco2811#sho log
Syslog logging: enabled (0 messages dropped, 1 messages rate-limited,
                0 flushes, 0 overruns, xml disabled, filtering disabled)

*Jul 26 20:07:59.867: %HA_EM-6-LOG: IPSLA101Failure: Ethernet Open
*Jul 26 20:07:59.967: %SYS-5-CONFIG_I: Configured from console by vty0
*Jul 26 20:08:01.947: %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively down
*Jul 26 20:08:59.867: %HA_EM-6-LOG: IPSLA101Recovery: Ethernet Closed
*Jul 26 20:08:59.963: %SYS-5-CONFIG_I: Configured from console by vty0
*Jul 26 20:09:01.939: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
Cisco2811#

Thanks again for your interest and contribution.

Regards

Michael

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:

Review Cisco Networking products for a $25 gift card