Tags

, , , , ,

Oxidized is a network device configuration backup tool. It’s a RANCID replacement!

For details please check : https://github.com/ytti/oxidized

1. Install all required packages and gems.

sudo apt-get install ruby ruby-dev  libsqlite3-dev libssl-dev pkg-config cmake libssh2-1-dev tree -y
sudo gem install oxidized
sudo gem install oxidized-script oxidized-web

2. It is recommended practice to run Oxidized using its own username. This username can be added using standard command-line tools:

sudo useradd -m -d /home/oxidized oxidized
sudo su - oxidized

3. To initialize a default configuration in your home directory ~/.config/oxidized/config, simply run oxidized once.

oxidized

4. Edit the config file

vi /home/oxidized/.config/oxidized/config

Change the username, password and rest ip accordingly. The vars enable is for Enable Password.

---
username: _username_
password: _password_
model: cisco
interval: 3600
use_syslog: false
debug: false
threads: 30
timeout: 20
retries: 3
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 192.168.30.10:8888
vars:
enable: _enable_pass_
groups: {}
pid: "/home/oxidized/.config/oxidized/pid"
input:
default: ssh, telnet
debug: false
ssh:
secure: false
output:
default: git
git:
user: apnic
email: training@apnictraining.net
repo: "/home/oxidized/.config/oxidized/oxidized.git"
file:
directory: "/home/oxidized/.config/oxidized/configs"
source:
default: csv
csv:
file: "/home/oxidized/.config/oxidized/router.db"
delimiter: !ruby/regexp /:/
map:
name: 0
model: 1
model_map:
cisco: ios
juniper: junos

4. You can check the directory structure

tree /home/oxidized/.config/

/home/oxidized/.config/
└── oxidized
├── config
├── configs
├── crash
├── logs
├── oxidized.git
└── router.db

Create the configs folder; if it’s not present

mkdir /home/oxidized/.config/oxidized/configs

5. Edit router.db

vi /home/oxidized/.config/oxidized/router.db

Add all the routers here.

router_ip:ios:username:password:enable_password

6. Now run the oxidized

oxidized

7. Check the web interface from http://ip_address:8888