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

Remote monitoring using EEM?

John Blakley
VIP Alumni
VIP Alumni

All,

Is it possible to create an applet that would monitor a remote ip address and then perform an action based on that reachability?

What I have is something like this:

RTRA->RTRB->RTRC->RTRD

I want to be able to monitor RTRC's reachability to RTRD, but I need to do it from RTRB. You can't see it above, but RTRA also connects to RTRD. If RTRB can't get to RTRD through RTRC, I want RTRB to apply a policy map in the direction of RTRA because traffic will get redirected. I'll also need RTRA to apply a policy map back in the direction of RTRB. Is this possible to do, or is there a better way of doing that?

I've got a script working that monitors the interface on RTRC, but RTRA would still need to know when RTRC can't get to RTRD somehow.

Thanks,

John

HTH, John *** Please rate all useful posts ***
3 Accepted Solutions

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

If you setup an IP SLA collector on RTRC that tested the required reachability to RTRD, then you could have an EEM applet policy on RTRB which used SNMP to poll the IP SLA Collector state on RTRC. If the collector went down, then you could have RTRB apply the necessary policy map.

However, RTRA wouldn't know about that unless it, too was watching the collector state on RTRC. If you actually wanted RTRB to connect to RTRA, that is possible using EEM, but only with Tcl. RTRA could easily run the same applet as RTRB, though.

The only requirements would be that RTRC supports IP SLA source operations, and that both RTRA and RTRB are IOS devices capable of supporting EEM 2.1 or higher.

View solution in original post

Joe Clarke
Cisco Employee
Cisco Employee

The show event manager version command was not introduced until EEM 2.4 (e.g. 12.4(20)T). Before that, you just had to know. 12.4 mainline includes EEM 2.1. 12.4(2)T includes EEM 2.2, 12.4(11)T comes with EEM 2.3.

View solution in original post

I went ahead and coded an example Tcl policy to do what you want. It will run every 60 seconds, and poll the latest operational state of an IP SLA collector on a remote device. It requires a few environment variables. For example:

event manager environment check_ipsla_ip 10.1.1.1

event manager environment check_ipsla_comm public

event manager environment check_ipsla_index 117

event manager environment check_ipsla_cmds config t;interface fa0/0;ip policy route-map redirect

In this example, the device 10.1.1.1 will be polled with a community string of public. The IP SLA collector on the device is configured with index 117. The commands to be run are separated with semi-colons. More help is available in the script header.

View solution in original post

9 Replies 9

Joe Clarke
Cisco Employee
Cisco Employee

If you setup an IP SLA collector on RTRC that tested the required reachability to RTRD, then you could have an EEM applet policy on RTRB which used SNMP to poll the IP SLA Collector state on RTRC. If the collector went down, then you could have RTRB apply the necessary policy map.

However, RTRA wouldn't know about that unless it, too was watching the collector state on RTRC. If you actually wanted RTRB to connect to RTRA, that is possible using EEM, but only with Tcl. RTRA could easily run the same applet as RTRB, though.

The only requirements would be that RTRC supports IP SLA source operations, and that both RTRA and RTRB are IOS devices capable of supporting EEM 2.1 or higher.

Grrr, it just dawned on me typing out the applet, that you will need something better than EEM 2.1 to do this. You'll actually need EEM 3.0 to do this with an applet since you need to poll the REMOTE router. With Tcl, this will be doable with your current version of code. I can code up an example if you want.

I went ahead and coded an example Tcl policy to do what you want. It will run every 60 seconds, and poll the latest operational state of an IP SLA collector on a remote device. It requires a few environment variables. For example:

event manager environment check_ipsla_ip 10.1.1.1

event manager environment check_ipsla_comm public

event manager environment check_ipsla_index 117

event manager environment check_ipsla_cmds config t;interface fa0/0;ip policy route-map redirect

In this example, the device 10.1.1.1 will be polled with a community string of public. The IP SLA collector on the device is configured with index 117. The commands to be run are separated with semi-colons. More help is available in the script header.

Joe,

How can I tell what version of eem I'm running? These are on 3745s.

Thanks!

John

HTH, John *** Please rate all useful posts ***

Joe Clarke
Cisco Employee
Cisco Employee

What version of IOS are they running?

The 3745s are running 12.4(25) Enterprise Svcs, and the 2800 (RTRB) is running 12.4(1a).

HTH, John *** Please rate all useful posts ***

Joe Clarke
Cisco Employee
Cisco Employee

Ugh. 12.4(1a). While all routers meet the EEM requirements, RTRB may see some bugs. As for IP SLA requirements, the routers must be running an image greater than IPBASE.

I can update that router with no issues. Is there an easy way to tell what version eem is or is that by ios version? Is there a show command that can get me this information?

HTH, John *** Please rate all useful posts ***

Joe Clarke
Cisco Employee
Cisco Employee

The show event manager version command was not introduced until EEM 2.4 (e.g. 12.4(20)T). Before that, you just had to know. 12.4 mainline includes EEM 2.1. 12.4(2)T includes EEM 2.2, 12.4(11)T comes with EEM 2.3.

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: