[rancid] Help with suppressing part of the show run output
heasley
heas at shrubbery.net
Thu Feb 14 19:00:20 UTC 2013
Thu, Feb 14, 2013 at 09:18:25AM -0500, Tom Simpson:
> How do I go about suppressing part of the show run output from Cisco devices? The first two lines every time. We have added a command recently to the config on several switches that when you use any show command, it adds the output from "show ip os summary" to the first of the output. Since this changes every time you run any command it shows up as a diff in RANCID every time.
>
> I am assuming that this would be a regex, but I don't know where to begin adding it inside the rancid script, what would be the best section to put this in? Should it be possible to strip the first few lines off of the configuration output? Or would ignoring these lines be easier?
>
>
> The config line that we added is: exec prompt timestamp
> and it gets added to the vty config section
well, remove that config. if you want to know the time or load avg, enter
the command to see it when you want to see it. or use tacacs to apply an
autocmd for users that want that junk. else you have to filter it in each
rancid function or add the command to disable it.
> A couple of examples of the output that is added to the show run or any other show command is the following:
>
> Load for five secs: 5%/0%; one minute: 6%; five minutes: 5%
> Time source is NTP, 09:02:17.501 EDT Thu Feb 14 2013
>
>
> Load for five secs: 5%/0%; one minute: 5%; five minutes: 5%
> Time source is NTP, 09:06:14.333 EDT Thu Feb 14 2013
>
>
> Since this happens after the command is input it can't be added as part of the prompt; so I guess I am stuck with either stripping it out of the config prior to parsing it, or just simply have rancid ignore it when it does run the diff...
>
>
> Thanks,
>
> Tom Simpson
> LAN/WAN Engineer
> Forcht Group of Kentucky
> 859.259.9700 x538
>
> "We all knew there was just one way to improve our odds for survival: train, train, train. Sometimes, if your training is properly intense it will kill you. More often -- much, much more often -- it will save your life." - Richard Marcinko, former US Navy SEAL Team Commander
>
>
> CONFIDENTIALITY NOTICE:
> This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.
>
> Forcht Group IT, 2400 South Main Street, Corbin, Ky.
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
More information about the Rancid-discuss
mailing list