Oxidized and Librenms, I don't see the backup of my devices

Hello everyone,

I have a problem with Oxidized and LibreNMS. I don’t see the backup of my devices on LibreNMS web interface. Oxidized (web) works well when is alone.
Oxidized and LibreNMS run on fresh install on CentOS 8, installation command :

dnf install curl gnupg2 -y
command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
curl -sSL https://get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh
rvm requirements
rvm list known
rvm install 2.6.3
rvm use 2.6.3 --default
ruby --version
yum install make cmake which sqlite-devel openssl-devel libssh2-devel ruby gcc ruby-devel libicu-devel gcc-c++
gem install oxidized
gem install oxidized-script oxidized-web

And I have create a oxidized.service in /etc/systemd/system/
I have activated the service and the service start poperly.

I have try to start Oxidized directly on debug mode, when I go to the config tab of a device backed up by Oxidized, I have this errors :

/usr/local/rvm/gems/ruby-2.6.3/wrappers/oxidized --debug
Puma starting in single mode…

  • Version 3.11.4 (ruby 2.6.3-p62), codename: Love Song
  • Min threads: 0, max threads: 16
  • Environment: development
  • Listening on tcp://0.0.0.0:8888
    Use Ctrl-C to stop
    2020-10-28 11:00:02 - NoMethodError - undefined method output' for nil:NilClass: /usr/local/rvm/gems/ruby-2.6.3/gems/oxidized-0.28.0/lib/oxidized/nodes.rb:176:in block in yield_node_output’
    /usr/local/rvm/gems/ruby-2.6.3/gems/oxidized-0.28.0/lib/oxidized/nodes.rb:130:in synchronize' /usr/local/rvm/gems/ruby-2.6.3/gems/oxidized-0.28.0/lib/oxidized/nodes.rb:130:in with_lock’
    /usr/local/rvm/gems/ruby-2.6.3/gems/oxidized-0.28.0/lib/oxidized/nodes.rb:174:in yield_node_output' /usr/local/rvm/gems/ruby-2.6.3/gems/oxidized-0.28.0/lib/oxidized/nodes.rb:62:in fetch’
    /usr/local/rvm/gems/ruby-2.6.3/gems/oxidized-web-0.13.1/lib/oxidized/web/webapp.rb:91:in block in <class:WebApp>' /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in call’
    /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in block in compile!' /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in block (3 levels) in route!’
    /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:994:in route_eval' /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in block (2 levels) in route!’
    /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:1015:in block in process_route' /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in catch’
    /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in process_route' /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:973:in block in route!’
    /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in each' /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in route!’
    /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:1085:in block in dispatch!' /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in block in invoke’
    /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in catch' /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in invoke’
    /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:1082:in dispatch!' /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in block in call!’
    /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in block in invoke' /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in catch’
    /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in invoke' /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in call!’
    /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:895:in call' /usr/local/rvm/gems/ruby-2.6.3/gems/rack-protection-1.5.5/lib/rack/protection/xss_header.rb:18:in call’
    /usr/local/rvm/gems/ruby-2.6.3/gems/rack-protection-1.5.5/lib/rack/protection/path_traversal.rb:16:in call' /usr/local/rvm/gems/ruby-2.6.3/gems/rack-protection-1.5.5/lib/rack/protection/json_csrf.rb:18:in call’
    /usr/local/rvm/gems/ruby-2.6.3/gems/rack-protection-1.5.5/lib/rack/protection/base.rb:49:in call' /usr/local/rvm/gems/ruby-2.6.3/gems/rack-protection-1.5.5/lib/rack/protection/base.rb:49:in call’
    /usr/local/rvm/gems/ruby-2.6.3/gems/rack-protection-1.5.5/lib/rack/protection/frame_options.rb:31:in call' /usr/local/rvm/gems/ruby-2.6.3/gems/rack-1.6.13/lib/rack/nulllogger.rb:9:in call’
    /usr/local/rvm/gems/ruby-2.6.3/gems/rack-1.6.13/lib/rack/head.rb:13:in call' /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/show_exceptions.rb:25:in call’
    /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:182:in call' /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:2013:in call’
    /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in block in call' /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:1787:in synchronize’
    /usr/local/rvm/gems/ruby-2.6.3/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in call' /usr/local/rvm/gems/ruby-2.6.3/gems/rack-1.6.13/lib/rack/urlmap.rb:66:in block in call’
    /usr/local/rvm/gems/ruby-2.6.3/gems/rack-1.6.13/lib/rack/urlmap.rb:50:in each' /usr/local/rvm/gems/ruby-2.6.3/gems/rack-1.6.13/lib/rack/urlmap.rb:50:in call’
    /usr/local/rvm/gems/ruby-2.6.3/gems/rack-1.6.13/lib/rack/builder.rb:153:in call' /usr/local/rvm/gems/ruby-2.6.3/gems/puma-3.11.4/lib/puma/configuration.rb:225:in call’
    /usr/local/rvm/gems/ruby-2.6.3/gems/puma-3.11.4/lib/puma/server.rb:632:in handle_request' /usr/local/rvm/gems/ruby-2.6.3/gems/puma-3.11.4/lib/puma/server.rb:446:in process_client’
    /usr/local/rvm/gems/ruby-2.6.3/gems/puma-3.11.4/lib/puma/server.rb:306:in block in run' /usr/local/rvm/gems/ruby-2.6.3/gems/puma-3.11.4/lib/puma/thread_pool.rb:120:in block in spawn_thread’

