Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

EEM script to monitor OSPF neighbor not working

I'm trying to monitor a OSPF neighbor syslog notification event to trigger actions to remove a network statement.  I shut down the interface to the monitored neighbor and it removes the network statement which is good.  I am also trying to monitor the neighbor to come back up and then re add the removed network statement which is not working.  This may be a two part problem but I am receiving warnings that not enough vty lines are available.  I am not seeing that the network addition is working at all.  Here is my configuration.

event manager applet ospf-watch-down
event syslog pattern "OSPF-5-ADJCHG: Process 100, Nbr 1.1.1.2 on FastEthernet1/0 from FULL to DOWN"
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "router ospf 100"
action 4.0 cli command "no network 2.2.2.0 0.0.0.255 area 0"
action 5.0 cli command "end"
action 6.0 cli command "exit"


event manager applet ospf-watch-up
event syslog pattern "OSPF-5-ADJCHG: Process 100, Nbr 1.1.1.1 on FastEthernet1/0 from LOADING to FULL"
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "router ospf 100"
action 4.0 cli command "network 2.2.2.0 0.0.0.255 area 0"
action 5.0 cli command "end"
action 6.0 cli command "exit"

 

Here is the EM syslog error message " %HA_EM-3-FMPD_ERROR: Error executing applet ospf-watch-down statement 3.0"  I am having the EM end and exit so I'm not sure why it's running out of CLI sessions.  I'm also getting this one too " %HA_EM-3-FMPD_CLI_CONNECT: Unable to establish CLI session: no tty lines available, minimum of 2 required by EEM"

 

I've tested the ospf-watch-up and ospf-watch-down on its own after clearing all of the sessions and they each work on their own.  I think this is a bug where eem won't release the session.

 

R1#show users
    Line       User       Host(s)              Idle       Location
*  0 con 0                idle                 00:00:00
 130 vty 0                idle                 00:02:13 EEM:ospf-watch-up
 131 vty 1                idle                 00:00:10 EEM:ospf-watch-up
 132 vty 2                idle                 00:00:28 EEM:ospf-watch-down

  Interface    User               Mode         Idle     Peer Address

R1#

489
Views
0
Helpful
0
Replies
CreatePlease to create content