fetchconfig moved to https://github.com/udhos/fetchconfig.
fetchconfig is a Perl script for retrieving configuration of multiple devices. It has been tested under Linux and Windows, and currently supports a variety of devices, including Cisco IOS, Cisco Catalyst, Cisco ASA, Cisco PIX, FortiGate Firewalls, ProCurve, Alcatel Ethernet Routers (aka Riverstone), Dell PowerConnect Switches, Terayon 3200/3500CMTS, Datacom DmSwitch Switches, HP MSR Routers, Mikrotik Routers, Tellabs MSR Routers, Juniper EX Switch JunOS.
fetchconfig - Fetch Configuration
Copyright (C) 2006 Everton da Silva Marques
fetchconfig is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
fetchconfig is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with fetchconfig; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
cd /usr/local tar xzf /tmp/fetchconfig-0.0.tar.gz ln -s fetchconfig-0.0 fetchconfig[ fetchconfig is now available under /usr/local/fetchconfig ]
cd /usr/local/fetchconfig cp device_table.example device_table vi device_table
cd /usr/local/fetchconfig ./fetchconfig.pl -devices=device_table
The fetchconfig.pl script will scan the "device_table" file, trying to retrieve the configuration for every device, storing configuration files under the "repository".
The device table assigned with '-device=' switch is a text file which supports two types of lines:
Default options lines assign default options to a device model. The following example adds some default options to the "cisco-ios" model:
#default model model-default-options # default: cisco-ios user=backup,pass=fran,enable=jose
Device lines define attributes of every device and optionally assign device-specific options. The following example define a device named "vpn-gw":
#model dev-unique-id device-host [device-options] # cisco-ios vpn-gw 192.168.0.1 keep=10,changes_only=1The dev-unique-id must be:
Modules recognize the following options. Please verify the options supported by each module by consulting the README file of the source distribution.
|pass||The TELNET login password.|
|user||The TELNET login username.|
|enable||The priviledged enable password.|
|timeout||How long to wait for TELNET responses from devices.|
|banner_timeout||If given, it will override the timeout value used to wait for the 'login:' prompt. It is useful for devices which spend many seconds before issuing the initial login prompt for TELNET connections.|
|fetch_timeout||If given, it will override the timeout value used to fetch all the configuration lines. It is useful for devices which spend several seconds building the configuration.|
|repository||The base directory for saving the configuration files.|
|keep||The maximum number of config files to retain for the device. When this limit is reached, the older files are discarded.|
|changes_only||If specified as changes_only=1, only new configurations are saved. Otherwise, configurations are saved whenever the script runs; if not defined as changes_only=1, the script might possibly retain multiple identical configuration files.|
|show_cmd||If specified as show_cmd=wrterm, "write term" will be used in place of the usual "show run" command. This is necessary for some older devices. Values other than wrterm should have no effect.|
|on_fetch_run||Path to an external program to be called whenever the configuration is fetched.|
Get latest stable release here:
ViewCVS access to CVS tree:
Anonymous access to CVS repository:
export CVS_RSH=ssh cvs -z3 -d:pserver:email@example.com:/sources/fetchconfig co fetchconfig
For suggestions, patches, bug reports, please visit support page at Savannah: