EEM Script to call Python Script for CLI Accounting for NX-OS
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.
You'll clearly want to test this. I doubt anyone has done such a thing before. It seems risky to me, but it would only cause load when CLI commands are executed, so the scaling factor will be the number of simultaneous sessions + the number of simultaneous CLI commands executed. You should test as aggressively as your customer plans to use the CLI.
Hi everyone, I would like to thank you in advance for any help you can provide a newcomer like myself!
Im studying the 100-105 book by Odom and am currently on the topic of Port security. I purchased a used 2960 and I'm trying to follow a...
While deploying a number of 18xx/2802/3802 model access points (APs), which run AP-COS as their operating platform. It can be observed on some occasions that while many of their access points were able to join the fabric WLC withou...
I am going to design and build an LAN network under a tunnel underground with long distance between the switches.
I will have 2 Catalyst switches and 8 Industrial IE3000, and they will be connected with fiber.
For now I am planning on use Layer-2 s...