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

Need EEM script for Monitoring a change

mdtcco
Level 4
Level 4

We have a weird setup at a site which is causing us problems because it doesn't alert.  Without getting into all the details, I'll briefly give you the scenario:

Scenario:

The circuit connects to a carrier switch on-site, that connects to a port on our router.  Our problem is, when the circuit goes down, it does not bring our router interface down.  This negates our Solarwinds alerting.  The only way we can tell if the circuit is down, is the next hop on the default route will change.

We are desperately trying to figure out how to get an alert when the circuit is down.  We were thinking EEM might be the best solution, but we don't have any experience with it.  Is there anyone out there that can help us with this? 

I apologize in advance if I put this in the wrong category.  I have no idea where this should fit in, but I'll take a best guess.

3 Replies 3

Joe Clarke
Cisco Employee
Cisco Employee

EEM can certainly help here.  If it's the default route that changes, you might be able to use the routing event detector to flag the change.  For example:

event manager applet link-check

event routing network 0.0.0.0/0 type modify

action 1.0 syslog msg "Route changed to $_routing_lastgateway"

action 2.0 snmp-trap strdata "Route changed to $_routing_lastgateway"

You can do other things with the syslog and trap, too if you need.

mustafahanci
Level 1
Level 1

hi,

you can use an ip sla - track command targeting an ip that only can be reached from the carrier connection. Ip that ip sla fails you can create an alarm or switch to the other back-up connection. 

mustafa..

Rejohn Cuares
Level 4
Level 4

Another way is creating a loopback on your router and assigning an IP. Make sure this IP is reachable from your management station.

interface loopback 1000

desc ** EEM - Monitor Interface **

ip address 172.31.1.1 255.255.255.255

!

track 1000 ip sla 1000 reachability

!

ip sla 1000

icmp-echo A.B.C.D source-interface X

timeout 2000

frequency 5

ip sla schedule 1000 life forever start-time now

!

event manager session cli username "eemadmin"

event manager applet MONITOR-ISP-DOWN

event track 1000 state down

action 1.0 cli command "enable"

action 1.1 cli command "config terminal"

action 1.2 cli command "int loo 1000"

action 1.3 cli command "shut"

!

event manager applet MONITOR-ISP-UP

event track 1000 state up

action 1.0 cli command "enable"

action 1.1 cli command "config terminal"

action 1.2 cli command "int loo 1000"

action 1.3 cli command "no shut"

!

Please rate replies and mark question as "answered" if applicable.

Please rate replies and mark question as "answered" if applicable.
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: