[c-nsp] How to run a scheduled script to grab interface stats
Mihyar Baroudi
mbaroudi at progrizon.com
Mon Nov 29 10:18:54 EST 2010
You can use the Embedded Event Manager (EEM) to do this.
In config mode, do:
event manager applet MyPolicy
event timer cron cron-entry @daily
action 1.0 cli command cli-string
action 2.0 cli command cli-string
action 3.0 cli command cli-string
Replace the cli-string with whatever CLI commands you want to run.
If you like, you can replace the @daily with @hourly, @weekly ...etc. or a complex cron entry. Something like "0-59/1 0-23/1 * *
0-7"
A more sophisticated implementation can be done with Tcl scripts to run the cli commands, extract the data, then deliver it in any
format you want.
mbaroudi at progrizon.com
> Message: 7
> Date: Fri, 26 Nov 2010 09:43:15 -0700
> From: John Neiberger <jneiberger at gmail.com>
> To: cisco-nsp at puck.nether.net
> Subject: [c-nsp] How to run a scheduled script to grab interface stats
> Message-ID:
> <AANLkTikcy64fuePo-QUL8ehzvjWe-mEJSfR=1L0se_L7 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1> On 27/11/10 3:43 AM, "John Neiberger" <jneiberger at gmail.com> wrote:
>
> I'd like to periodically (weekly, for example) gather certain
> interface stats via "show int" and then upload those stats via
> ftp/tftp/scp or whatever to a server. I'll then pull those stats into
> an Excel spreadsheet and parse them. What would be the best way to do
> this? Is this something that can be built in a TCL script and then run
> on a schedule? If you needed to do this, how would you do it? I have
> stats from multiple interfaces on six 7600s that I need to grab at
> least once a week.
>
> Any thoughts?
More information about the cisco-nsp
mailing list