RANCID Integration
Installation
Install RANCID and Subversion:
Text Only | |
---|---|
1 |
|
We need to add a group for rancid to store configs in:
Text Only | |
---|---|
1 |
|
Add this line:
Text Only | |
---|---|
1 |
|
Change these two lines:
Text Only | |
---|---|
1 2 |
|
to:
Text Only | |
---|---|
1 2 |
|
Run this command to create the folder structure:
Text Only | |
---|---|
1 2 |
|
Create a .cloginrc
file:
Text Only | |
---|---|
1 |
|
Here is an example that works for Mikrotik devices:
Text Only | |
---|---|
1 2 3 4 5 |
|
Make sure you have your public key credentials in /var/lib/rancid/.ssh/
Test it out on your router! (In this example, your router is named myrouter
)
Text Only | |
---|---|
1 |
|
Add www-data
to the rancid
group:
Text Only | |
---|---|
1 |
|
Observium Integration
Configuration
You can either change the below settings in the config.php or via the web-based configuration accessible from the right hand "cog" menu in the Observium web interface.
Update the Observium config so it knows how to use RANCID:
Text Only | |
---|---|
1 |
|
Add these lines:
Text Only | |
---|---|
1 2 |
|
If you're running RANCID v3.x, add the following line :
Text Only | |
---|---|
1 |
|
Restart apache:
Text Only | |
---|---|
1 |
|
You should now see a config tab in Observium, with your configs there!
Observium has a script which can generate the router.db config based on what’s in Observium.
Text Only | |
---|---|
1 2 3 4 |
|
Dump it in the RANCID config file with this command:
Text Only | |
---|---|
1 |
|
RHEL Installation
Minor
There are some minor differences to be aware of when running RANCID on RHEL. Instead of the configuration files being stored in /var/lib/rancid/, RHEL stores them in /var/rancid/. You may also need to change your RequiredRSASize in your /etc/ssh/ssh_config, as it is updated in RHEL 9.2 to 2048 bits.
For RHEL installations it is suggested that you update to RHEL 9.4. Installation instructions have not been tested for other versions!
Install rancid and subversion:
Text Only | |
---|---|
1 |
|
We need to add a group for rancid to store configs in:
Text Only | |
---|---|
1 |
|
Add this line:
Text Only | |
---|---|
1 |
|
Change these two lines:
Text Only | |
---|---|
1 2 |
|
to:
Text Only | |
---|---|
1 2 |
|
Run this command to create the folder structure:
Text Only | |
---|---|
1 2 |
|
Create a .cloginrc
file:
Text Only | |
---|---|
1 |
|
Here is an example that works for Mikrotik devices:
Text Only | |
---|---|
1 2 3 4 5 |
|
Make sure you have your public key credentials in /var/lib/rancid/.ssh/
Test it out on your router! (In this example, your router is named myrouter
)
Text Only | |
---|---|
1 |
|
For RHEL installations, Add apache
to the rancid
group:
Text Only | |
---|---|
1 |
|
After integration (see "Observium Integration" section), restart apache:
Text Only | |
---|---|
1 |
|
Automation
We can add this in cron to do this automatically.
If you want rancid to back up daily, then add something like this to cron:
Text Only | |
---|---|
1 2 3 |
|