NETWORK ADMINISTRATIONSsnmp

Rancid Integration with LibreNMS

Librenms generate a list of hosts that can be monitored by RANCID. We installed and running Rancid, and you just need to create and update the file ‘router.db’
https://docs.librenms.org/Extensions/Rancid/
https://shrubbery.net/rancid/
Step by Step Guide:
https://ipcorenetworks.blogspot.com/2021/07/integrate-rancid-on-librenms.html
LibreNMS:
LibreNMS Tutorials: https://www.youtube.com/playlist?list=PL2iPlJTsTrSRdSVlok674Bkou0zkrPbgb

Ubuntu Rancid Install
The options shown below also contains the default values.
sudo apt-get install rancid subversion
Edit Rancid config file to use subversion or git instead of default cvs, and adds a group:
sudo nano /etc/rancid/rancid.conf
LIST_OF_GROUPS=”librenms core”
Now change these two lines:
CVSROOT=$BASEDIR/CVS; export CVSROOT
RCSSYS=cvs; export RCSSYS
to:
CVSROOT=$BASEDIR/SVN; export CVSROOT
RCSSYS=svn; export RCSSYS

NOTE – This only creates 1 group! You can of course make more when you get the hang of it, this is just a basic ‘Need it to work” deal.

Run this command to create the folder structure:
sudo passwd rancid
su – rancid
/var/lib/rancid/bin/rancid-cvs
NOTE – do NOT change cvs to svn here! Leave command as is!
Get a list of devices from Librenms you can pull configs from:
cd /opt/librenms/scripts
sudo ./gen_rancid.php
Copy the output. Replace all “:” with “;” example:
alphcr1:cisco:up will change to:
alphcr1;cisco;up

copy and past results into the below file:
sudo nano /var/lib/rancid/librenms/router.db
AND
sudo nano /var/lib/rancid/core/router.db

# You can enter some sensible text here to define the device below
add user {192.168.88.1} {rancid}
add password {192.168.88.1} {sshpassword} {enablepassword}
add method {192.168.88.1} {ssh:2223}
#add autoenable {192.168.88.1} 1

# You can enter some sensible text here to define the device below
add user {192.168.88.2} {rancid}
add password {192.168.88.2} {telnetpassword} {enablepassword}
add method {192.168.88.2} {telnet}
#add autoenable {192.168.88.2} 1

Make sure your config files are there 🙂
sudo usermod -a -G rancid www-data ***** run as root user
sudo usermod -a -G rancid librenms
$config[‘rancid_configs’][‘core’] = ‘/var/lib/rancid/core’;

_____________________

https://ipcorenetworks.blogspot.com/2021/05/ip-core-networks-your-learning-your.html
fb: https://www.facebook.com/ipcorenetworks/
#LibreNMS #librenms #cisco #librenmstutorial #cacti #ccna #ccnp #snmp #librenms docs #ipcorenetworks #rancid

source

by IP Core Networks

simple network management protocol

Leave a Reply

Your email address will not be published. Required fields are marked *