Oxidized with Librenms integration error

Hi All:
I config oxidized with Librenms , It’s been a problem.

I will have some message generated when I execute oxidized

    15: from /usr/local/rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in `<main>'
    14: from /usr/local/rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in `eval'
    13: from /usr/local/rvm/gems/ruby-2.5.1/bin/oxidized:23:in `<main>'
    12: from /usr/local/rvm/gems/ruby-2.5.1/bin/oxidized:23:in `load'
    11: from /usr/local/rvm/gems/ruby-2.5.1/gems/oxidized-0.24.0/bin/oxidized:8:in `<top (required)>'
    10: from /usr/local/rvm/gems/ruby-2.5.1/gems/oxidized-0.24.0/lib/oxidized/cli.rb:12:in `run'
     9: from /usr/local/rvm/gems/ruby-2.5.1/gems/oxidized-0.24.0/lib/oxidized/core.rb:4:in `new'
     8: from /usr/local/rvm/gems/ruby-2.5.1/gems/oxidized-0.24.0/lib/oxidized/core.rb:4:in `new'
     7: from /usr/local/rvm/gems/ruby-2.5.1/gems/oxidized-0.24.0/lib/oxidized/core.rb:14:in `initialize'
     6: from /usr/local/rvm/gems/ruby-2.5.1/gems/oxidized-0.24.0/lib/oxidized/core.rb:14:in `new'
     5: from /usr/local/rvm/gems/ruby-2.5.1/gems/oxidized-0.24.0/lib/oxidized/nodes.rb:123:in `initialize'
     4: from /usr/local/rvm/gems/ruby-2.5.1/gems/oxidized-0.24.0/lib/oxidized/nodes.rb:10:in `load'
     3: from /usr/local/rvm/gems/ruby-2.5.1/gems/oxidized-0.24.0/lib/oxidized/nodes.rb:128:in `with_lock'
     2: from /usr/local/rvm/gems/ruby-2.5.1/gems/oxidized-0.24.0/lib/oxidized/nodes.rb:128:in `synchronize'
     1: from /usr/local/rvm/gems/ruby-2.5.1/gems/oxidized-0.24.0/lib/oxidized/nodes.rb:15:in `block in load'

/usr/local/rvm/gems/ruby-2.5.1/gems/oxidized-0.24.0/lib/oxidized/source/http.rb:23:in `load’: uninitialized constant Oxidized::HTTP::OpenSSL (NameError)
Did you mean? OpenStruct

my oxidized config

username: switchadmin
password:
model: ios
interval: 86400
use_syslog: false
log: “/root/.config/oxidized/logs/log”
debug: true
threads: 30
timeout: 30
retries: 1
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 0.0.0.0:8888
next_adds_job: true
vars:
enable: enable password
groups: {}
models: {}
pid: “/root/.config/oxidized/pid”
input:
default: ssh, telnet
debug: false
ssh:
secure: false
output:
default: git
git:
user: git
email: [email protected]
repo: “/root/.config/oxidized/devices.git”
source:
default: http
http:
url: http://localhost/api/v0/oxidized
secure: false
map:
name: hostname
model: os
group: group
headers:
X-Auth-Token: 3664c1ec173950de2d4bce9b30d1a1b3
#csv:
#file: “/root/.config/oxidized/router.db”
#delimiter: !ruby/regexp /:confused:
#map:
# name: 0
# model: 1
#gpg: false
model_map:
cisco: ios

I don’t have any idea to solve the problem.

Hi,
First of all, try pasting your Oxidized config into this tool:
https://<YourLNMSServerIP/tools/tool=oxidized-cfg-check/

This will tell you if there are any errors.

Also, have you configured LNMS to use HTTPS?
Because Oxidized is trying to connect via http.

Hi Tslytsly:
Thank Your replay.
I check my oxidized yaml config , The output is correct.

I Change my librenms to use https , but output error messages is the same.

Thank You.

OK, did you change Secure to True?

secure: true

Hi Tslylytsly:

I solved this problem , current state is normal.

Thank You

Otis

Great.
It would be nice if you posted how you solved the issue, in case others could benefit from it.

Hi Tslytsly:

My oxidized config

username: username
password: password
model: junos
interval: 3600
log: /home/oxidized/.config/oxidized/logs/oxidized.log
debug: false
threads: 30
timeout: 20
retries: 3
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 127.0.0.1:8888
next_adds_job: false
vars:
enable: [switch enable password]
groups: {}
models: {}
pid: “/home/oxidized/.config/oxidized/pid”
input:
default: ssh, telnet
debug: false
ssh:
secure: false
#output:

default: file

file:

directory: “/home/oxidized/.config/oxidized/configs”

output:
default: git
git:
single_repo: true
user: oxidized
email: [email protected]
repo: /home/oxidized/.config/oxidized/configs.git
source:
default: csv
csv:
file: “/home/oxidized/.config/oxidized/router.db”
delimiter: !ruby/regexp /:confused:
map:
name: 0
model: 1
username: 2
password: 3
gpg: false
hooks:
push_to_remote:
type: githubrepo
events: [node_success, post_store]
single_repo: true
remote_repo: [email protected]:oxidize/oxidized.git
publickey: /home/oxidized/.config/.ssh/id_rsa.pub
privatekey: /home/oxidized/.config/.ssh/id_rsa
model_map:
cisco: ios
juniper: junos

I add some config in Librenms config.php

$config[‘oxidized’][‘enabled’] = TRUE;
$config[‘oxidized’][‘url’] = ‘http://127.0.0.1:8888’;
$config[‘oxidized’][‘features’][‘versioning’] = true;
$config[‘oxidized’][‘group_support’] = true;
$config[‘oxidized’][‘reload_nodes’] = true;
$config[‘oxidized’][‘group_support’] = true;
$config[‘oxidized’][‘default_group’] = ‘default’;

:slightly_smiling_face:

Thank You

Otis :smile: