Group field "username" not seen by node.rb for ArubaOS-CX devices when starting Oxidized

Hey All,

My ArubaOS-CX devices are not working with Oxidized. The issue appears to be that when the devices are loaded at first start of Oxidized, the username set within the group for “arubaos-cx” is skipped and the global username in the Oxidized config is used instead. I have other devices, specifically Cisco ASAs, that use a different username than the global username for Oxidized and those work just fine.

Here are the relevant parts of my Oxidized config (sanitized):

  arubaos-cx:
    username: oxy
    vars:
      auth_methods: ["publickey"]
      ssh_keys: "home/oxy/.ssh/id_rsa"
  asa:
    username: oxy
    password: password
    vars:
      enable: enablepass
model_map:
  asa: asa
  arubaos-cx: aoscx

Output of the debug log for one of the ArubaOS-CX devices (sanitized):

D, [2021-06-15T13:56:23.211971 #29442] DEBUG -- : resolving DNS for 192.168.0.100...
D, [2021-06-15T13:56:23.211993 #29442] DEBUG -- : IPADDR
D, [2021-06-15T13:56:23.212028 #29442] DEBUG -- : node.rb: resolving node key 'model', with passed global value of '' and node value 'aoscx'
D, [2021-06-15T13:56:23.212075 #29442] DEBUG -- : node.rb: setting node key 'model' to value 'enterasys' from global
D, [2021-06-15T13:56:23.212101 #29442] DEBUG -- : node.rb: returning node key 'model' with value 'aoscx'
D, [2021-06-15T13:56:23.212121 #29442] DEBUG -- : lib/oxidized/node.rb: Loading model "aoscx"
D, [2021-06-15T13:56:23.213266 #29442] DEBUG -- : lib/oxidized/model/model.rb Added all to the commands list
D, [2021-06-15T13:56:23.213320 #29442] DEBUG -- : lib/oxidized/model/model.rb Added secret to the commands list
D, [2021-06-15T13:56:23.213349 #29442] DEBUG -- : lib/oxidized/model/model.rb Added show version to the commands list
D, [2021-06-15T13:56:23.213436 #29442] DEBUG -- : lib/oxidized/model/model.rb Added  show environment to the commands list
D, [2021-06-15T13:56:23.213466 #29442] DEBUG -- : lib/oxidized/model/model.rb Added show module to the commands list
D, [2021-06-15T13:56:23.213489 #29442] DEBUG -- : lib/oxidized/model/model.rb Added show interface transceiver to the commands list
D, [2021-06-15T13:56:23.213511 #29442] DEBUG -- : lib/oxidized/model/model.rb Added show system to the commands list
D, [2021-06-15T13:56:23.213543 #29442] DEBUG -- : lib/oxidized/model/model.rb Added show running-config to the commands list
D, [2021-06-15T13:56:23.213842 #29442] DEBUG -- : node.rb: resolving node key 'input', with passed global value of 'ssh' and node value ''
D, [2021-06-15T13:56:23.213880 #29442] DEBUG -- : node.rb: returning node key 'input' with value 'ssh'
D, [2021-06-15T13:56:23.213911 #29442] DEBUG -- : node.rb: resolving node key 'output', with passed global value of 'git' and node value ''
D, [2021-06-15T13:56:23.213949 #29442] DEBUG -- : node.rb: returning node key 'output' with value 'git'
D, [2021-06-15T13:56:23.213973 #29442] DEBUG -- : node.rb: resolving node key 'username', with passed global value of '' and node value ''
D, [2021-06-15T13:56:23.213996 #29442] DEBUG -- : node.rb: setting node key 'username' to value 'user' from global
D, [2021-06-15T13:56:23.214019 #29442] DEBUG -- : node.rb: returning node key 'username' with value 'user'
D, [2021-06-15T13:56:23.214039 #29442] DEBUG -- : node.rb: resolving node key 'password', with passed global value of '' and node value ''
D, [2021-06-15T13:56:23.214061 #29442] DEBUG -- : node.rb: setting node key 'password' to value 'password' from global
D, [2021-06-15T13:56:23.214084 #29442] DEBUG -- : node.rb: returning node key 'password' with value 'password'

Output of the debug log for a Cisco ASA (sanitized):

D, [2021-06-16T07:41:23.452665 #102925] DEBUG -- : resolving DNS for 192.168.100.200...
D, [2021-06-16T07:41:23.452688 #102925] DEBUG -- : IPADDR
D, [2021-06-16T07:41:23.452727 #102925] DEBUG -- : node.rb: resolving node key 'model', with passed global value of '' and node value 'asa'
D, [2021-06-16T07:41:23.452754 #102925] DEBUG -- : node.rb: setting node key 'model' to value 'enterasys' from global
D, [2021-06-16T07:41:23.452782 #102925] DEBUG -- : node.rb: returning node key 'model' with value 'asa'
D, [2021-06-16T07:41:23.452806 #102925] DEBUG -- : lib/oxidized/node.rb: Loading model "asa"
D, [2021-06-16T07:41:23.455315 #102925] DEBUG -- : lib/oxidized/model/model.rb Added all to the commands list
D, [2021-06-16T07:41:23.455361 #102925] DEBUG -- : lib/oxidized/model/model.rb Added secret to the commands list
D, [2021-06-16T07:41:23.455388 #102925] DEBUG -- : lib/oxidized/model/model.rb Added show mode to the commands list
D, [2021-06-16T07:41:23.455411 #102925] DEBUG -- : lib/oxidized/model/model.rb Added show version to the commands list
D, [2021-06-16T07:41:23.455432 #102925] DEBUG -- : lib/oxidized/model/model.rb Added show inventory to the commands list
D, [2021-06-16T07:41:23.455680 #102925] DEBUG -- : node.rb: resolving node key 'input', with passed global value of 'ssh' and node value ''
D, [2021-06-16T07:41:23.455720 #102925] DEBUG -- : node.rb: returning node key 'input' with value 'ssh'
D, [2021-06-16T07:41:23.455751 #102925] DEBUG -- : node.rb: resolving node key 'output', with passed global value of 'git' and node value ''
D, [2021-06-16T07:41:23.455786 #102925] DEBUG -- : node.rb: returning node key 'output' with value 'git'
D, [2021-06-16T07:41:23.455811 #102925] DEBUG -- : node.rb: resolving node key 'username', with passed global value of '' and node value ''
D, [2021-06-16T07:41:23.455836 #102925] DEBUG -- : node.rb: setting node key 'username' to value 'user' from global
D, [2021-06-16T07:41:23.455875 #102925] DEBUG -- : node.rb: setting node key 'username' to value 'oxy' from group
D, [2021-06-16T07:41:23.455898 #102925] DEBUG -- : node.rb: returning node key 'username' with value 'oxy'
D, [2021-06-16T07:41:23.455919 #102925] DEBUG -- : node.rb: resolving node key 'password', with passed global value of '' and node value ''
D, [2021-06-16T07:41:23.455941 #102925] DEBUG -- : node.rb: setting node key 'password' to value 'global-pass' from global
D, [2021-06-16T07:41:23.455967 #102925] DEBUG -- : node.rb: setting node key 'password' to value 'password' from group
D, [2021-06-16T07:41:23.455989 #102925] DEBUG -- : node.rb: returning node key 'password' with value 'password'

Thanks for the assistance!

EDIT: When I look at the Oxidized node list in LibreNMS, I noticed that the “Group” for the Aoscx devices is listed as “default”… so for some reason, it’s not reading the group I have in the Oxidized config. This is also apparently true for the one FortiOS device I have as well, even though I’ve defined a group for it as well in the Oxidized config.

EDIT 2: Okay, so it’s been a while since I added a new device type to LibreNMS/Oxidized and I realized I hadn’t updated the LibreNMS config.php file Oxidized config. I’ve added the following entries to config.php, but Oxidized node list is still showing the groups for ArubaOS-CX and FortiOS as “default”:

$config['oxidized']['group']['os'][]            = array('match' => 'aoscx', 'group' => 'arubaos-cx');
$config['oxidized']['group']['os'][]            = array('match' => 'fortios', 'group' => 'fortigate');