cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2142
Views
0
Helpful
5
Replies

How to copy a value of interface counter to a variable

danilo.padula
Level 1
Level 1

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

5 Replies 5

Joe Clarke
Cisco Employee
Cisco Employee

It depends on the counter and how you want your policy to run.  What is the ultimate goal?

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.

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?

Nothing it will trigger the event. We have to check the counter periodically. For example, one time per hour.

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.

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: