Oxidized - no GUI API access, Config button shows "We couldn't retrieve the device information from Oxidized"

Hello,

I’ve got a new LibreNMS instance and I’m having some trouble with Oxidized. When I try to access the web gui API for Oxidized at https://172.xx.xx.xx/api/v0/oxidized, I am met with the following error:

{“message”:“Unauthenticated.”}

I am able to curl to the same IP and get a response. Additionally, when I click on the “Config” button on any of my monitored devices, I get the error

“We couldn’t retrieve the device information from Oxidized”

A few important things to note:

  • I have set it so that LibreNMS only responds to https requests from a specific network interface. It does not respond at the loopback address currently.
  • I am using a self signed internal cert for LibreNMS
  • I am using a git repo to store my Oxidized device configuration backups - it is a repo that was moved from my original LibreNMS install and (hopefully) still has all of my device history in it if I can get it to connect
  • I also moved over the Oxidized configuration file from my original LibreNMS install. It has been updated with a fresh API token generated by the new LibreNMS instance. I have also updated the URL pointers in the Oxidized config file
  • The Oxidized service starts up and seems to run fine
  • I can see output containing configs gathered by Oxidized in the log files (172.xx.xx.xx-ssh files)

Sanitized Oxidized config:

password: password
model: enterasys
interval: 86400
log: ~/.config/oxidized/logs/debug.log
use_syslog: false
debug: true
threads: 30
timeout: 300
retries: 3
prompt: !ruby/regexp /^([\[email protected]]+[#>]\s?)$/
rest: 172.xx.xx.xx:8888
next_adds_job: false
vars: {}
groups:
  enterasys:
    username: user
    password: password
  hp:
    username: user
    vars:
      auth_methods: ["publickey"]
      ssh_keys: "home/oxidized/.ssh/id_rsa"
  aoscx:
    username: user
    vars:
      auth_methods: ["publickey"]
      ssh_keys: "home/oxidized/.ssh/id_rsa"
  asa:
    username: user
    password: password
    vars:
      enable: password
  fortios:
    username: user
    password: password
models:
  aoscx:
    username: user
    vars:
      auth_method: ["publickey"]
      ssh_keys: "home/oxidized/.ssh/id_rsa"
  fortios:
    username: user
    password: password
  airfiber:
    username: user
pid: "/home/oxidized/.config/oxidized/pid"
input:
  default: ssh
  debug: true
  ssh:
    secure: false
output:
  default: git
  git:
    user: oxidized
    email: [email protected]
    single_repo: true
    repo: "/home/oxidized/.config/oxidized/devices.git"
source:
  default: http
  debug: true
  http:
    url: https://172.xx.xx.xx/api/v0/oxidized
    scheme: https
    secure: false
    delimiter: !ruby/regexp /:/
    map:
      name: hostname
      model: os
      group: group
    headers:
      X-Auth-Token: 'auth_token_hash'
model_map:
  asa: asa
  enterasys: enterasys
  aoscx: aoscx
  fortios: fortios

If other info is needed, I’m happy to supply it. Any assistance is appreciated. Thanks.

Oxidized appears to be adding information to the git repo. The log files look good from what I can tell. But now I’m seeing this error when I run “systemctl status oxidized”:

oxidized[1078]: 2022-03-23 08:49:02 -0700: HTTP parse error, malformed request (): #<Puma::HttpParserError: Invalid HTTP format,>

I still cannot access the Oxidized API via the web gui and the Config button on devices that appear to have successfully been backed up by Oxidized still show the “We couldn’t retrieve the device information from Oxidized” error.

  1. Your Oxidized-server would need to be able to connect to the LibreNMS API. If you are using a self-signed cert, I am not sure if the Oxidized will accept it but you can try. I personally just use plain http between the Oxidized and LibreNMS since in my case the servers are in a private network anyway.

  2. You can not open the /api/v0/oxidized with a browser without passing the authentication header.

  3. The get config button works by initiating a connection to the Oxidized API (from LibreNMS Web-server to the Oxidized-server). You will need to configure the correct address for this in the LibreNMS.

  4. Check the routing and firewalls between LibreNMS and Oxidized servers.

Figured it out. So, it appears that Oxidized hates to be pointed at any IP other than 127.0.0.1. I had to set the Oxidized REST IP to 127.0.0.1:8888 and the Oxidized source http url to http://127.0.0.1/api/v0/oxidized in the Oxidized config. I also had to change config.php for LibreNMS to point at 127.0.0.1:8888 in the Oxidized stanza. Previously I had these set to the network interface that I am pointing the LibreNMS web site to via nginx.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.