Integrating RANCID to librenms issues

Hi,

I was trying to integrate RANCID to LibreNMS. I am installing it in the same box as the main librenms following the standard apt-get install procedure in Ubuntu. My rancid.conf file looks like the following:

TERM=network;export TERM
LC_COLLATE=“POSIX”; export LC_COLLATE
uid=perl -e 'print "$>"'
test “$uid” -eq 0 && echo “Do not run $0 as root!” && exit 1
umask 027
PERL5LIB="/usr/share/perl5/rancid"; export PERL5LIB
TMPDIR=/tmp; export TMPDIR
BASEDIR=/var/lib/rancid; export BASEDIR
PATH=/usr/lib/rancid/bin:/usr/bin:/usr/sbin:/bin:/usr/local/bin:/usr/bin; export PATH
LIST_OF_GROUPS="network"
CVSROOT=$BASEDIR/CVS; export CVSROOT
LOGDIR=$BASEDIR/logs; export LOGDIR
RCSSYS=cvs; export RCSSYS

It works when I run this command:
[email protected]~$ bin/rancid-run

But it gave no output when run the below commands:
[email protected]~$ bin/rancid-run
[email protected]~$ bin/rancid-cvs

The log shows:

WARNING: Have you forgotten to update the FS in router.db?

cvs commit: cannot open CVS/Entries for reading: No such file or directory
cvs commit: nothing known about `router.db’
cvs [commit aborted]: correct above errors first!

The /var/lib/rancid/CVS/CVSROOT is there and owned by rancid.

Any ideas?

Many Thanks!

You do realise that’s a rancid issue before anything else? You might find users of rancid here who could help you but you’d be honestly better asking on whatever support forums they have - or switch to using oxidized.

Thanks @laf
Realizing the Rancid issues, I switched to Oxidized. The installation was pretty straight forward. We have cisco os and junos, how do I specify both OS in the Model section so it can pickup the different OS? My config is below.

username: username
password: password
model: junos <------------- how can this pickup OS automatically?
interval: 600
log: ~/.config/oxidized/logs/log
use_syslog: false
debug: false
threads: 30
timeout: 20
retries: 3
prompt: !ruby/regexp /^([\[email protected]]+[#>]\s?)$/
pid: /home/oxidized/.config/oxidized/pid

rest: 0.0.0.0:8787

groups: {}

input:
default: ssh, telnet
debug: false
ssh:
secure: false

output:
default: file
file:
directory: /home/oxidized/deviceconfigs

source:
default: csv
csv:
file: /home/oxidized/.config/oxidized/router.db
delimiter: !ruby/regexp /:confused:
map:
name: 0
model: 1
username: 2
password: 3
vars_map:
enable: 4

model_map:
cisco: ios
juniper: junos

You don’t need that.

model_map:
cisco: ios
juniper: junos

You can also get rid of that, both oxidized and librenms have the same mapping for these devices.

Nothing more should be needed, if you are not seeing config in the oxidized webui then that’s an oxidized problem and you’ll need to enable debug in the oxidized config and check the crash files it creates when it can’t back up the config.

I removed the section you mentioned above. It still says Junos on all cisco devices.

I put the model at the end of the hostname on router.db like, switch.mycompany.com:ios, it will then telling me its ios in the model section.

However, by doing that gave me another error: not matching configured prompt (?-mix:^([\[email protected]()-]+[#>]\s?)$)"
The cisco device prompt is the format below:
CISCO-ROUTER>

Anything goes wrong with the RegEx?

Many Thanks!