How to copy a value of interface counter to a variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2012 06:35 PM
Hi Folks,
I'm new in EEM and I'm trying to read a interface counter and save the value in a new variable. I will use the new variable to manipulate the value.
Should I use SNMP (event snmp oid ...) to get the value?
Regards
Padula
- Labels:
-
EEM Scripting

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2012 08:45 AM
It depends on the counter and how you want your policy to run. What is the ultimate goal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2012 03:27 AM
Hi Joseph,
I need to read the output packet counter.
We have a problem, that two routers 3845 stop forwarding without any reason.
We investigated with Cisco and didn´t find any BUG that explain the problem. So, I´m trying to make a applet in EEM to colect some commands to start the investigation.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2012 01:26 PM
So it's fair to say that if the output packet counter doesn't increase in a given time window you want to raise and event? What should trigger this policy?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2012 05:03 AM
Nothing it will trigger the event. We have to check the counter periodically. For example, one time per hour.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2012 05:24 PM
You can use something like this:
event manager applet periodic-cmds
event timer watchdog time 60
action 1.0 cli command "enable"
action 2.0 cli command "show interface gi0/1 | append flash:/output.txt"
action 3.0 ...
Just keep adding the commands you want to run.
