Hey All - I am writing an EEM Script in order to monitor interface utilization and then sending an SNMP trap once utilization is over 50%. Just wanted to see if you all think this would work. If I gather the output from: sho interfaces $iface | i output rate and sho interfaces $iface | i input rate every minute or so and just added them together, is that an accurate way to measure the interface utilization? And then set up an SNMP trap if it exceeds 50% of the bandwidth for that interface?
... View more
Hey All -
I'm trying to write up an NX-OS script that is equivalent to "archive log config" in IOS. What I am considering is having EEM call a python script anytime that some command is entered in CLI. My question is, how CPU intensive is this if it were to call the script every single time any command is entered?
So far what I have for my eem script is:
event manager applet test
event cli match "*"
action 1.0 cli source syslog.py
action 2.0 event-default
And my python script looks as follows:
import syslog from cisco import *
x = cli("show accounting log | i 'configure terminal'") if 'configure terminal' in x: syslog.syslog(3,x);
x = cli("clear accounting log")
We need the CLI commands to be sent to a syslog server so accounting using TACACS or RADIUS isn't an option. This is a messy solution but it was the only way I could think of. Any idea on if running the script constantly like that would cause issues on a Nexus box? Another option would be just running it on a scheduler but that isn't ideal.
... View more