Thanks a lot !

Looks like the problem is with the output of Oxidized configuration. Can you share your configuration?

Yes, I can.

Here my configuration file of Oxidized (I have clear the confidential information) :

username: admin #The (optional) default username on your devices. This can be overridden at group/individual level.
password: ###### #As above, optional default password and can be overridden at group/individual level.
resolve_dns: true #If you provide a hostname, this will DNS lookup the hostname.
interval: 3600 #How often to check for new configs.
use_syslog: true #This option relates to whether you want to use syslog messages to trigger a config fetch.
log: /opt/oxidized/.config/oxidized/logs/
debug: true #Debug mode! Great for setup.
threads: 30
timeout: 60 #Timeout after 20 seconds.
retries: 3 #Try 3 times.
remove_secret: true #Remove secret/enable passwords from the resulting config file - does not work on all models.
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/ #Detection of the user prompt on the device.
rest: 0.0.0.0:8888 #Listening address for API/web UI endpoint.
next_adds_job: false
pid: “/opt/oxidized/.config/oxidized/pid”

crash:
directory: “/opt/oxidized/.config/oxidized/crashes” #Where to store the log when the application crashes
hostnames: false
stats:
history_size: 10 #How many past configs to keep.

input:
default: ssh
debug: false
ssh:
secure: false #I believe this has something to do with using keys or certificates to connect to the devices.
utf8_encoded: true

output:
default: git #Output to a Git repository. Oxidized will create the repository based on the settings below.
git:
single_repo: true
user: Oxidized #Does not need to be an actual user, this is just the name that will appear on the commits
email: [email protected] #Again, does not need to be an actual email address.
repo: /opt/oxidized/.config/oxidized/oxidized.git #Where to store the repository
file:
directory: “/opt/oxidized/output/configs” #By default, Oxidized will create a repository for each device.

hooks:
push_to_remote:
type: githubrepo
events: [post_store]
remote_repo: “[email protected]:enterprise-ntw/oxidized.git”
publickey: “/home/oxidized/.ssh/id_rsa.pub”
privatekey: “/home/oxidized/.ssh/id_rsa”

source:
default: csv
csv:
file: “/opt/oxidized/.config/oxidized/router.db” #File containing all the devices to pull configs from.
delimiter: !ruby/regexp /:confused: #The delimiter for the file. This is the default.
map:
name: 0 #Hostname is the first item in the router.db configuration.
ip: 1 #IP is the second item and so on.
model: 2 #In this case, the router.db would look something like hostname:10.0.0.1:procurve:switches
group: 3 #An arbitrary grouping to keep like devices together.

groups:
switches:
username: login
password: password
firewalls:
username: login
passwords: password
vars:
ssh_port: 22
nexus:
username: login
password: password
wlc:
username: login
password: password

Thanks

The source is incorrect in your config. Make sure you have all the needed settings.
https://docs.librenms.org/Extensions/Oxidized/

Example source from my server
source:
default: http
debug: true
http:
url: http://127.0.0.1/api/v0/oxidized
map:
name: hostname
model: os
# group: group
headers:
X-Auth-Token: ‘***********’

1 Like

Hello,

Sorry for the delay, I have try and is now working.
I didn’t think he needed it, I wanted to stay with my local file first, that’s okay.

This problem is fixed but I have another problem…

On Oxidized I don’t have all librenms devices, I don’t understand why? Do you have an idea ?

Edit : I managed to remap my Alcatel switches but I don’t know how to detect my WLC?

Thanks