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

eem script monitor routing table - multiple entries into 1 email

roger perkin
Level 2
Level 2

I have the following script running to report on routing table changes

event manager applet route-table-monitor

event routing network 0.0.0.0/0 ge 1

action 0.5 set msg "Route changed: Type: $_routing_type, Network: $_routing_network, Mask/Prefix: $_routing_mask, Protocol: $_routing_protocol, GW: $_routing_lastgateway, Intf: $_routing_lastinterface"

action 1.0 syslog msg "$msg"

action 2.0 cli command "enable"

action 4.0 info type routername

action 5.0 mail server "10.*.*.*" to "roger.perkin@****" from "Switch1" subject "Routing Table Change" body "$msg  $_cli_result"

It works perfectly however if multiple routes change I get multiple emails.

Last night we had a site go out and I got about 20 separate email for each subnet change.

What I would like to do is get this script to take all routes changed in a 1 minute interval and then output them into an email.

Not quite sure how I would go about that?

Thanks

Roger

Currently studying for my CCIE and just started on EEM, have not done much scripting before so this is all good stuff to know.

3 Replies 3

Joe Clarke
Cisco Employee
Cisco Employee