This describes how to configure Oxidized with LibreNMS on an Ubuntu server (written using 22.04)
Prerequisites:
add-apt-repository universe
apt-get install ruby ruby-dev libsqlite3-dev libssl-dev pkg-config cmake libssh2-1-dev libicu-dev zlib1g-dev g++ libyaml-dev
gem install oxidized
gem install oxidized-script oxidized-web
sudo useradd oxidized -s /bin/bash -d /home/oxidized/ -m
passwd oxidized
#Enter Password
usermod -aG sudo oxidized
su - oxidized
pwd
ls -la
sudo chown -R oxidized:oxidized /home/oxidized
mkdir -p ~/.config/oxidized/configs
mkdir -p ~/.config/oxidized/router.db
oxidized
oxidized
nano /home/oxidized/.config/oxidized/config
and update the config similarly to this:---
username: ciscoadminuser
password: ciscoadminpass
model: ios
resolve_dns: true
interval: 3600
use_syslog: false
debug: false
run_once: false
threads: 30
use_max_threads: false
timeout: 20
retries: 3
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 172.16.0.161:8888
next_adds_job: false
vars: {}
groups: {}
group_map: {}
models: {}
pid: "/home/oxidized/.config/oxidized/pid"
crash:
directory: "/home/oxidized/.config/oxidized/crashes"
hostnames: false
stats:
history_size: 10
input:
default: ssh, telnet
debug: false
ssh:
secure: false
ftp:
passive: true
utf8_encoded: true
output:
default: git
git:
user: oxidized
email: [email protected]
repo: /opt/oxidized/data/devices.git
source:
default: http
debug: false
http:
url: http://librenms.customer.local/api/v0/oxidized
map:
name: hostname
model: os
group: group
headers:
X-Auth-Token: 7ad8833ec3860b029770e2e3e2e3f217
model_map:
juniper: junos
cisco: ios
Edit these lines in the above file at a minimum.
This article will not go into further detail about setting up groups since I haven't tested it yet. This config is good for Cisco IOS. Use the references at the bottom of this page for more documentation.
sudo mkdir -p /opt/oxidized/data/devices.git
chown -R oxidized:oxidized /opt/oxidized
curl -H 'X-Auth-Token: 7ad8833ec3860b029770e2e3e2e3f217' http://librenms.customer.local/api/v0/oxidized
/var/lib/gems/3.0.0/gems/oxidized-0.30.1/extra
sudo cp /var/lib/gems/3.0.0/gems/oxidized-0.30.1/extra/oxidized.service /etc/systemd/system
sudo mkdir /var/run/oxidized
sudo chown -R oxidized:oxidized /var/run/oxidized
sudo systemctl enable oxidized.service
systemctl start oxidized
systemctl status oxidized
If everything is successful you will see the service active and running. You should also see data populate under /opt/oxidized/data/devices.git/ folder.
You can also specify OS types and device types that you do not want to back up such as OS = Linux or device type = server. See documentation for more info.
References: