[rancid] rancid : how to filter clogin -x or -c outcome
alligator94
alligator94 at laposte.net
Sun Apr 19 07:35:30 UTC 2015
Hi,
I very often use clogin -x or clogin -c to perform mass configuration
updates. My concern is that clogin doesn't analyze the outcome of the
command passed with -x or -d, so there is no easy way to know if the command
has been successfully accepted by the device . For instance, some old cisco
ios don't accept some commands.
I have tried to use the clogin debug (-d) option, but it generates a huge
amount of lines. I have also tested to open a log file (I am using teraterm)
before running clogin, then to do a search but, it is not really easy
because each time that you find an error condition, you need to look
backward in the file to know which host the error message reports to.
I have also looked at the -s option but it looks complex to me.
What would be nice to have is a way to pass a file to clogin as a parameter
which would contain a list of keyword that you want to be extracted from the
outcome.
I am thinking to some words like :
"Invalid"
"Error"
"timeout"
If some of them are trapped during the clogin run, then they could be stored
in a file $hostname_date_time.err.log
Maybe there is an easy way to do it but I am not skilled with expect.
Any help or comment is welcomed.
Thanks
Regards,
Gilles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20150419/caeb694c/attachment.html>
More information about the Rancid-discuss
mailing list