Issue with pushing devices to oxidized

I have a new librenms instance that is populated with around 50 devices. I have also setup oxidized on the same server. For the networking devices that I manually added to oxidized, I can see their configs in Librenms. The issue I am having is I am unable to get LibreNMS to push its device list to oxidized. Even if I manually add a device to librenms, it is not pushing it to oxidized. Below is my config for Librenms that pertains to oxidized.

$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’][‘default_group’] = ‘default’;
$config[‘oxidized’][‘reload_nodes’] = true;

You’ve got a conflict in the info here, you can’t manually add devices to Oxidized if LibreNMS is feeding it data.

If you aren’t using LibreNMS as the source then we have no effect.

Post your oxidized config.

Also this can be configured in the web ui under gloabal settings.

Thank you for the quick reply. I only added a 2 devices manually to make sure it works. I can remove them if it is causing an issue. Here is my oxidized config.

username: user
password: password
model: arista
interval: 3600
use_syslog: true
log: /home/oxidized/.config/oxidized/logs/
debug: false
threads: 30
timeout: 120
retries: 3
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 127.0.0.1:8888
next_adds_job: false
vars:
ssh_port: 22
enable: password
groups:
default:
username: user
password: password
models: {}
pid: "/home/oxidized/.config/oxidized/pid"
input:
default: ssh, telnet
debug: false
ssh:
secure: false
output:
default: git
git:
user: oxidized
email: email
repo: "/var/network-backups/default.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
enable: 4
ssh_port: 5
group: 6
vars_map:
enable: 4
ssh_port: 5
model_map:
cisco: nxos
juniper: junos
huawei: vrp
paloalto: panos
ubiquiti: edgeos
brocade: vyatta
mikrotik: routeros
fortigate: fortios
fortinet: fortios
vyatta: vyos
vyos: vyatta
arista: eos
gpg: false

Below is the router.db currently. I added these manually.

switch1:eos:user:password:password#:22:default
switch2:nxos:user:password:password#:22:default
switch3:eos:user:password:password#:22:default

Hey, sorry, what did you change in your config vs mine? I think I am missing the difference.

Ok guys. I figured it out. Your hint with the sources is what lead me to the right direction. I did not put LibreNMS as a source in oxidized.

Thank you for the help.

running into another snag now. It seems like librenms is pushing everything but Arista devices (EOS devices) to oxidized. Below is the config i am using in oxidized.

username: user
password: pass
model: arista
interval: 3600
use_syslog: true
log: /home/oxidized/.config/oxidized/logs/
debug: false
threads: 30
timeout: 120
retries: 3
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 127.0.0.1:8888
next_adds_job: false
vars:
  ssh_port: 22
  enable: pass
groups:
  default:
    username: user
    password: pass
    enable: pass
models: {}
pid: "/home/oxidized/.config/oxidized/pid"
input:
  default: ssh, telnet
  debug: false
  ssh:
    secure: false
output:
  default: git
  git:
    user: oxidized
    email: email
    repo: "/var/network-backups/default.git"
source:
  default: http
  http:
    url: http://127.0.0.1/api/v0/oxidized
    scheme: http
    delimiter: !ruby/regexp /:/
    map:
      name: hostname
      model: os
      groups: group
    headers:
      X-Auth-Token: 'TOKENHERE'
model_map:
  cisco: NXOS
  cisco: IOS
  juniper: junos
  huawei: vrp
  paloalto: panos
  ubiquiti: edgeos
  brocade: vyatta
  mikrotik: routeros
  fortigate: fortios
  fortinet: fortios
  vyatta: vyos
  vyos: vyatta
  arista: EOS
gpg: false

Below is the oxidized config in librenms:

$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']['default_group'] = 'default';
$config['oxidized']['reload_nodes'] = true;
$config['oxidized']['group']['os'][] = array('match' => 'NXOS', 'group' => 'NXOS');
$config['oxidized']['group']['os'][] = array('match' => 'ios', 'group' => 'IOS');

Even if I take the last 2 statements out about hte group, it does not import arista devices.

Ok I think I have one last issue left. The issue with the aristas was the model numbering. The last issue I am having is the groups not being set int oxidized. Below is my groups configuration in oxidized:

groups:
  default:
    username: user
    password: pass
    enable: pass
  nxos:
    username: user
    password: pass
  ios:
    username: user
    password: pass
    enable: pass
  fortinet:
    username: user
    password: pass

The librenms config looks like this:

$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']['default_group'] = 'default';
$config['oxidized']['reload_nodes'] = true;
$config['oxidized']['group']['os'][] = array('match' => 'nxos', 'group' => 'nxos');
$config['oxidized']['group']['os'][] = array('match' => 'ios', 'group' => 'ios');
$config['oxidized']['group']['os'][] = array('match' => 'fortigate', 'group' => 'fortinet');

When I pull the data from librenms using curl I get the following:

{
    "hostname": "switch1",
    "os": "nxos",
    "group": "nxos"
},
{
    "hostname": "switch2",
    "os": "nxos",
    "group": "nxos"
},

Any thoughts what the issue could be? This is the last thing holding me up currently from getting all this straightened out!

Hi Guys, any thoughts on this?

Thank you!

1 - Did you set your map under the source section?
2 - The syntax you’re using for your enable password is not correct. The ‘enable’ key should be nested under ‘vars’

Below is an example, refer to the map and vars/enable sections:

source:
  default: http
  debug: false
  http:
    url: https://your-libre-url.com
    map:
      name: hostname
      model: os
      group: group
    headers:
      X-Auth-Token: 'libre-api-token'

groups:
  radius:
    username: some_user
    password: a_password
    vars:
      enable: a_password
  local-login:
    username: local_user
    password: a_password
    vars:
      enable: a_password

Refer to the Oxidized documentation for more details

thank you for all the help. I was able to get it working. I had the group mapping Syntax wrong!

1 Like